Create an action for AI AgentUpdated 2 hours ago
Who can use this feature?
Actions let AI Agent work in your connected apps on behalf of shoppers — like cancelling an order, pausing a subscription, or updating a shipping address — without a human stepping in.
Your actions library is the central place to view, manage, and create actions. Actions can be added to your library in two ways:
- When you connect an app from the App Store, every available action for that app appears in your actions library automatically, ready for you to use.
- You can also create your own action, combining steps from one or more of your connected apps.
To put an action to work, add it to a skill's instructions. That's what tells AI Agent when and how to use it. You can also add actions to guidance.
In this article, you'll learn:
- Get actions from a connected app
- Create your own action
- Connect an app during setup
- Test your action
- Add the action to a skill or guidance
Get actions from a connected app
When you connect an app in the App Store, every available action for that app appears in your library automatically. These actions are pre-built for common tasks. For example, connecting Shopify adds actions like Cancel order and Edit shipping address.
To see your library, open the dropdown menu in the top-left corner, select AI Agent, then click Actions.
To use any of these actions right away, add them to a skill. You can also add them to guidance.
You can use actions from your connected app as-is, or select one to customize it first: add more steps, set conditions, or rename it. For a full overview of what you can do from the library, see manage your actions.
Create your own action
You can create your own action when the actions already available from your connected apps don't cover what you need. You choose which connected app's steps to include, and you can combine steps from more than one app in a single action.
- Open the dropdown menu in the top-left corner, then select AI Agent, then click Actions.
- Click Create action.
- Enter a name and description for the action.
- Set conditions to control when the action should run (optional).
- Click Continue.
- Click Add step , then select an app and choose what you want AI Agent to do.
- Add more steps as needed, then click Save.
Your new action appears in your library and can run automatically based on AI Agent's own judgment. To put it in the right context and control exactly when it's used, add it to a skill.
Action name and description
Your action name and description aren't shopper-facing, but both help AI Agent decide when to use the action. This is especially important for actions that run automatically, where the name and description are the primary signals AI Agent uses to determine whether the action applies to a shopper's request.
Use a name that clearly describes what the action does, like "Cancel Shopify order" or "Pause Recharge subscription." For the description, be as specific as possible. A good description covers:
- When to use it — the scenario or shopper request that applies
- When not to use it — any limits or exceptions (for example, only for orders that haven't shipped)
Example: "Use this action when a shopper asks to cancel an order. Only applies to orders that haven't shipped yet."
Adding the action to a skill puts it directly in the instructions where it should run — that's what gives you precise control over when it's used. See add the action to a skill or guidance.
Conditions and customer confirmation
Conditions set the criteria that must be met for an action to run — for example, only cancelling a shopper's order if it hasn't shipped, or only applying a discount when the order total exceeds a certain amount. Conditions are optional.
Start by selecting a requirement from the dropdown menu:
- No conditions required — the action runs based on instructions alone
- All conditions met — every condition must be true for the action to run
- Any condition is met — the action runs if at least one condition is true
Click + Add condition and select a variable to check. Variables are grouped by category: Existing customer, Order, and Inputs (step-specific fields like address lines or zip code, which appear when the steps you've added collect that data). Use operators like Is, Is not, Contains, or Exists to define the logic. You can add multiple conditions.
For actions with irreversible outcomes, like canceling an order or skipping a subscription, Require customer confirmation is turned on automatically. When enabled, AI Agent asks the shopper to confirm before completing the action. You can also enable this manually for any action where you want explicit shopper consent.
Steps
Each step tells AI Agent what to do in a connected app. An action can include steps from more than one connected app. AI Agent performs steps in order, from top to bottom.
After clicking Add step , you have three options:
- My apps — select an app you've already connected to Gorgias, then choose what you want AI Agent to do. For example, with Shopify you might choose Cancel order or Update shipping address.
- More apps — select an app that isn't connected yet. You'll be prompted to connect it before continuing. Once connected, all available actions for that app appear in your library automatically.
- Build advanced action — use this when the available steps don't cover your use case. The advanced editor lets you make HTTP requests to any third-party API, collect information from shoppers as variables, and build conditional branching logic. Requires familiarity with HTTP requests. See create an action using the advanced editor.
To reorder steps, drag the handle next to a step. To remove a step, click the X icon next to it.
Connect an app during setup
If the app you select isn't connected to Gorgias yet, you'll need to authenticate before you can continue. Follow the prompts for the app you selected to complete the connection.
What authentication looks like depends on the app. Some apps ask you to sign in and grant Gorgias access directly. Others require an API key, token, or secret — a credential you copy from the app and paste into Gorgias.
How you get an API key, token, or secret varies by app. In some apps, an admin can obtain it from the app's settings. In others, you may need to contact the app's support team to request one. Check the app's own documentation to understand where to find the key, token or secret that's required to authenticate the app.
The following list contains instructions on how to authenticate for some common apps. If your app isn't listed, check its documentation or contact their support team for help:
- Shopify
- Recharge subscriptions
- Skio subscriptions
- Loop Subscriptions
- Loop Returns — portal link
- Loop Returns — return shipping status
- ShipStation
- ShipBob
- ShipHero
- ShipMonk
Test your action
You can test an action to confirm that it runs correctly and completes its steps as expected before using in real conversation. You can start a test conversation by selecting Test from the action library or from AI Agent's dedicated test page (from the main menu go to AI Agent > Test).
To test an action properly, the action should be added to a skill or guidance's instructions:
- Actions installed from a connected app can only run when added to a skill or guidance — adding them is required before testing.
- Actions that you create can run automatically without a skill or guidance, but adding them to a skill may improve AI Agent's success rate.
Add actions to a skill or guidance
Some actions you create can run without being added to a skill or guidance — in your library, these show Runs automatically in the Used in AI Agent column. AI Agent can determine when to use these actions based on their relevance, matching the action's name and description to a shopper's request.
Adding the action to a skill is the recommended approach. It places the action within the skill's instructions rather than leaving the decision to AI Agent's judgment — giving you precise control over when it runs, and improving AI Agent's success rate. You can also add actions to guidance.
- From the main menu, select ✦ AI Agent. Click Skills to go to your skills, or click Knowledge to go to your guidance.
- Select the skill or guidance you want to add the action to.
- In the editor, select Actions, then choose the action you want to add to the skill or guidance's instructions.
Related articles
- Manage your actions — enable, disable, edit, or delete actions in your library
- Create an action using the advanced editor — build actions using custom API calls
- View event logs for AI Agent actions — check what actions ran and troubleshoot failures