Skip to main content

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 typeWhat it does
1ConditionChecks a single expression → routes to TRUE or FALSE
2RouterChecks multiple conditions → routes to multiple paths
3HTTP CallCalls an external system to fetch or send data
4Contact & Lead ActionManages contact records (assign agent, add tag, update fields, etc.)
5ScriptRuns 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.

📸
Screenshot: Condition node configuration showing the expression field with variable support and example expressions
condition-config.png
1. Add a Condition node to the canvas
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.png

Configuration

SettingDescription
Condition ExpressionThe 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

ExpressionWhat it checks
{{customer_age}} >= 18Customer is an adult
{{order_total}} > 1000Order 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.

📸
Screenshot: Router configuration showing multiple paths with condition groups, rules with variable/operator/value fields, path labels, and default path section
router-config.png
1. Add a Router node to the canvas
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.png

Configuration

Each Router consists of:

ComponentDescription
PathsMultiple routing paths, each with a label and conditions. Click Add Path to create more.
Default PathWhere to route the conversation if no path's conditions match (optional fallback)

Anatomy of a path

Each path contains these elements:

ElementDescription
Path LabelA descriptive name (e.g., "VIP Customer", "New User", "Sales Inquiry")
Condition GroupsOne or more groups of rules. Multiple groups are combined with OR logic.
RulesIndividual conditions within a group. Each rule has a Variable, Operator, and Value.
Group LogicWithin a group, rules are combined with either AND (all must match) or OR (any can match)
Route ToShows 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

OperatorWhat it checksRequires value
EqualsExact matchYes
Not EqualsDoes not matchYes
ContainsText includes the value (case-insensitive)Yes
Not ContainsText does not include the valueYes
Starts WithText begins with the valueYes
Ends WithText ends with the valueYes
Greater ThanNumber is largerYes
Less ThanNumber is smallerYes
Greater or EqualNumber is equal or largerYes
Less or EqualNumber is equal or smallerYes
Is EmptyVariable has no valueNo
Is Not EmptyVariable has a valueNo

How evaluation works

         ┌──────────────────────┐
│ Router │
└──┬──┬──┬──┬──────────┘
│ │ │ │
[Path 1][Path 2][Path 3][Default]
Sales Support Billing General
│ │ │ │
▼ ▼ ▼ ▼
...different flows...
  1. The system checks Path 1 conditions first
  2. If Path 1 matches → route there and stop
  3. If not, check Path 2, then Path 3, and so on
  4. 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
📸
Screenshot: Close-up of a single Router path showing condition groups with AND/OR logic, rules with variable, operator, and value fields
router-path-conditions.png
1. In the Router configuration, expand a path that has multiple condition groups
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.png

Use 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.

📸
Screenshot: HTTP Call configuration showing method selector, URL field with variable support, and headers section
http-call-config.png
1. Add an HTTP Call node to the canvas
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.png

Configuration

SettingDescription
HTTP MethodThe type of request: GET, POST, PUT, DELETE, or PATCH
URLThe web address to call. Supports {{variables}} for dynamic values.
Query ParametersURL parameters (shown only for GET requests). Add key-value pairs.
HeadersAdditional request headers like Content-Type and Authorization
BodyRequest 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 headersDescription
Content-TypeThe format of the data you're sending (e.g., application/json)
AuthorizationAuthentication token or credentials
AcceptThe format you want the response in
X-API-KeyAPI key for authentication
X-Auth-TokenAuthentication token
Cache-ControlCaching preferences
CustomEnter any custom header name manually

Header values support variables — for example, set the Authorization header to Bearer {{api_token}}.

📸
Screenshot: HTTP Call headers section showing common header dropdown, custom header input, and Content-Type value selection
http-call-headers.png
1. In the HTTP Call configuration, click the + button next to Headers
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.png

Request body (POST, PUT, PATCH)

When sending data, choose the body format:

Body typeDescription
Raw JSONWrite the request body as JSON. Supports {{variables}}. A real-time JSON validator shows errors if the format is invalid.
Form DataAdd form fields as key-value pairs (similar to query parameters)

Raw JSON example:

{
"name": "{{customer_name}}",
"email": "{{customer_email}}",
"order_id": "{{order_id}}"
}
tip

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.

📸
Screenshot: HTTP Call test section showing the Test button, response status (Success/Failed), response body, and Save as Sample Response button
http-call-test.png
1. Configure an HTTP Call with a valid URL
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.png

After 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
Using variables in URLs

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.

📸
Screenshot: Contact & Lead Action configuration showing the action type dropdown with all 8 action types: Assign Agent, Assign Tag, Assign Group, Update Status, WhatsApp Opt-Out, Add Follow-Up, Get Lead Details, Update Contact
lead-action-type-dropdown.png
1. Add a Contact & Lead Action node to the canvas
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.png

There are 8 action types available:

#Action typeWhat it does
1Assign AgentAssign the conversation to a specific agent or use auto-assignment
2Assign TagAdd or remove tags from the contact
3Assign GroupAdd the contact to one or more groups
4Update StatusChange the contact's pipeline status
5Opt-OutOpt the contact in or out of messages
6Add Follow-UpSchedule a follow-up task for this contact
7Get Lead DetailsFetch the contact's data and save as variables
8Update ContactUpdate specific fields on the contact record

Assign Agent

Assigns the conversation to a team member so they can take over or follow up.

📸
Screenshot: Assign Agent configuration showing auto-assign checkbox and agent selector dropdown
assign-agent-config.png
1. Select "Assign Agent" as the action type
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
SettingDescription
Use Auto-AssignWhen checked, the system automatically picks the agent with the least active leads
Select AgentWhen 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.

📸
Screenshot: Assign Tag configuration showing Add/Remove radio buttons and multi-select tag dropdown
assign-tag-config.png
1. Select "Assign Tag" as the action type
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
SettingDescription
Tag ActionChoose Add Tags or Remove Tags
Select TagsPick 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.

📸
Screenshot: Assign Group configuration showing multi-select group dropdown
assign-group-config.png
1. Select "Assign Group" as the action type
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
SettingDescription
Select GroupsPick 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.

📸
Screenshot: Update Status configuration showing status dropdown with color-coded options
update-status-config.png
1. Select "Update Status" as the action type
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
SettingDescription
New StatusSelect 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.

📸
Screenshot: Opt-Out configuration showing Opt Out / Opt In radio buttons and warning message
opt-out-config.png
1. Select "Opt-Out" as the action type
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
SettingDescription
Opt-Out ActionChoose Opt Out (stop messages) or Opt In (allow messages)
warning

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.

📸
Screenshot: Add Follow-Up configuration showing follow-up type dropdown, date pickers for follow-up date and next follow-up date, and comments field
add-followup-config.png
1. Select "Add Follow-Up" as the action type
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
SettingDescription
Follow-Up TypeThe channel for the follow-up: WhatsApp, Email, or Phone Call
Follow-Up DateWhen the follow-up should happen (date picker)
Next Follow-Up DateOptional — schedule the next follow-up after this one
CommentsNotes 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.

📸
Screenshot: Get Lead Details configuration showing session variable prefix field, include follow-ups checkbox, available variables list, and test section with lead selector
get-details-config.png
1. Select "Get Lead Details" as the action type
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
SettingDescription
Session Variable PrefixThe prefix for storing the contact's data (default: lead). Access data as {{lead.name}}, {{lead.email}}, etc.
Include Follow-UpsWhen checked, also fetches the contact's follow-up history
Follow-Up LimitMaximum number of follow-ups to fetch (1–50, default: 10). Only shown when "Include Follow-Ups" is checked.

Available variables (using default prefix lead):

VariableDescription
{{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:

  1. Select a test lead from the dropdown
  2. Click Test Node to fetch the actual data
  3. View the response structure
  4. 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.

📸
Screenshot: Update Contact configuration showing field mappings with field selector (Standard and Custom Fields groups), value type toggle (Static/Variable), and Add Field button
update-contact-config.png
1. Select "Update Contact" as the action type
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.png

How field mapping works

Each field mapping has three parts:

PartDescription
Select FieldChoose from Standard Fields (Name, Email, Company, State, City, etc.) or Custom Fields (any fields you've created)
Value TypeChoose between Static Value (enter a fixed value) or Variable (use a flow variable or expression)
ValueThe actual value to set — either typed directly or selected via the Expression Builder

Value types

TypeDescriptionWhen to use
Static ValueEnter 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")
VariableUse {{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
info

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 typeBest forOutput
ConditionSimple yes/no decisions2 paths (TRUE / FALSE)
RouterMulti-way decisions with complex rulesMultiple paths + Default
HTTP CallConnecting to external systemsResponse saved as variables
Contact & Lead ActionManaging contact records8 sub-actions available
ScriptCustom calculations and data transformationOutput 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.

📸
Screenshot: Script node configuration panel showing script preview with line count, Edit Script button, input/output variable summary cards, and quick tips
script-config.png
1. Add a Script node to the canvas
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.png

Configuration panel

The Script configuration panel shows a summary view:

SectionDescription
Script PreviewA preview of your code with a line count. Shows the first few lines of the script.
Edit ScriptOpens the full-screen Script Editor dialog
Input VariablesShows which session variables are passed into the script
Output VariablesShows 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:

📸
Screenshot: Script Editor dialog showing the split layout — left panel with Instructions, Inputs, and Output Settings tabs; right panel with Monaco code editor
script-editor-dialog.png
1. Click "Edit Script" on a Script node
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.png

Left panel has 3 tabs:

TabDescription
InstructionsHow-to guide with getting started steps, allowed operations, security restrictions, and an example script
InputsDefine 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 SettingsShows 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:

  1. Go to the Inputs tab
  2. Click the code icon to select a session variable (e.g., session.order_total)
  3. Click Add Input
  4. 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

CategoryExamples
String manipulationconcat, split, replace, trim, toUpperCase, toLowerCase
Math operationscalculations, rounding, min/max, floor/ceil
Array methodsmap, filter, reduce, find, sort, forEach
Object operationskeys, values, assign, entries
Date/TimeDate operations, formatting
JSONJSON.parse, JSON.stringify

Security restrictions

RestrictionDescription
No network requestsCannot use fetch, XMLHttpRequest, or any HTTP calls
No file accessCannot read or write files
No system accessCannot access process, OS, or system information
Execution timeoutMaximum 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
info

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.