Workflow Parameters
Parameters are temporary variables that store data during workflow execution. Use them to capture API responses, compute values, and pass data between steps.
Variable Categories
Quick Reference
| Category | Prefix | Lifetime | Example |
|---|---|---|---|
| Survey | survey.* | Read-only | {{survey.score}} |
| Contact | contact.* | Read-only | {{contact.email}} |
| Parameters | params.* | Per-execution | {{params.customerId}} |
| Fields | fields.* | Persistent | {{fields.region}} |
| Settings | settings.* | Read-only | {{settings.dept_id}} |
Survey Variables
Available after any survey trigger fires:
- Common
- Timestamps
- IDs
| Variable | Type | Description |
|---|---|---|
survey.score | number | Total survey score (0-100) |
survey.status | string | IN_PROGRESS or COMPLETED |
survey.id | number | Unique survey identifier |
| Variable | Type | Description |
|---|---|---|
survey.completed_at | datetime | Completion timestamp |
survey.started_at | datetime | Start timestamp |
| Variable | Type | Description |
|---|---|---|
survey.department_id | string | Department identifier |
survey.collector_id | string | Collector identifier |
Usage Example:
// In email template
"Your score: {{survey.score}} out of 100"
// In condition
Left: {{survey.score}}
Operator: >=
Right: 9
Contact Variables
Available when contact information exists:
| Variable | Type | Example |
|---|---|---|
contact.email | string | customer@example.com |
contact.phone | string | +1234567890 |
contact.name | string | John Doe |
contact.id | number | 12345 |
contact.language | string | en |
Creating Parameters
Method 1: Manual Creation
- Click Parameters button (⚙️) in toolbar
- Enter name:
customerTier - Select type:
string - Click Add
Naming Rules
- Must start with a letter
- Only letters, numbers, underscores
- Case-sensitive
- Examples:
customerId,retry_count,isVIP
Method 2: HTTP Response Mapping
Example Response:
{
"customer": {
"tier": "gold",
"points": 1500
}
}
Mapping:
| JSON Path | Parameter | Type |
|---|---|---|
$.customer.tier | customerTier | string |
$.customer.points | loyaltyPoints | number |
Method 3: Set Value Step
Use the Set Value step to create or update parameters:
Target: params.discountPercent
Value: 20
Parameter Lifecycle
Parameter Persistence
Parameters only exist during workflow execution. They are discarded when the workflow completes. Use Fields for persistent storage.
Using Parameters
In Conditions
Left Operand: {{params.customerTier}}
Operator: ==
Right Operand: "gold"
In Messages
Hello {{contact.name}},
As a {{params.customerTier}} member with {{params.loyaltyPoints}} points,
you've earned a {{params.discountPercent}}% discount!
In HTTP Requests
- URL
- Headers
- Body
https://api.example.com/customers/{{contact.id}}/tier/{{params.customerTier}}
Authorization: Bearer {{params.apiToken}}
X-Customer-Tier: {{params.customerTier}}
{
"customerId": "{{contact.id}}",
"score": {{survey.score}},
"tier": "{{params.customerTier}}"
}
Parameters in Surveys
Parameters can be available inside survey questions when using the Contact Added trigger.
Enabling Survey Access
- Open the Parameters modal
- Check the In Survey checkbox
- Use single curly braces in survey questions:
Welcome {customerName}! As a {customerTier} member, how would you rate...
Timing Requirement
Parameters are only available in surveys when:
- The workflow uses the Contact Added trigger
- The parameter is marked as In Survey
- The parameter has a value before the survey loads
Parameter Data Types
| Type | Description | Example Values |
|---|---|---|
string | Text values | "gold", "active" |
number | Numeric values | 42, 3.14, -100 |
boolean | True/false | true, false |
Type Safety
Parameters created from HTTP responses have locked types. The type is inferred from the first value and cannot be changed.
Best Practices
Naming Conventions
| Pattern | Example | Use For |
|---|---|---|
| camelCase | customerTier | General parameters |
| Descriptive | apiResponseStatus | Clarity on source |
| Prefixed | crm_customerId | Integration-specific |
Error Handling
Troubleshooting
"Parameter not found" error
- Verify parameter exists in Parameters modal
- Check spelling and case (case-sensitive!)
- Ensure the step creating the parameter runs BEFORE steps using it
"Type mismatch" error
- HTTP response parameters have locked types
- Type is inferred from first value received
- Create a new parameter if type needs to change
Parameter not available in survey
- Enable In Survey checkbox in Parameters modal
- Use Contact Added trigger (not Survey Completed)
- Ensure parameter has value before survey loads
Next Steps
- HTTP Requests - Call external APIs
- Overview - Automation concepts
Was this page helpful?