Automations
Automations allow you to create powerful workflows that respond to survey events automatically. Build complex logic with triggers, conditions, and actions to personalize the survey experience and integrate with external systems.
Overview
An automation workflow consists of:
- Triggers: Events that start the workflow
- Conditions: Logic to control flow (if/else)
- Actions: Operations to perform (send messages, call APIs)
- Parameters: Variables to store and use data
Workflow Triggers
Triggers are entry points that start your workflow. Choose the right trigger based on when you need the workflow to run.
Contact Added
Fires immediately when a contact is added to the collector, before the survey link is sent.
Use cases:
- Fetch data from external APIs to use in the survey
- Enrich contact data from your CRM
- Calculate personalized values for survey questions
- Set up conditional survey paths based on external data
Important: This is the only trigger that allows you to use workflow parameters in survey questions.
Survey Response Opened
Fires when a user clicks the survey link and the survey starts loading.
Use cases:
- Track survey opens in external analytics
- Send real-time notifications to your team
- Update CRM records when contacts engage
Survey Response Completed
Fires when a user submits the completed survey.
Use cases:
- Send thank-you emails
- Deliver coupons based on responses
- Push data to external systems via webhooks
- Trigger follow-up campaigns
Step Types
Logic: If/Else Condition
Create branching logic based on conditions.
Supported operators:
- Comparison:
>,>=,<,<=,==,!= - String:
contains,startsWith,endsWith - Null checks:
isEmpty,isNotEmpty
Example conditions:
survey.score >= 80
params.customerTier == 'VIP'
contact.email contains '@company.com'
Actions: Send Messages
Send Email
Send a personalized email to the contact.
Configuration:
- To: Contact email (usually
{contact.email}) - Subject: Email subject with variable support
- Body: Rich HTML content with personalization
Send SMS
Send an SMS message to the contact's phone number.
Configuration:
- To: Contact phone (usually
{contact.phone}) - Message: Text content (160 character limit for single SMS)
Send WhatsApp
Send a WhatsApp message using your configured provider.
Configuration:
- To: Contact phone with country code
- Template: Pre-approved WhatsApp template
- Variables: Dynamic values to fill template placeholders
Send Coupon (Email/SMS/WhatsApp)
Generate and send a coupon code from your coupon pool.
Configuration:
- Coupon Group: Select the coupon pool to draw from
- Delivery Method: Email, SMS, or WhatsApp
- Message: Customize the delivery message
Integration: HTTP Request
Make API calls to external services.
Configuration:
- Method: GET, POST, PUT, PATCH, DELETE
- URL: Endpoint with variable interpolation
- Headers: Custom headers (authentication, content type)
- Body: Request payload (JSON supported)
- Response Mapping: Extract values from the response
Example:
URL: https://api.yourcrm.com/customers/{{contact.email}}
Method: GET
Headers:
Authorization: Bearer your-api-key
Response Mapping:
$.tier → customerTier
$.loyaltyPoints → loyaltyScore
Data: Set Value
Create or update workflow parameters.
Configuration:
- Target: Parameter name (e.g.,
params.discount) - Value Type: Literal, Variable, or Expression
- Value: The value to set
Example:
Target: params.discountPercent
Value Type: Expression
Value: survey.score >= 90 ? 20 : 10
Workflow Parameters
Workflow parameters are temporary variables that exist during workflow execution.
Creating Parameters
Parameters can be created:
- Manually: Click "Add Parameter" in the Parameters modal
- From HTTP Response: Map API response fields to parameters
- From Set Value: Create calculated values
Using Parameters
Reference parameters in configurations:
- In workflows:
{{params.parameterName}} - In surveys:
{parameterName}(when "In Survey" is checked)
Include in Survey
Check "In Survey" to make a parameter available in survey questions:
- Uses SurveyJS
setVariable()under the hood - Requires "Contact Added" trigger to work
- Available via
{parameterName}syntax in questions
See the Variables & Personalization guide for detailed examples of using parameters in surveys.
Building a Workflow
Step 1: Add a Trigger
- Open the Automation tab in your collector
- Click "Add Step"
- Select a trigger type from the palette
- Drag it to the canvas
Step 2: Add Actions
- Click "Add Step"
- Choose an action (Send Email, HTTP Request, etc.)
- Connect it to your trigger
- Configure the action settings
Step 3: Add Conditions (Optional)
- Add an If/Else Condition step
- Configure the condition logic
- Connect the Yes branch to one action
- Connect the No branch to another action
Step 4: Configure Parameters (Optional)
- Click the Parameters button
- Add or configure parameters
- Check "In Survey" for parameters needed in questions
Step 5: Test and Activate
- Review your workflow
- Test with a sample contact
- Check execution logs
- Activate the collector
Examples
Example 1: VIP Customer Detection
Goal: Fetch customer tier from CRM and show VIP-specific questions.
Workflow:
[Contact Added] → [HTTP Request: Get Customer] → [Set Value: isVIP]
Configuration:
- HTTP Request to your CRM API
- Map
$.tiertoparams.customerTier - Check "In Survey" for
customerTier - Use
{customerTier}in survey questions
Example 2: Score-Based Coupon
Goal: Send coupons only to respondents with high scores.
Workflow:
[Survey Completed] → [Condition: score >= 80]
├─ Yes → [Send Coupon Email]
└─ No → [Send Thank You Email]
Example 3: Real-Time CRM Update
Goal: Update CRM when survey is completed.
Workflow:
[Survey Completed] → [HTTP Request: Update CRM]
Configuration:
- Method: POST
- URL:
https://api.yourcrm.com/surveys - Body: Survey response data
Best Practices
-
Choose the right trigger:
- Contact Added → Pre-survey enrichment
- Survey Opened → Analytics/tracking
- Survey Completed → Post-survey actions
-
Handle errors gracefully:
- Use conditions to check if API calls succeeded
- Provide fallback paths for failures
-
Keep workflows simple:
- Break complex logic into multiple smaller workflows
- Use descriptive step names
-
Test thoroughly:
- Test with sample data before launch
- Monitor execution logs for errors
-
Document your workflows:
- Add descriptions to steps
- Keep a record of parameter purposes
Troubleshooting
Workflow not triggering
- Check collector status: Ensure the collector is active
- Check trigger: Verify the correct trigger is configured
- Check step connections: Ensure all steps are connected
HTTP request failing
- Check URL: Verify the endpoint is correct
- Check authentication: Ensure API keys are valid
- Check payload: Validate JSON body format
- Check logs: Review execution logs for error details
Parameters not available in survey
- Check trigger: Must use "Contact Added" trigger
- Check "In Survey": Checkbox must be enabled
- Check syntax: Use
{parameterName}not{{params.parameterName}}
Messages not sending
- Check contact data: Verify email/phone are present
- Check provider config: Ensure email/SMS providers are configured
- Check coupon pool: Verify coupons are available if using coupon actions