Action Blocks
Action blocks perform operations behind the scenes — they don't send messages to the customer directly. Instead, they evaluate conditions, route conversations, call external systems, manage contacts, and run calculations.
| # | Action type | What it does |
|---|---|---|
| 1 | Condition | Checks a single expression → routes to TRUE or FALSE |
| 2 | Router | Checks multiple conditions → routes to multiple paths |
| 3 | HTTP Call | Calls an external system to fetch or send data |
| 4 | Contact & Lead Action | Manages contact records (assign agent, add tag, update fields, etc.) |
| 5 | Script | Runs custom code for calculations and data transformations |
1. Condition
Evaluates a single expression and routes the conversation down one of two paths: TRUE or FALSE. This is the simplest way to add decision-making to your flow.
2. Click it to open the configuration panel
3. Enter a condition expression using variables
4. Capture the full configuration panel showing the expression field, info box, and examples box
Save to:
static/img/screenshots/chatbot-flows/action-blocks/condition-config.pngConfiguration
| Setting | Description |
|---|---|
| Condition Expression | The expression to evaluate. Use variables, operators, and functions. Must evaluate to true or false. |
Click the code icon (</>) next to the expression field to open the Expression Builder, where you can browse variables, operators, and functions to build your expression.
How it works
The Condition node has two outputs on the canvas:
┌─────────────────────┐
│ Condition │
│ │
│ {{order_total}} > │
│ 1000 │
└──────┬──────┬────────┘
│ │
[TRUE] [FALSE]
│ │
▼ ▼
Discount Standard
Message Message
- If the expression evaluates to true → the flow follows the TRUE path
- If the expression evaluates to false → the flow follows the FALSE path
Connect nodes to both the TRUE and FALSE output handles to define what happens in each case.
Example expressions
| Expression | What it checks |
|---|---|
{{customer_age}} >= 18 | Customer is an adult |
{{order_total}} > 1000 | Order is above 1,000 |
{{status}} == "premium" | Customer is a premium member |
contains({{email}}, "@gmail.com") | Email is a Gmail address |
Use cases
- VIP routing — Check if
{{customer_type}}equals "VIP" → TRUE path gives priority support, FALSE path gives standard support - Budget qualification — Check if
{{budget}}> 5000 → TRUE path connects to sales team, FALSE path sends product brochure - Eligibility check — Check if
{{age}}>= 18 → TRUE path continues enrollment, FALSE path sends "not eligible" message - Business hours — Check if the current time is within working hours → TRUE path routes to live agent, FALSE path sends automated reply
2. Router
An advanced version of the Condition node that supports multiple paths with complex logic. While a Condition gives you 2 paths (TRUE/FALSE), a Router gives you as many paths as you need, each with its own set of conditions.
2. Click it to open the configuration panel
3. Add 3 paths with labels like "Sales", "Support", "Billing"
4. Add condition rules to each path
5. Capture the full configuration panel showing all paths and the default path section
Save to:
static/img/screenshots/chatbot-flows/action-blocks/router-config.pngConfiguration
Each Router consists of:
| Component | Description |
|---|---|
| Paths | Multiple routing paths, each with a label and conditions. Click Add Path to create more. |
| Default Path | Where to route the conversation if no path's conditions match (optional fallback) |
Anatomy of a path
Each path contains these elements:
| Element | Description |
|---|---|
| Path Label | A descriptive name (e.g., "VIP Customer", "New User", "Sales Inquiry") |
| Condition Groups | One or more groups of rules. Multiple groups are combined with OR logic. |
| Rules | Individual conditions within a group. Each rule has a Variable, Operator, and Value. |
| Group Logic | Within a group, rules are combined with either AND (all must match) or OR (any can match) |
| Route To | Shows which node this path is connected to on the canvas |
Path ordering
Paths are checked from top to bottom. The first matching path wins. Use the arrow buttons (↑ ↓) to reorder paths and ensure the most important conditions are checked first.
Comparison operators
| Operator | What it checks | Requires value |
|---|---|---|
| Equals | Exact match | Yes |
| Not Equals | Does not match | Yes |
| Contains | Text includes the value (case-insensitive) | Yes |
| Not Contains | Text does not include the value | Yes |
| Starts With | Text begins with the value | Yes |
| Ends With | Text ends with the value | Yes |
| Greater Than | Number is larger | Yes |
| Less Than | Number is smaller | Yes |
| Greater or Equal | Number is equal or larger | Yes |
| Less or Equal | Number is equal or smaller | Yes |
| Is Empty | Variable has no value | No |
| Is Not Empty | Variable has a value | No |
How evaluation works
┌──────────────────────┐
│ Router │
└──┬──┬──┬──┬──────────┘
│ │ │ │
[Path 1][Path 2][Path 3][Default]
Sales Support Billing General
│ │ │ │
▼ ▼ ▼ ▼
...different flows...
- The system checks Path 1 conditions first
- If Path 1 matches → route there and stop
- If not, check Path 2, then Path 3, and so on
- If no path matches → follow the Default path
Combining rules and groups
Within a group — rules are combined with the group's logic (AND or OR):
- AND:
{{department}}equals "Sales" AND{{region}}equals "North" → both must be true - OR:
{{language}}equals "Hindi" OR{{language}}equals "Tamil" → either can be true
Between groups — multiple groups within a path are always combined with OR:
- Group 1: Premium customer from North region
- OR Group 2: Any customer with order total > 10,000
2. Add a group with 2 rules using AND logic
3. Add a second group to show the OR relationship between groups
4. Capture the path showing both condition groups with rules
Save to:
static/img/screenshots/chatbot-flows/action-blocks/router-path-conditions.pngUse cases
- Department routing — Route to Sales, Support, or Billing based on
{{department}}selection - Language routing — Route to English, Hindi, or Tamil conversation flows based on
{{language}} - Multi-tier qualification — Route leads to Gold, Silver, or Bronze follow-ups based on
{{budget}}ranges - Region-based routing — Route to different teams based on
{{state}}or{{city}}
3. HTTP Call
Calls an external system (like your website, CRM, or any service with a web address) to fetch or send data. The response can be saved as variables for use in the rest of the flow.
2. Click it to open the configuration panel
3. Select "POST" as the method
4. Enter a URL with a variable like https://api.example.com/orders/{{order_id}}
5. Add a header (Content-Type: application/json)
6. Capture the full configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/http-call-config.pngConfiguration
| Setting | Description |
|---|---|
| HTTP Method | The type of request: GET, POST, PUT, DELETE, or PATCH |
| URL | The web address to call. Supports {{variables}} for dynamic values. |
| Query Parameters | URL parameters (shown only for GET requests). Add key-value pairs. |
| Headers | Additional request headers like Content-Type and Authorization |
| Body | Request data (shown only for POST, PUT, and PATCH). Choose between Raw JSON or Form Data. |
Query parameters (GET requests)
For GET requests, you can add query parameters as key-value pairs instead of embedding them in the URL. Each parameter has a Key and Value field (values support variables).
Headers
Add request headers by selecting from common options or entering a custom header name:
| Common headers | Description |
|---|---|
| Content-Type | The format of the data you're sending (e.g., application/json) |
| Authorization | Authentication token or credentials |
| Accept | The format you want the response in |
| X-API-Key | API key for authentication |
| X-Auth-Token | Authentication token |
| Cache-Control | Caching preferences |
| Custom | Enter any custom header name manually |
Header values support variables — for example, set the Authorization header to Bearer {{api_token}}.
2. Select "Authorization" from the header dropdown
3. Enter a bearer token value
4. Add another header with "Content-Type" and select "application/json"
5. Capture the headers section
Save to:
static/img/screenshots/chatbot-flows/action-blocks/http-call-headers.pngRequest body (POST, PUT, PATCH)
When sending data, choose the body format:
| Body type | Description |
|---|---|
| Raw JSON | Write the request body as JSON. Supports {{variables}}. A real-time JSON validator shows errors if the format is invalid. |
| Form Data | Add form fields as key-value pairs (similar to query parameters) |
Raw JSON example:
{
"name": "{{customer_name}}",
"email": "{{customer_email}}",
"order_id": "{{order_id}}"
}
Property names and string values must use double quotes ("") in JSON. The editor shows a validation error if the format is invalid.
Test HTTP Call
The configuration panel includes a Test HTTP Call button. Click it to send a real request and see the response right inside the builder — without activating the flow.
2. Click the "Test HTTP Call" button
3. Wait for the response
4. Capture the test response showing status, response body, and action buttons (Copy, Save as Sample, Clear)
Save to:
static/img/screenshots/chatbot-flows/action-blocks/http-call-test.pngAfter a successful test, you can:
- Copy the response to the clipboard
- Save as sample response — this makes the response fields available in the Expression Builder for other nodes, so you can easily map response data to variables
Use cases
- Order lookup — Customer provides an order number → GET request fetches order details → Next message shows the status
- CRM update — After qualifying a lead, POST the lead data to your CRM system
- Inventory check — GET request to check if a product is in stock before recommending it
- Payment verification — POST a payment reference number to verify with your payment gateway
- Appointment booking — POST appointment details to your scheduling system
You can use {{variables}} in the URL, headers, and body. For example: https://yoursite.com/api/orders/{{order_number}}
4. Contact & Lead Action
Performs operations on the customer's contact record. This is how your flow interacts with the Contacts, Leads, and Groups systems — assigning agents, adding tags, updating fields, and more.
2. Click it to open the configuration panel
3. Open the Action Type dropdown to show all 8 options
4. Capture the dropdown showing all action types with their icons
Save to:
static/img/screenshots/chatbot-flows/action-blocks/lead-action-type-dropdown.pngThere are 8 action types available:
| # | Action type | What it does |
|---|---|---|
| 1 | Assign Agent | Assign the conversation to a specific agent or use auto-assignment |
| 2 | Assign Tag | Add or remove tags from the contact |
| 3 | Assign Group | Add the contact to one or more groups |
| 4 | Update Status | Change the contact's pipeline status |
| 5 | Opt-Out | Opt the contact in or out of messages |
| 6 | Add Follow-Up | Schedule a follow-up task for this contact |
| 7 | Get Lead Details | Fetch the contact's data and save as variables |
| 8 | Update Contact | Update specific fields on the contact record |
Assign Agent
Assigns the conversation to a team member so they can take over or follow up.
2. Show the auto-assign checkbox unchecked with the agent selector dropdown visible
3. Capture the configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/assign-agent-config.png| Setting | Description |
|---|---|
| Use Auto-Assign | When checked, the system automatically picks the agent with the least active leads |
| Select Agent | When auto-assign is off, manually pick a specific agent from the dropdown |
Use cases:
- After qualifying a lead, assign to a specific sales agent
- Use auto-assign to distribute new inquiries evenly across your team
- Assign VIP customers to a senior support agent
Assign Tag
Adds or removes tags from the contact. Tags help you organize and categorize contacts for easy filtering and targeting.
2. Select "Add Tags" radio button
3. Open the tags dropdown and select 2-3 tags
4. Capture the configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/assign-tag-config.png| Setting | Description |
|---|---|
| Tag Action | Choose Add Tags or Remove Tags |
| Select Tags | Pick one or more tags from the dropdown (multi-select) |
Use cases:
- Add "Hot Lead" tag after a customer shows strong interest
- Add "Interested in Product A" tag based on the customer's choice
- Remove "New Customer" tag after completing the onboarding flow
Assign Group
Adds the contact to one or more groups. Groups are used for broadcast messaging and contact organization.
2. Open the groups dropdown and select 1-2 groups
3. Capture the configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/assign-group-config.png| Setting | Description |
|---|---|
| Select Groups | Pick one or more groups from the dropdown (multi-select) |
Use cases:
- Add contacts to a "VIP Customers" group for exclusive broadcasts
- Segment contacts into product-interest groups based on their flow responses
- Add contacts to a "Newsletter" group after they opt in
Update Status
Changes the contact's pipeline status. Use this to move contacts through your sales or support pipeline automatically.
2. Open the status dropdown to show color-coded status options
3. Capture the configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/update-status-config.png| Setting | Description |
|---|---|
| New Status | Select the new pipeline status from the dropdown. Statuses are color-coded for easy identification. |
Use cases:
- Move a lead to "Qualified" after they pass your qualification questions
- Set status to "Won" after a successful sale
- Update to "Follow Up Required" after collecting inquiry details
Opt-Out
Opts the contact in or out of messages. This applies to the contact's channel (WhatsApp, Messenger, or Instagram) and helps you comply with messaging regulations.
2. Show the Opt Out / Opt In radio buttons
3. Capture the configuration panel including the warning message
Save to:
static/img/screenshots/chatbot-flows/action-blocks/opt-out-config.png| Setting | Description |
|---|---|
| Opt-Out Action | Choose Opt Out (stop messages) or Opt In (allow messages) |
Opting a contact out prevents sending messages to them — including broadcasts and template messages. Only opt contacts out when they explicitly request it.
Use cases:
- Opt out contacts who select "Stop receiving messages" in your flow
- Opt in contacts who confirm they want to receive updates
Add Follow-Up
Schedules a follow-up task for the contact. Follow-ups appear in the contact's timeline and help your team track engagement.
2. Select a follow-up type
3. Pick a follow-up date
4. Add a comment with a variable like "Follow up on {{product_interest}}"
5. Capture the full configuration panel
Save to:
static/img/screenshots/chatbot-flows/action-blocks/add-followup-config.png| Setting | Description |
|---|---|
| Follow-Up Type | The channel for the follow-up: WhatsApp, Email, or Phone Call |
| Follow-Up Date | When the follow-up should happen (date picker) |
| Next Follow-Up Date | Optional — schedule the next follow-up after this one |
| Comments | Notes for the follow-up. Supports {{variables}} for dynamic values. |
Use cases:
- Schedule a "Phone Call" follow-up 3 days after a demo request
- Add a "WhatsApp" follow-up with notes about the customer's specific interest
- Create an "Email" follow-up to send a proposal after collecting requirements
Get Lead Details
Fetches the contact's information from the system and saves it as flow variables. You can then use these variables in messages, conditions, or other nodes.
2. Enter a session variable prefix like "lead"
3. Check the "Include Follow-Ups" checkbox
4. Capture the full configuration panel showing the prefix field, checkbox, variables info box, and test section
Save to:
static/img/screenshots/chatbot-flows/action-blocks/get-details-config.png| Setting | Description |
|---|---|
| Session Variable Prefix | The prefix for storing the contact's data (default: lead). Access data as {{lead.name}}, {{lead.email}}, etc. |
| Include Follow-Ups | When checked, also fetches the contact's follow-up history |
| Follow-Up Limit | Maximum number of follow-ups to fetch (1–50, default: 10). Only shown when "Include Follow-Ups" is checked. |
Available variables (using default prefix lead):
| Variable | Description |
|---|---|
{{lead.id}} | Contact's unique identifier |
{{lead.name}} | Contact name |
{{lead.email}} | Email address |
{{lead.phone}} | Phone number |
{{lead.company}} | Company name |
{{lead.status}} | Current pipeline status |
{{lead.source}} | Lead source |
{{lead.followups_count}} | Number of follow-ups (when included) |
{{lead.latest_followup_date}} | Most recent follow-up date (when included) |
Test Node
The configuration panel includes a Test Node section where you can test with real contact data:
- Select a test lead from the dropdown
- Click Test Node to fetch the actual data
- View the response structure
- Click Save as Sample Response to make these fields available in the Expression Builder for other nodes
Use cases:
- Fetch customer details before sending a personalized message
- Check the contact's current status before routing the conversation
- Get follow-up history to decide if a new follow-up is needed
Update Contact
Updates specific fields on the contact record. You can update both standard fields (name, email, company, etc.) and any custom fields you've created.
2. Click "Add Field" and select a standard field like "Name"
3. Set the value type to "Variable" and enter {{customer_name}}
4. Add another field (custom field) with a static value
5. Capture the full configuration panel showing field mappings and the summary box
Save to:
static/img/screenshots/chatbot-flows/action-blocks/update-contact-config.pngHow field mapping works
Each field mapping has three parts:
| Part | Description |
|---|---|
| Select Field | Choose from Standard Fields (Name, Email, Company, State, City, etc.) or Custom Fields (any fields you've created) |
| Value Type | Choose between Static Value (enter a fixed value) or Variable (use a flow variable or expression) |
| Value | The actual value to set — either typed directly or selected via the Expression Builder |
Value types
| Type | Description | When to use |
|---|---|---|
| Static Value | Enter a fixed value directly. For fields with predefined options (like State or Status), you'll see a dropdown to pick from. For boolean fields, you'll see a toggle switch. | When the value is always the same (e.g., set source to "Chatbot") |
| Variable | Use {{variable_name}} or the Expression Builder to set a dynamic value from the flow. | When the value comes from customer input or another node (e.g., set name to {{customer_name}}) |
Smart field features
- State → City linking — When you add both State and City fields, the City dropdown automatically loads cities for the selected state
- Options dialog — For fields with many options, click the list icon to open a searchable dialog showing all valid values
- Mobile number protection — The mobile number field cannot be updated for security reasons
Click Add Field to add more fields. The summary box at the bottom shows how many fields will be updated.
Use cases:
- Save collected information — After a Question node, update the contact's email, company name, or any custom field
- Auto-categorization — Set a custom "Interest" field based on the customer's menu selection
- Data enrichment — Update the contact's address from a form submission
- Source tracking — Set the lead source to "WhatsApp Chatbot" when the contact enters through a flow
Fields that have predefined options (like State, City, or custom dropdown fields) show a dropdown with valid values in Static mode. In Variable mode, you can click View Valid Values for Reference to see the expected values.
Quick reference
| Action type | Best for | Output |
|---|---|---|
| Condition | Simple yes/no decisions | 2 paths (TRUE / FALSE) |
| Router | Multi-way decisions with complex rules | Multiple paths + Default |
| HTTP Call | Connecting to external systems | Response saved as variables |
| Contact & Lead Action | Managing contact records | 8 sub-actions available |
| Script | Custom calculations and data transformation | Output saved as variables |
5. Script
Runs custom code to perform calculations, data transformations, or any logic that the other nodes can't handle. The Script node provides a full code editor with input/output variable management and validation.
2. Click it to open the configuration panel
3. Capture the panel showing the script preview, Edit Script button, input/output variable summary cards, and quick tips section
Save to:
static/img/screenshots/chatbot-flows/action-blocks/script-config.pngConfiguration panel
The Script configuration panel shows a summary view:
| Section | Description |
|---|---|
| Script Preview | A preview of your code with a line count. Shows the first few lines of the script. |
| Edit Script | Opens the full-screen Script Editor dialog |
| Input Variables | Shows which session variables are passed into the script |
| Output Variables | Shows which values the script returns to the flow |
Click Edit Script to open the full editor.
Script Editor
The Script Editor is a full-screen dialog with two panels:
2. The Script Editor dialog opens
3. Write a simple script with input and output variables
4. Capture the full dialog showing both panels
Save to:
static/img/screenshots/chatbot-flows/action-blocks/script-editor-dialog.pngLeft panel has 3 tabs:
| Tab | Description |
|---|---|
| Instructions | How-to guide with getting started steps, allowed operations, security restrictions, and an example script |
| Inputs | Define input variables — select session variables to pass into your script. Variables are auto-converted to camelCase (e.g., session.user_name becomes userName in the script). |
| Output Settings | Shows how return values are auto-saved. All keys from your return object are saved using the node name as a prefix (e.g., script_1.finalPrice). |
Right panel is a Monaco code editor (the same editor used in VS Code) where you write your script.
Input variables
To use data from the flow in your script:
- Go to the Inputs tab
- Click the code icon to select a session variable (e.g.,
session.order_total) - Click Add Input
- The variable is available in your script as a camelCase variable (e.g.,
orderTotal)
Output variables
Everything your script returns is automatically saved to the session:
// Node name: calculate_discount
return {
finalPrice: 800,
discountAmount: 200
};
// Auto-saved as:
// calculate_discount.finalPrice = 800
// calculate_discount.discountAmount = 200
Use these values in subsequent nodes as {{calculate_discount.finalPrice}} or {{calculate_discount.discountAmount}}.
Allowed operations
| Category | Examples |
|---|---|
| String manipulation | concat, split, replace, trim, toUpperCase, toLowerCase |
| Math operations | calculations, rounding, min/max, floor/ceil |
| Array methods | map, filter, reduce, find, sort, forEach |
| Object operations | keys, values, assign, entries |
| Date/Time | Date operations, formatting |
| JSON | JSON.parse, JSON.stringify |
Security restrictions
| Restriction | Description |
|---|---|
| No network requests | Cannot use fetch, XMLHttpRequest, or any HTTP calls |
| No file access | Cannot read or write files |
| No system access | Cannot access process, OS, or system information |
| Execution timeout | Maximum 5 seconds — scripts that run longer are terminated |
Validation
When you click Save Script, the system validates your code. If there are errors (syntax issues, forbidden operations), they're shown below the editor with specific error messages. Warnings are also shown for potential issues.
Example script
// Input: price (from session.price)
// Input: customerTier (from session.customer_tier)
const discountPercent =
customerTier === 'gold' ? 20 :
customerTier === 'silver' ? 10 : 0;
const discountAmount = (price * discountPercent) / 100;
const finalPrice = price - discountAmount;
return {
finalPrice,
discountAmount,
discountPercent,
message: `You saved ${discountAmount}!`
};
Use cases
- Price calculations — Compute discounts, taxes, shipping costs based on order details
- Data formatting — Format dates, phone numbers, currency values for messages
- Custom logic — Business rules too complex for Condition/Router nodes (e.g., tiered pricing, score calculations)
- Data transformation — Parse and restructure data from HTTP Call responses
- String operations — Build personalized messages by combining multiple variables
Scripts run in a secure, sandboxed environment. They can only work with the input variables you provide — they cannot access the internet, file system, or any external resource.