Gorgias logo
Gorgias logo

All articles

Create an action for AI AgentUpdated 2 days ago

Who can use this feature?

Owner, Admin and Lead roles
All plans with AI Agent
Can be used with Shopify stores connected to Gorgias

Actions let AI Agent handle requests from shoppers without a human stepping in — like cancelling an order, pausing a subscription, or updating a shipping address.

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

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 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 pre-built actions from your connected apps don't cover what you need. An action can contain multiple steps that run in an ordered sequence. Each step tells AI Agent what to do in a connected app, and steps can span more than one app.

  1. Open the dropdown menu in the top-left corner, then select AI Agent, then click Actions.
  2. Click Create action.
  3. Enter a name and description for the action.
  4. Click Add step , then select an app and choose what you want AI Agent to do. Add more steps as needed.
  5. Set conditions to control when the action should run (optional).
  6. Enable Customer confirmation to require the shopper to confirm before AI Agent runs the action (optional).
  7. Click Save and enable to finish.

Your new action appears in your library and can run automatically — AI Agent uses the action's name and description to decide when to use it. To control exactly when it runs, 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

Conditions set the criteria that must be met before an action runs. They give you precise control beyond the action's name and description — for example, only allowing an order cancellation when the order hasn't fulfilled yet, or only applying a discount when the order total exceeds a certain amount. Conditions are optional.

  1. In the Conditions section, open the dropdown and select one of the following options: No conditions required, All conditions met, Any condition is met.
  2. If you selected All conditions met or Any condition is met, click Add condition
  3. Choose one or more variables.
  4. Use operators like Is, Is not, Exists, Contains, Equals, and more to build the logic for your condition.
Example: For an Edit shipping address action, you could add: Fulfillment status (Order) Is not Fulfilled. This prevents the action from running on orders that have already shipped.

You can add as many conditions as you need. To remove one, click X next to it.

When you build an action condition, there are three groups of variables to choose from:

Variable typeDescription
Existing customerData from the shopper's customer profile, such as email address or customer tags
OrderData from the shopper's current Shopify order, such as fulfillment status or order total
InputsData the action collects from the shopper during the conversation. Only available when your steps include input fields — for example, the new address fields from an Edit shipping address step.

Customer confirmation

Customer confirmation is a toggle in the action creation flow that adds a checkpoint before AI Agent completes an action. When turned on, AI Agent asks the shopper to approve before proceeding. If the shopper declines, the action doesn't run.

For actions with irreversible outcomes, like canceling an order or skipping a subscription, Customer confirmation is turned on automatically. You can also enable it manually for any action where you want explicit shopper consent before AI Agent acts. To turn it off, you'll need to confirm you understand the action will run without asking the shopper first.


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.

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:


Test your action

You can test an action to confirm that it runs correctly and completes its steps as expected before using it in real conversations. 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.
Note: Actions in test conversations use real data from your connected apps. Use a test customer profile to avoid making unintended changes to real orders or subscriptions.

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.

  1. From the main menu, select AI Agent, then click Skills to go to your skills, or click Knowledge to go to your guidance.
  2. Select the skill or guidance you want to add the action to.
  3. In the editor, select Actions, then choose the action you want to add to the skill or guidance's instructions.


Was this article helpful?
Yes
No