Actions
Let the AI agent act in your systems and do anything they allow, from a refund to a plan change.
An action is how the AI agent does things in your systems. Because an action can be any code, the AI agent can do anything your systems allow: refund an order, update a policy, book a technician. That is the difference between "I'll pass this to the team" and "Done, your new address is saved."
What you can do
If your team can do it in one of your systems, the AI agent can do it with an action. A few examples:
| Business | Example actions |
|---|---|
| Retail and brands | Look up an order and its tracking, change the delivery address, cancel an unshipped order, start a return |
| Subscriptions | Pause, skip or cancel a subscription, move the next delivery date, apply the retention offer your rules allow |
| Insurance | Report a claim's status, check what a policy covers, resend policy documents, record a new claim |
| Telecom | Check a data balance or a SIM's activation, change a plan, check for an outage at an address, book a technician |
| B2B and services | Look up an invoice or an account balance, create a quote as a PDF, open a ticket in your CRM or ERP |
| Marketplaces and platforms | Check a payout, restore a member's access, look up an order across sellers |
| Any business | Tag and route the conversation, notify a team channel, email a supplier, save details for reporting |
One action can also do several things in order. A refund action can find the order in your store, apply your 30-day rule, issue the refund in your payment system and log it in a spreadsheet, all in one step. The AI agent gets back only what the action returns.
Any system, even without an API
- Anything with an API. Order systems, CRMs, ERPs, billing, policy and booking systems, and internal tools. Python actions read API keys and passwords from an encrypted secret store, so credentials stay out of the code.
- Websites with no API. Browser automation signs in to a portal or back office and makes the clicks a person would. It checks the page before and after every step, and stops instead of guessing when something looks different.
- Databases and spreadsheets. An action can run read-only queries against a SQL Server database, and read and update Google Sheets.
- Platforms you connected in Octocom. For Shopify, Stripe, Recharge and other connected platforms, actions call the platform's own API through the connection you already set up.
- Systems that only accept known IP addresses. Requests can come from a fixed Octocom IP address that you add to the system's allowlist.
See Connect any system for the full picture.
Set it up
Describe what the action should do, which system it talks to and when the AI agent may use it. Copilot or your own AI agent builds the action, tests it against your system, adds it to the right workflow and runs a test conversation to check the result.
Connect our order system's API so the AI agent can look up an order by order number and email. If the order hasn't shipped, let it cancel the order once the customer confirms. Test it on one of our test orders first.
Our claims portal has no API. Teach the AI agent to look up a claim's status there by claim number, and use it in our claim status workflow.
When Copilot learns a website's steps with you, you approve each click and form entry. Connect a system that has no API walks through it. For complex or high-stakes integrations, Octocom's solution engineers can review the actions and test them with you.
To build an action yourself, go to Settings -> Automation -> Custom Actions. An action is shared by all businesses in your organization by default, or you can limit it to specific ones.
How actions work
Actions are switched on inside workflows
An action does nothing until a workflow includes it. Each workflow lists the actions the AI agent may use in that situation, under Available Actions in the workflow editor, chosen per variant. The workflow's instructions say when to call each one:
- Ask for the order number and the email address used for the order.
- Call
lookupOrderwith both.- If the order has not shipped, summarize the cancellation and ask the customer to confirm.
- After they confirm, call
cancelOrder.- If the order has shipped, explain the return process instead.
This ties every action to the situation and the steps it was built for. A refund action included only in your refund workflow is only offered there, together with that workflow's eligibility checks. Instructions in a bot rule or an article cannot switch an action on. How the AI agent works explains when a workflow's actions become available during a conversation.
Three ways to reach your systems
- API actions call one endpoint of your system's API, with values the AI agent fills in, such as an order number. No code is involved.
- Python actions, called Code Action in the dashboard, run general-purpose Python. One action can call several systems, check eligibility and return only what matters.
- Browser automation lets a Python action work in a website or back office that has no usable API.
Built-in and custom actions
Some capabilities are built in and need no setup: searching your knowledge base and products, reading files the customer attaches, and handing the conversation to your team. Some connected platforms add built-in actions of their own. Everything specific to your business is a custom action: you create it once and can use it in any workflow.
Confirmation and human approval
Actions that change something, such as a cancellation, a refund or a plan change, deserve care. You decide how much a person is involved, from the customer's yes to a teammate's sign-off.
- Ask the customer first. Write a confirmation step into the workflow, as in the example above. The AI agent summarizes exactly what will happen and acts only after the customer agrees. In web chat with widget elements on, it shows a card with two buttons, such as Yes, cancel it and No, keep it. On other channels it asks in text.
- Enforce the rules in the action itself. Instructions guide the AI agent. Code enforces. When something must hold every time, such as "the order must belong to this email address" or "refunds only within 30 days", the action checks it and refuses otherwise. See Customer authentication.
- Ask your team to decide. For a policy exception or a review of damage photos, an action can send a decision request to your team. The AI agent keeps the conversation and continues once someone answers. See Human-in-the-loop decisions.
- Review email replies. With AI reply approval, an agent approves each AI email reply before it is sent. The AI agent runs its actions while it drafts, so approval covers the reply, not the action. Use a decision request when a person must approve the change itself.
- Check replies automatically. Bot QA can flag a reply that, for example, confirms a refund no action actually made. On supported channels it can stop the reply and hand the conversation to your team.
When a customer asks for a refund over 200 euros, send the request to our team for approval first. Keep the conversation with the AI agent, and issue the refund only after someone approves.
Whatever an action returns, the AI agent can read and may repeat to the customer. Return only what the customer is allowed to see.
Test actions
- Test the action on its own. Open it and use Test Action with sample inputs, or ask Copilot to test it. The test makes the real request, so use test records when the action changes data.
- Test it in a conversation. Run a test conversation that goes through the workflow, including the paths where the order isn't found or the customer declines. See Test your AI agent.
- Check what happened. The debug view of any AI reply shows which actions ran, with their inputs and results. See How the AI agent works.
Actions keep a version history, so you can restore an earlier version if a change misbehaves.
For developers and AI agents
Custom actions is the technical contract: naming, arguments, API action configuration, the Python execute_action function, timeouts, testing and security. Related references:
- Python helpers: built-in functions for orders, messages, sheets, credentials and more.
- Chat UI from actions: cards, confirmations and quick replies in web chat.
- Browser automation: guarded website steps for systems without an API.
- Secrets: credentials your code reads at runtime.
- Condition providers: code that picks a workflow variant from live data.
- Integration patterns: how the building blocks combine.