Actions are automated tasks that you can configure to be carried out by auto assist, which is part of agent copilot. Auto assist uses admin-defined procedures and actions to suggest next steps for agents as they work on customer requests.
This article contains the following topics:
- About actions for auto assist
- Creating an external action
- Testing an action
- Editing an action
- Deleting an action
- Best practices for creating actions
Related articles:
About actions for auto assist
Auto assist suggests relevant actions to your agents to help them solve customer requests. When auto assist suggests an action, the agent can approve it and the system carries out the action automatically, saving the agent time.
Actions come in two types: built-in actions that require no configuration from you, and custom external actions that you configure based on an API. For agents, the experience for these two different types of actions is the same. But for admins, the built-in actions don't appear on the Actions page in Admin Center and can't be modified.
Auto assist currently includes the following built-in actions:
- Mark a ticket as Solved.
- Leverage a Shopify integration to look up a Shopify order, cancel and refund an entire Shopify order, or refund selected items from a Shopify order. (See Workflow recipe: Canceling and refunding a Shopify order with auto assist.)
Custom external actions, on the other hand, allow you to update data outside of Zendesk using an API you define. These types of actions allow you to query and modify your own internal business systems or perform a third-party action. The more actions you configure, the more options are available to auto assist when it generates suggestions for agents.
Because you can create custom external actions using any API, it's possible to create an external action that points to a Zendesk API. If you do this, however, there are some considerations to keep in mind:
- These API requests count against your overall Zendesk API rate limits. See Managing API usage in your Zendesk account.
- As part of action setup, you’ll create a connection to authorize the request, which uses a Zendesk API token or OAuth token. This connection might have greater access privileges than your agents and end users, so you’ll need to be cautious that you don’t accidentally expose information they shouldn’t see.
- In the future, you’ll need to migrate your Zendesk API actions to out-of-the-box Zendesk actions if and when equivalent actions become available.
- Be mindful of how changes made by these API requests may interact with other parts of your Zendesk configuration, such as triggers, automations, and apps.
Limits for actions
The following limits apply to actions:
- You can have a maximum of 100 actions per account.
- Each action has a maximum of 100 inputs and 100 outputs.
- External actions have a timeout of 10 seconds. If the external system takes longer than 10 seconds to respond, or that response fails to be received by your Zendesk account, the action is not performed.
- External actions have a maximum response size of 2MB.
Creating an external action
Admins can create new external actions in Admin Center. External actions require an input, an API call, and an output.
- The input is the information that an action uses in order to run. Each input you define creates an input placeholder, which can be inserted into the URL, body, query parameters, or headers of your action. These placeholders will be replaced with data provided by auto assist when it executes the action.
- The API call is how exactly the information should be structured when it’s sent to the API.
- The output determines how Zendesk should interpret the data returned by the API. The outputs you define tells the action which parts of the API response to send back to auto assist when the action is executed.
To create an external action
- In Admin Center, click Apps and integrations in the sidebar, then select Actions and webhooks > Actions.
- Click Create action.
- In the Name field, enter a descriptive name for your action.
This name appears to agents and in the event log.
- In the Description field, enter a description of the action.
This description is used by the system to determine when the action should be used with auto assist. For help writing good descriptions, see Best practices for creating actions.
- In the Inputs section, click Add input.
- In the Add input window, fill in the following fields:
- Name: Enter a descriptive name for the input.
- Description: Enter a description of the input.
-
Type: Select from the following options:
String, Integer, Decimal, or
Boolean.Note: Input types are strictly enforced. For example, 3.0 will not be accepted as an integer, the string “true” will not be accepted as a boolean, and the boolean value false will not be accepted as a string.
- Click Add input.
- In the Add input window, fill in the following fields:
- In the API configuration panel, fill in the following fields:
- Request method: Select GET, POST, PATCH, PUT, or DELETE, depending on what you want your action to do.
-
Endpoint URL: Enter the URL of your external service. Note: Only https:// URLS are allowed.
- Authentication: Select an existing API connection.
-
Body: Enter the information that you’re requesting in this
API call.
To insert placeholders for any of the inputs you created, click {+} and select the appropriate input.
- Query parameters: Click Add parameter and add a Key and Value for any parameters that apply to this API call.
-
Headers: Click Add header and add a Name and
Value for any headers that apply to this API call. Note: You don’t need to add a content-type header. Only the application/json value is supported, and this header is automatically added when the API call is made.
- In the Outputs section, click Add output.
- In the Add outputs window, enter test data for each of the inputs you configured.
- Click Make API call.
This information is sent to your external service, which returns a representative response.
Note: When an external action runs, the response must be JSON and must have the appropriate JSON header (content-type: application/json). Other JSON-compatible content types aren’t currently supported (for example, vnd.oracle.resource+json or vnd.api+json). - On the Output tab, find the appropriate output from the
response and click Add.
You can click the Response body tab to see how the actual response is formatted.
-
Enter a Name and Description for the ouput, then click Add output.
-
Repeat as required to capture all the outputs you want to return to auto assist.
-
Click Done.
Note: If a mapped output isn’t included in the response when an action is executed, the action still succeeds, but the output’s key is omitted from the response sent back to auto assist.
- Click Save.
Testing an action
When you create an action, you should test it to make sure it behaves as you expect. If necessary, run multiple tests with different input values that yield different responses to test all possible outputs.
To test an action
- In Admin Center, click Apps and integrations in the sidebar, then select Actions and webhooks > Actions.
- For the action you want to edit, click the options menu () and select Test.
- In the Inputs section of the Test tab, enter test data for each of the inputs you configured.
- Click Make API call.
This information is sent to your external service, which returns a representative response.
- In the Outputs section, verify that the response includes the information you expect.
If you encounter issues during testing, here are some troubleshooting recommendations:
- If you’re using an external action to interact with a third-party product, that product’s documentation is the best source for detailed troubleshooting.
- For an overview of HTTP error codes that you might encounter during testing, see HTTP response status codes.
- Ensure that all inputs and outputs are the correct data type (integer, decimal, string, or boolean) for your use case.
- You can see more details about the action execution in the integration log.
Editing an action
Admins can edit existing actions in Admin Center.
To edit an action
- In Admin Center, click Apps and integrations in the sidebar, then select Actions and webhooks > Actions.
- For the action you want to edit, click the options menu () and select Edit.
- Make changes to the action as needed.
For help, see Creating an external action.
Tip: If you make changes to an existing action, make sure that the name and description are still accurate. - Click Save.
Deleting an action
Admins can delete existing actions in Admin Center. Deleting an action is permanent, and its contents cannot be recovered.
If you delete an action, it will no longer be available for auto assist procedures. Make sure to adjust any affected procedures.
To delete an action
- In Admin Center, click Apps and integrations in the sidebar, then select Actions and webhooks > Actions.
- For the action you want to delete, click the options menu () and select Delete.
- In the window that appears, click Delete action.
Best practices for creating actions
When creating actions, follow these best practices:
- Use connections for authentication. Don’t include authentication credentials in your action configuration. Use a connection instead, as these are purpose-built to keep your sensitive details safe.
- Be mindful of access privileges. Keep in mind that a connection might have higher access privileges than your agents or end users. Configure your actions, procedures, and agent training to avoid sharing sensitive data to the wrong audience.
- Keep your data as private as possible. When capturing parts of an action’s response as outputs, be mindful of only capturing the specific data points you need. Capturing data that isn’t directly relevant to the task at hand isn’t good privacy practice, and furthermore could confuse auto assist.
-
Write good names and descriptions for actions, inputs, and outputs. Names
and descriptions help auto assist determine when actions (including their inputs
and outputs) are relevant to a customer request. Additionally, if you make
changes to an existing action, make sure that the name and description are still
accurate.
Names and descriptions must clearly describe the meaning and outcome of an action. For example:
- Action name: Add book to cart
- Action description: Adds a book to the customer's shopping cart.
When referencing actions in auto assist procedures, remember to use similar language to invoke a particular action.
- For example: “After the customer has confirmed the book they want to purchase, add that book to their cart.”
Additionally, if you make changes to an existing action, make sure that the name and description are still accurate.