Who can use this?Actions let the agent do a job during a chat: hand the conversation to your team, check the current time, look up an order in your system, or calculate a price.
- Owners and Admins. Custom roles with Can build and deploy Agents or Can manage Agents.
- Configure actions on the agent’s Actions tab, then mention them in Role, Goal, or Instructions with @.
Type @ in Role, Goal, or Instructions on Home to insert an action. For custom actions, you pick the action name you created (for example,
@check_order_status), not @apiCall.Plan Availability
Two kinds of actions
- System actions. Built in. They already sit under System Actions on the Actions tab: assignTo, getCurrentDateTime, and checkInstagramUserFollow.
- My Actions (custom). You build these yourself under My Actions by clicking Create Action: API Call and Code Execution.
If your agent uses API Call, choose Balanced or Advance in Settings → AI model & credit usage. Those models are built to handle custom APIs.
assignTo
Hands the conversation to a teammate, a team, or a bot.- On Home, type @assignTo in Instructions.
- A picker opens right there. Select the user, team, or bot.
- Gallabox inserts a tag for that target (for example,
@assign_to_sales_team).
“If the customer asks about billing, refunds, or invoices, use @assign_to_billing_team.”
getCurrentDateTime
Gives the agent today’s date and current time (in your account’s timezone and UTC). Use it when the agent needs to check business hours or booking dates.“Use @getCurrentDateTime when customers ask if we are open right now.”No setup needed.
checkInstagramUserFollow
Instagram only. Checks whether the person chatting follows your connected Instagram account.“If the customer says they followed our page, use @checkInstagramUserFollow before giving the 10% discount code.”
API Call
Connects the agent to your own website, store, or CRM during a chat. Available on Essential and Advanced. Use it in two ways:- Look up information and reply with it (check an order status, check stock, look up an account).
- Send information out to another tool (save a new lead in your CRM).
Step 1: Create the API Call action
- Open your agent and go to the Actions tab.
- Under My Actions, click Create Action.
- Fill in the top bar:
- Action name: give it a clear name, such as
check_order_status. Spaces turn into underscores automatically. - Action Type: select API Call.
- Process in background:
- Turn this OFF if the agent needs the API answer before replying to the customer (for example, checking an order status).
- Leave it ON only when the agent is sending data out and does not need to wait for an answer (for example, logging a lead).
- Action description: write in plain English what this action does and when the AI should use it. Example: Fetches order status and delivery date using the customer’s order number.
- Action name: give it a clear name, such as
Step 2: Add your API link and details
- Pick the Method Type (
GETto fetch data,POSTto send data,PUT,PATCH, orDELETE). - Enter the Request URL.
{{like_this}}. You can use {{variables}} in the Request URL, Headers, Query Params, Params (path parameters), or Body.
Example Request URL:
{{order_id}}, it appears on the right under Variable Configuration. Fill in:
- Type:
String(text),Number, orBoolean(true/false). - Description: tell the AI what to ask the customer for. Example: The order number shared by the customer.
Step 3: Set authentication and body (if needed)
- Headers tab:
- If you already connected the app in Gallabox (such as HubSpot, Zoho, Shopify, or Razorpay), pick it under Authentication and choose your saved connection under Select connection (or click Add New Connection).
- For any other tool, leave Authentication as
Noneand add your API key under Header (for example, KeyAuthorizationand ValueBearer your_api_key).
- Body tab (shown for
POST,PUT,PATCH, andDELETE):- Choose
json,www-form-urlencoded, orform-data. - You can put
{{variables}}inside the body too, and describe them under Variable Configuration.
- Choose
Step 4: Mention it in Instructions
Go to Home → Instructions, type @, and pick the action name you just saved:“When a customer asks where their order is, ask for their order number, then run @check_order_status and share the status and delivery date.”
Code Execution
Runs a small JavaScript snippet during the chat. Use this when the agent needs exact math, date checks, or text formatting that you do not want the AI guessing on its own (such as shipping rates, EMI math, or pincode checks).Do you need to know how to code? Only for the short calculation box. If you do not write JavaScript, paste what you want into ChatGPT or Claude (for example: “Write a JavaScript function
execute(inputs) that takes inputs.weight and returns { shipping_cost: weight * 50 }”), then paste that snippet here.How to set up Code Execution
- Go to Actions → Create Action.
- Set Action name (for example,
calculate_shipping) and pick Action Type → Code Execution. - Turn OFF Process in background if the agent needs the result to reply to the customer.
- Write a clear Action description (for example, Calculates shipping cost from weight in kg).
- Under Function Parameters (Input Schema), click Add Parameter for each value the code needs:
- Field Name: the name used in the code (for example,
weight). - Data Type:
String,Number, orBoolean. - Value Source: pick AI Provided if the agent should get this from the customer’s chat. Pick Static value if it never changes (like a fixed tax rate).
- Description: explain what the AI should collect (for example, Package weight in kg).
- Field Name: the name used in the code (for example,
- In Code Editor (JavaScript), write your logic inside
function execute(inputs)and return an object: - Under Output Schema, click Add Property and list every field your code returns (in the example above, Property Name
shipping_cost, Data TypeNumber). The AI only reads fields listed in Output Schema. - Click ► Test Run, enter a sample number, and click Run to check the output before saving. If you see an Extra fields detected warning, add those missing field names to Output Schema.
- Click Save, then mention
@calculate_shippingin Home → Instructions.
FAQs
The agent ran my API Call or Code Execution, why didn't it use the answer in its reply?
The agent ran my API Call or Code Execution, why didn't it use the answer in its reply?
Check Process in background on the action:
- When Process in background is ON (the default), Gallabox runs the action in the background and does not wait for the response. The agent replies right away without the data.
- Open the action, turn Process in background OFF, and click Save.
How does the agent know what to ask the customer before calling my API?
How does the agent know what to ask the customer before calling my API?
From the
{{variables}} you add in the API form. When you type {{order_id}} in the URL, query params, headers, or body, it appears under Variable Configuration on the right. Write a clear Description there (such as The customer’s 6-digit order number). The agent reads that description and asks the customer for it if they haven’t shared it yet.The @assignTo action is not working. What do I check?
The @assignTo action is not working. What do I check?
- Is this a Web Chat agent? If yes, that is expected. Use a WhatsApp handoff.
- Did you pick the user, team, or bot from the @assignTo menu on Home? Typing plain text without selecting from the
@menu will not trigger the handoff. - Is the instruction specific enough? “Use @assign_to_billing_team when the customer asks for a refund or invoice” works better than “use @assign_to_billing_team for billing.”
Can I use more than one action in the same conversation?
Can I use more than one action in the same conversation?
Yes. Example:
“If the customer confirms the order, use @check_order_status to fetch the details, then use @assign_to_fulfillment_team to hand over the chat.”The agent runs them in order.
What happens if the API Call fails?
What happens if the API Call fails?
The agent sees that the call failed and still replies to the customer. Tell it what to say in Instructions:
“If @check_order_status fails, say: ‘I can’t check that order right now. Let me connect you with our team’ and use @assign_to_support_team.”