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
- You must have an active Automate subscription
- You must have a Shopify store connected to Gorgias
- You must have Lead or Admin permissions to set up Actions for AI Agent
- You must have AI Agent enabled on Email (currently Agent cannot perform Actions on Chat).
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.
- From the main menu, go to Automate
- Select your store from the sidebar, then click on AI Agent
- In the Actions tab, select Create from Template
- Select a template based on the task you want to automate (for example, cancel an order)
- Select the apps that you need for AI Agent to perform the Action, then select Continue
- To complete set up, you may need to authenticate some apps before finishing
- Select Create and Enable to finish
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:
- Go to Automate from the main menu
- Select your store from the sidebar, then click on AI Agent
- Select an existing Action or click on Create Custom Action to open the editor
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.”
- Note: this type of a description should complement, not replace your Action’s conditions
- 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”.
- 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.”
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.
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
Advanced options
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 you need help, each step includes a link to instructions on How to find your API key. Learn more about connecting AI Agent to your apps.
- If a step has missing values → select the step, then enter the mandatory information
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.
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.
- Go to Automate
- Select your store from the sidebar, then click on AI Agent
- In the Actions tab, select the trash icon next to the action you want to delete
- Select Delete to confirm