Gorgias logo
Gorgias logo

All articles

Create an Action to connect AI Agent to other appsUpdated 8 days ago

An Action is a series of tasks that AI Agent performs on your behalf in multiple connected apps.

Typically, requests from shoppers require your agents to make changes in one or more separate tools, like Shopify, a 3rd-party logistics platform, or your subscription portal. Instead, you can use Actions to connect AI Agent to your ecommerce apps so that it can autonomously and fully resolve common requests — like editing orders, managing subscriptions, and more.

To get started, choose from Gorgias’s library of templates that address the most common customer questions.


Requirements

Create an Action

An Action consists of one or more steps that AI Agent needs to perform in your connected apps in order to complete a specific task.

To create an Action for AI Agent, start by using Gorgias’s library of templates. Templates are based upon common requests from shoppers that AI Agent can automatically resolve, like cancelling an order or editing a shipping address.

When you use a template, your new Action includes default conditions and settings that we recommend to achieve the best outcome. You can edit or remove these defaults in the editor.

Alternatively, you can create a custom Action from scratch. Learn more about using the editor to build custom Actions.

  1. From the main menu, go to Automate
  2. Select your store from the sidebar, then click on AI Agent
  3. In the Actions tab, select Create from Template
  4. Select a template based on the task you want to automate (for example, cancel an order)
  5. Select the apps that you need for AI Agent to perform the Action, then select Continue

  6. Select Create and Enable to finish

Gorgias interface showing the ‘AI Agent’ section under the ‘Actions’ tab. The page header prompts users to ‘Choose a template and customize it to fit your needs.’ Several action templates are displayed, including ‘Cancel order,’ ‘Send return portal deeplink,’ ‘Remove item,’ and ‘Replace item’. A blue ‘Create From Template’ button is highlighted in the top-right corner.

Use the editor to build and customize your Actions

With the Action editor, you can further customize Actions that you started with a template, or build a custom Action from scratch.

If you started an Action from a template, you may need to use the editor to complete some set up, like authenticate your apps or add missing values.

To open the Actions editor:

  1. Go to Automate from the main menu
  2. Select your store from the sidebar, then click on AI Agent
  3. Select an existing Action or click on Create Custom Action to open the editor

Gorgias interface showing the ‘AI Agent’ section under the ‘Actions’ tab. The page includes a header with options to ‘Create Custom Action’ (highlighted) and ‘Create From Template.’

Action name and description

Give your Action a name and description.

  • Your Action name helps you organize Actions in your library and understand their purpose. Your Action name is not shopper-facing.
  • Your description tells AI Agent about the Action and what it does. Be as descriptive as possible. AI Agent uses the description to identify whether the Action is applicable to a shopper’s request. Here are a few examples:

    • Describe when an Action should be used→ “cancellation only applies to orders that have not shipped yet. If a customer requests a cancellation after the order has shipped, we should tell them how to request a return once the package arrives.”

    • Clarify what an Action does not do to distinguish it from similar Actions → “use this Action to cancel orders for customers who want to cancel a single, recent order. This Action does not apply to active subscriptions.”
    • Explain what it sounds like when customers ask for this Acton → “our subscription package is called Monthly Munchies, so apply this Action if someone asks to stop their Monthly Munchies”.

Conditions

Use conditions to tell AI Agent the specific circumstances when your Action should be used. For example, to comply with your return policy, you may want to create a condition to make sure that AI Agent only offers a return for orders with a date less than 30 days ago.

  • Select one of three options to indicate what, if any, conditions must be met for AI Agent to perform the Action:

    • No conditions
    • All conditions
    • At least 1 conditions
  • Select Add Conditions to insert a new condition. You can create conditions based on:

    • information from Shopify about the Customer (including customer ID, name, email, phone number, and tags)
    • Information from Shopify about the customer’s order (including billing and shipping address, order amount, tags, and more)
    • Information from some apps that you include in your Action steps

      • For example, steps that Edit shipping address require AI Agent to ask the shopper for their new address. You can use info like the shopper’s street, city, or state as conditions for the Action
  • If necessary, select the checkbox to Require customer confirmation

    • When selected, AI Agent must receive positive consent from the shopper before performing the Action
    • Require customer confirmation is optional, except for Actions that include steps with irreversible or consequential outcomes, like cancelling an order, editing an address, and cancelling or skipping a subscription. The setting is automatically enabled in these cases.
  • Some conditions are automatically applied based on the steps you’ve added to the Action. For example, if you add a step to Edit shipping address, AI Agent should make sure that the order’s fulfillment status is unfilled before making changes. You can edit or remove these default conditions as needed.

Gorgias interface displaying the ‘AI Agent’ section under the ‘Actions’ tab. The page is focused on configuring the ‘Cancel order’ action. The ‘Action conditions’ section offers options: ‘No conditions required,’ ‘All conditions are met’ (selected), and ‘At least 1 condition met.’ An ‘Add Condition’ dropdown is highlighted. A checkbox for ‘Require customer confirmation to perform Action’ is visible.

Adding steps to your Action

Add steps to tell AI Agent what tasks it needs to perform in your connected apps in order to complete the Action. AI Agent performs each step in the Action sequentially, from top to bottom.

You can add one or more steps to an Action. Some steps may require you to authenticate to an app or provide additional information.

  • Open the Add Steps dropdown menu

    • Select an app that AI Agent needs for this Action
    • Select what you want AI Agent to do with the app — for example, with Shopify, you might choose Cancel an order or Edit shipping address
  • Select the X icon next to a step to remove it
  • To re-order your steps, click and drag the handle (6 dots) next to a step

    • AI Agent performs each step in the Action sequentially, from top to bottom
Don't see the app you need? Select "Request an app" to let our Product team know what app you're looking for. You can also use this form to request an app.


Advanced options

Warning: to use Advanced options, we strongly recommend that you have familiarity with making HTTP requests. Otherwise, ask a developer for help.


When you select Advanced options, you can use a visual workflow builder to create custom steps for AI Agent on an open canvas.

Advanced options is intended for brands with the technical knowledge to build a workflow for AI Agent that aligns with their unique business needs, use cases, and mix of apps.

In the advanced editor, you can:

  • use HTTP requests to connect AI Agent to apps that Gorgias does not currently integrate with
  • collect information from shoppers to use as variables in subsequent steps
  • use conditional logic and variables to create different resolution paths for shoppers

If you choose to use Advanced options to build your Action, you cannot return to using the basic editor. Learn more about using Advanced options to build custom Actions.

Authenticate your apps and add missing values

When you add steps to your Action, you may need to authenticate to an app before AI Agent can use it. Authentication gives AI Agent permission to make changes in an app on your behalf. It typically requires you to provide an API key or token.

You may also need to provide additional information for steps you’ve added. For example, if you add a step for AI Agent to send a Shopify discount code, you will need to select the discount amount, when the discount expires, and so on.

  • A warning sign ⚠️ appears beside steps that require additional set up from you
  • If a step requires authentication → select the step, then enter the API key for your app.

  • If a step has missing values → select the step, then enter the mandatory information

Gorgias interface displaying the ‘AI Agent’ section under the ‘Actions’ tab. The ‘Action steps’ section shows a warning message: ‘Provide authentication for steps below to save this Action.’ Two steps are listed: ‘Cancel order in Shopify’ and ‘Cancel order in ShipHero,’ with a warning icon and ‘Authentication required’ message next to the ShipHero step.

Test your Action

When you finish setting up your Action, you can test how it works in the AI Agent test environment. Select Create and Test to go to the test environment directly from the Action editor.

The test environment is a controlled space where you can simulate real interactions with shoppers — including asking questions about orders or imitating Actions. When used in the test environment, Actions do not make any changes in your connected apps.

Troubleshooting Action errors

If AI Agent encounters an error with your set up, it may be unable to fully complete all the steps in your Action.

In these cases, AI Agent adds a note in the ticket conversation to indicate that it failed to perform one or more Action steps and handed over the ticket to your team. 

You can use the link in the note to go to the Action’s event log. Look for entries with an error status to investigate.

Gorgias interface showing a customer ticket conversation. The AI Agent Bot section indicates an error message: ‘AI Agent did not send a response and handed over the ticket to your team because it failed to execute one or more steps in this Action. View the Action events for more details.’ Below, the ticket is marked ‘Handed over by AI Agent.’

Delete an Action

If you no longer need an Action, you can permanently delete it anytime from your library. You cannot recover an Action once it has been deleted.

  1. Go to Automate
  2. Select your store from the sidebar, then click on AI Agent
  3. In the Actions tab, select the trash icon next to the action you want to delete
  4. Select Delete to confirm
Was this article helpful?
Yes
No