Zendesk's Integration Builder allows you to connect your AI agent to external APIs without extensive coding. Here's how to set up the integration:
Access the Integration Builder
- In the AI Agents Advanced UI, navigate to API Integrations in the side navigation menu.
- Click on Add Integration in the top right corner.
- Provide a name for the integration, such as
Shopify Order Lookup. - Add a short description detailing the purpose of the integration.
- Click Save to proceed to the integration configuration page.
Set Up Request Parameters
Request parameters are used to pass data from the AI agent conversation to the API request. For an order lookup, you might need parameters like email or order_id.
- In the Request Parameters section, click Add Parameter.
- Enter the Key (e.g.,
email). - Select the Type (e.g.,
string). - (Optional) Provide a Test Value to simulate API calls during testing.
- Check the Required box if this parameter must be collected before making the API call.
These parameters can be included in the URL, headers, or body of the request, depending on the API's requirements.
Example:
2.3. Configure the Environment
Environments allow you to manage different settings for development, testing, and production.
- In the Environments section, click Production (default).
- Set the Method to
POST. - Enter the URL, incorporating request parameters as needed (e.g.,
https://{store-name}.myshopify.com/admin/api/2023-10/orders.json?email={{email}}). - Under Authorization, select
Bearer Tokenand enter your Shopify access token. - In the Headers section, add any necessary headers (e.g.,
Content-Type: application/json).
You can create multiple environments to separate testing and production configurations.
{
"query": "query getOrder($queryString: String!) { orders(first: 1, query: $queryString) { edges { node { name customer { firstName } fulfillments { status trackingInfo { number company url } } } } } }",
"variables": {
"queryString": "name:#{{order_number}}"
}
}2.4. Define Scenarios Based on Shopify’s Response
For this intent example, you'll need 4 scenarios.
- Order Shipped
- Order In-progress
- Failure
- Fallback
Here's examples of each of the scenarios: