Recent searches


No recent searches

James Rodewig's Avatar

James Rodewig

Joined Mar 25, 2022

·

Last activity May 16, 2023

Zendesk Documentation Team

Following

0

Followers

0

Total activity

81

Vote

1

Subscriptions

40

ACTIVITY OVERVIEW

Latest activity by James Rodewig

James Rodewig created an article,

ArticleAI agents and automation best practices
Available on Suite Enterprise plans and above
This article describes functionality available only to customers who had a drafted or published AI agent as of February 2, 2025. For information about equivalent functionality in the AI agents - Advanced add-on, see Building dialogues for AI agents - Advanced.
The bot builder's Add business hours condition step lets you branch an AI agent's answers based on your business hours. However, it can't branch a conversation based on agent availability.

In this recipe, you’ll use the bot builder's Make API call and Branch by condition steps to branch an existing AI agent answer based on the number of online agents at the time of the conversation. The Make API call step gets a count of the current online agents by calling the Zendesk Real Time Chat REST API's Get Agent Status Count endpoint. The Branch by condition step then uses the count to branch the answer's flow.

You can use this setup to send customized AI agent messages before creating a ticket using the Transfer to agent step. These messages can help set better customer expectations around wait or response times.

Task 1: Checking your setup

To complete this recipe, you'll need the following:

Task 2: Creating an API connection

To start, create an API connection to store your OAuth access token for the Chat API. Your AI agent can use this connection to authenticate calls to the API.

To create the connection
  1. In Admin Center, click Apps and integrations in the sidebar, then select Connections > Connections.
  2. Click Create connection.
  3. Select the Bearer token authentication type.
  4. For Connection name, enter "zendesk_chat_api_oauth_token".
  5. For Token, enter your OAuth access token (see Task 1: Checking your setup).
  6. For Allowed domain, enter "rtm.zopim.com".
  7. Click Save to create the connection.

Task 3: Retrieving agent availability

Next, add a Make API call step to an existing answer in your AI agent. This step gets a current count of online agents from the Real Time Chat API's Get Agent Status Count endpoint.

To add the Make API call step

  1. In Admin Center, click Channels in the sidebar, then select AI agents and automation > AI agents.
  2. Click Manage AI agents for messaging.
  3. Click the AI agent you want to update, then click the answer you want to update.
  4. In bot builder, add a step to the desired location in the answer's flow.
  5. Under Choose step, select Make API Call.
  6. Enter Get agent availability as the Name.
  7. Under API details, enter https://rtm.zopim.com/stream/agents/agents_online as the Endpoint URL.
  8. In Authentication, select the zendesk_chat_api_oauth_token connection.
  9. To test the API request, click Make API call.
  10. Under Test Data, enter Melbourne, AU as the Location.
  11. Click Make API call.
  12. Save the following variable using its default name:
    • content > data > agents_online
  13. (Optional) Add a step under the Get agent availability step’s API call failed branch. This step runs if the Get Agent Status Count request fails.

Task 4: Branching based on agent availability

Next, add a Branch by condition step to branch the answer's flow based on the value of the agents_online variable.

To add the Branch by condition step

  1. In the bot builder, add a step in the Get agent availability step's API call successful branch.
  2. Under Choose step, select Branch by condition.
  3. Enter Check agent availability as the Name.
  4. In the If this branch, enter Agents are online as the Name.
  5. In the If this branch, click Add condition. Configure the condition as follows:
    • Variable: agents_online
    • Operator: Is not
    • Value: 0
  6. Click Add.
  7. Add any desired steps under the Agents are online and Else branches. Steps under the Agents are online branch run when the Get Agent Status Count request indicates one or more agents are online. Steps under the Else branch run when the request indicates no agents are online.

Task 5: Publishing your updated AI agent

When you're done editing the answer, you can publish the updated AI agent.

To publish the AI agent
  1. Click Done in the upper right corner of the bot builder.
  2. On the AI agent page, click Publish AI agent.
  3. Click Publish.

Task 6: Testing your changes

After you publish your changes, you can test the updated answer by using one of its training phrases in a conversation with the updated AI agent. For more information about testing AI agents, see Testing the end user's messaging experience.

Edited Feb 03, 2025 · James Rodewig

2

Followers

7

Votes

3

Comments


James Rodewig commented,

Community comment Developer - Zendesk APIs

Hi Agave,

I'm sorry to hear you ran into this issue.

The Leads endpoints are part of the Sales CRM API. The Sales CRM API use the following base URL for their endpoints: https://api.getbase.com

We call that out in the Sales CRM API intro docs, but it's easy to miss.

I hope that helps!

View comment · Edited Apr 19, 2023 · James Rodewig

0

Followers

0

Votes

0

Comments


James Rodewig commented,

CommentSelf-service best practices and recipes

Hi Tony,

There's a column for Field ID on the Fields page.


When you create the Help Article URL field, Zendesk will automatically send you to this page. Otherwise, you can find the page at the following URL:

https://{your-subdomain}.zendesk.com/admin/objects-rules/tickets/ticket-fields

In the URL, replace {your-subdomain} with your Zendesk subdomain.

I hope that helps!

View comment · Edited Apr 10, 2023 · James Rodewig

0

Followers

1

Vote

0

Comments


James Rodewig commented,

Community comment Developer - Zendesk Apps Framework (ZAF)

If it helps, the following tutorial shows how you can use secure settings to pass an OpenAI API token:

Using AI to summarize conversations in a Support app

 

I hope that helps!

View comment · Posted Apr 10, 2023 · James Rodewig

0

Followers

0

Votes

0

Comments


James Rodewig commented,

Community comment Developer - Zendesk APIs

Hi Nishaant,

Thanks for reaching out.

The Using OAuth to authenticate Zendesk API requests in a web app article is currently misleading about this. I apologize for the error (it was my mistake), and I'm working on fixing it now. In the meantime, I hope this information is helpful.

By default, OAuth clients are scoped to one Zendesk subdomain. You can only use the client to create OAuth flows on behalf of users who are on the same subdomain used to create the client.

If you're creating an app that serves users on multiple Zendesk subdomains, you'll need to request a global OAuth client. In this case, you'd need some mechanism to capture the user's subdomain. When a user signs in to Zendesk, they must sign into a specific Zendesk subdomain.

I hope that helps!

View comment · Posted Apr 04, 2023 · James Rodewig

0

Followers

0

Votes

0

Comments


James Rodewig commented,

Community comment Developer - Zendesk APIs

Hi Eric,

Thank you for the feedback. I work on our docs. I agree with you that these docs could be clearer and tighter.


I can't guarantee a timeline, but I'll work on this.

Thanks again for raising this. Please let us know if there's anything else we can do to improve our docs.

View comment · Posted Apr 04, 2023 · James Rodewig

0

Followers

1

Vote

0

Comments


James Rodewig created an article,

ArticleUsing AI agents - Essential

Available on all Suite plans

This article describes functionality available only to customers who had a drafted or published AI agent as of February 2, 2025. For information about equivalent functionality in the AI agents - Advanced add-on, see Building dialogues for AI agents - Advanced.
Bot builder’s Show help center articles step recommends specific help center articles to your customers that may help them self-solve their questions. If you have public and restricted articles in your help center, you can configure which articles to show anonymous (unauthenticated) end users and which to show for authenticated end users.

Suggesting restricted help center articles in an AI agent answer is available on all plans that can use messaging.

This article includes the following topics:

Restricted help center article overview

There are three use cases for AI agents and articles:
  • The AI agent handles anonymous user queries and shares public help center articles
  • The AI agent handles authenticated user queries and shares restricted help center articles
  • The AI agent handles anonymous and authenticated user queries, builds conditions based on whether the user is authenticated, and shows all articles to authenticated users and only public articles to unauthenticated users

Authentication is based on messaging authentication with JWT.

If the end user is authenticated with messaging JSON Web Token (JWT), we will check if they can access the article based on the article permission rules and the user segment they’re part of. If the end user has access, the article preview is shown. Only the placeholder preview is shown if the end user is not part of the user segment.

If the end user is anonymous or authenticated through SSO or Zendesk authentication, the link to the restricted article is displayed in the AI agent message, but the title and preview are not displayed.

When the end user clicks the link to the restricted article, they are redirected to Guide where they must log in. An end user must have an account on your help system and the correct guide user permissionsto view the restricted article.
Note: If the article permission is updated from public to restricted or from restricted to public, there is a short delay before the permission change is reflected to the end user.

Showing the title of restricted help center articles

By default, restricted help center article titles and previews are not shown to users not authenticated with messaging JWT. Only the link is shown.

You can, however, configure your AI agent to show the title and preview of restricted help center articles to all users, regardless of which authentication method is used or whether they are anonymous.

Note: Before configuring the AI agent to show restricted titles, you need to set up end-user authentication for messaging.
To always show the title for restricted help center articles
  1. In Admin Center, click Channels in the sidebar, then select AI agents and automation > AI agents.
  2. Click Manage AI agents for messaging.
  3. Click the AI agent you want to work with.
  4. Expand Channels settings and select Always show the title and preview for restricted articles. This option is visible only if you have an active help center. Only agents with guide admin permissionscan set this option.

Searching for restricted help center articles

The Show help center articlesstep recommends specific articles to your customers that may help them self-solve their questions. It presents up to six help center articles to the customer during a conversation.

You must have an active help center to use this step.

If you have view access to a restricted article, you can add that article in bot builder and see the article preview. The article does not appear in the bot builder search results if you do not have view access. If, for example, a guide admin adds a restricted article and you do not have view access for that article, it appears as a restricted article in bot builder for you.

Edited Feb 03, 2025 · James Rodewig

0

Followers

6

Votes

2

Comments


James Rodewig created an article,

ArticleUsing AI agents - Essential

Available on all Suite plans

This article describes functionality available only to customers who had a drafted or published AI agent as of February 2, 2025. For information about equivalent functionality in the AI agents - Advanced add-on, see Building dialogues for AI agents - Advanced.

In the bot builder, a variable is a container for data related to a conversation, such as a customer's name or a store order ID. During a conversation, an AI agent for messaging can utilize variables in many ways, including:

  • Inserted into AI agent messages to personalize text responses, display dynamic information and images, or branch the conversation.
  • To set a value for a variable based on an end user's input.
  • In tags that are added to tickets during the Transfer to agent step.

An AI agent can include up to 46 unique variables across all answers. Each unique variable can be used in an answer as many times as needed.

About variable names and values

In the bot builder, each variable has a name and value. When configuring a step in an answer, the name acts as a placeholder for the value. When the AI agent runs the answer, it replaces the variable's name with the variable's value. For example, you can use a variable named Email as a placeholder for the customer's email address.

Note: Only the first 280 characters of a variable's value appear in the response displayed in the messaging conversation.

Variables are global within an AI agent. After they're created, variables are available in all subsequent answers in the end user's conversation via free text or the Link to another answer step.

Handling empty variables

A variable is empty if it has no value. AI agents skip empty variables during a conversation.

For example, a Send message step include an AI agent message of "Your package's shipping status is shipping_status." If the shipping_status variable is empty during a conversation, the AI agent sends "Your package's shipping status is ."

AI agent message Customer view

Handling missing variables

In the Make API call step, if one of the saved variables is missing from the response, the step's Fail branch is triggered. See Using the Make API call step in bot builder (Legacy).

About variable types

Bot builder organizes variables based on how they're created and the data they store:

Customer variables

Customer variables store information provided by a customer during an Ask for details step. For example, the step may ask a customer to provide their name and email address.

When inserting a variable in a step using the Add a variable icon () , customer variables appear under Responses from customer.

External service variables

External service variables store data received from an external system during a Make API call step. For example, the step can make a REST API request to a shipping provider to fetch the current status of a package.

Admins create external service variables when configuring the Make API call step. As part of the configuration, the admin can set a custom name for each variable.

When inserting a variable in a step using the Add a variable icon ( ), external service variables appear under Responses from external service.

Messaging metadata variables

Messaging metadata variables contain information about a customer's identity and authentication status. Messaging metadata variables get their values from the signed JSON Web Tokens (JWTs) used for messaging authentication.

Messaging metadata variables aren't enabled by default and are only available for the Web Widget and mobile SDK channels. For more information about enabling and using messaging metadata variables, see Using authentication metadata in an AI agent answer.

If enabled, messaging metadata variables appear under Messaging metadata when inserting a variable in a step using the Add a variable icon () ,

Sunshine conversations variables

Sunshine conversations variables can be used to connect to your Sunshine Conversations integrations.

Available variables include:

Using variables in an answer

Customizing AI agent messages

Admins can insert variables to the AI agent message of the following step types: For example, the following AI agent message includes the Name variable.

Sending data to external systems

When making a REST API call to an external system using the Make API call step, admins can add insert variables into the path and query string of the step's Endpoint URL field. For more information, see Using the Make API call step in the bot builder.

Branching an answer's flow

The Branch by condition step lets an admin branch the flow of an answer based on the value of one or more variables. For more information, see Understanding branching conditions.
Note: Custom drop-down ticket fields use the Tag value as the variable’s value.

Setting variable values

Admins can use the Set variable step to create a new variable and assign a value or to select an existing variable and overwrite its value based on an end user's actions in a conversation. Variables can be referenced across all answers in the AI agent.

See Understanding answer step types: Set variable for usage details.

Using variables in tags

Admins can use variables in the tags that are added to a ticket created as part of the Transfer to agent step. These tags can be used by agents to view, organize, and track tickets, and in automated actions such as ticket routing and other business rules.

Although they are technically part of an answer, variables in tags are subject to some rules and restrictions that other variables aren’t.

You can use variables generated from API calls and system variables. Available variables appear in the selection drop-down:

However, variables containing input from end users can’t be used in tags. They will appear in the drop-down list but will be disabled. For example, you can’t refer to a variable using information collected in an Ask for details step earlier in the conversation.

The following rules and recommendations apply to using variables in tags:

Character limit

  • Hard-coded tags are limited to 80 characters each.

Special characters

  • Variables containing the following special characters can't be used and won't appear as available variables: £, `, ´, \, [, ], {, }, (, ), <, >, %, &, ?, +, @, !, *, $, #, =, and "
  • Space or commas used in variables appear as underscores in tags.

Additionally, we recommend the following best practices when using variables as tags:

  • Tags are typically used for routing conversations or in trigger conditions. If you want to add information to tickets for agent context, we recommend using custom fields.
  • Limit the number of possible values for a variable. Too many values can cause unexpected behaviors.
  • Keep value options short to avoid having them truncated as tags.
  • Avoid having special characters in the values.

Edited Feb 03, 2025 · James Rodewig

0

Followers

19

Votes

14

Comments


James Rodewig commented,

Community comment Q&A - AI and automation

You may be interested in this app tutorial: Using AI to summarize conversations in a Support app

The tutorial explains how you can use the Zendesk Apps framework (ZAF) to extend Zendesk using GPT-3 and the OpenAI API. You can use the tutorial as a starting point for building your own apps and integrations.

View comment · Posted Feb 28, 2023 · James Rodewig

0

Followers

2

Votes

0

Comments


James Rodewig created an article,

ArticleAI agents and automation best practices
This article describes functionality available only to customers who had a drafted or published AI agent as of February 2, 2025. For information about equivalent functionality in the AI agents - Advanced add-on, see Building dialogues for AI agents - Advanced.
The Make API call step lets an AI agent for messaging use a REST API request to fetch data from an external system, such as Shopify or Salesforce.

In this recipe, you’ll create an AI agent answer that retrieves weather data for a location provided by an end user. The answer gets the data from the OpenWeather API. You can use the answer flow created in this recipe as a starting point for building your own API-powered answers.

The recipe involves the following tasks:
Note: Zendesk provides this article for instructional purposes only. Zendesk doesn't support the examples in this article. Zendesk also doesn’t support third-party technologies, such as the OpenWeather API.

Task 1: Checking your setup

To complete this recipe, you’ll need the following:

Task 2: Creating an API connection

To start, create an API connection to store your OpenWeather API key. Your AI agent can use this connection to authenticate calls to the OpenWeather API.

To create the connection
  1. In Admin Center, click Apps and integrations in the sidebar, then select Connections > Connections.
  2. Click Create connection.
  3. Select the API key authentication type.
  4. Enter openweather_api_key as the Connection name.
  5. Enter x-api-key as the Header name.
  6. Enter your OpenWeather API key as the Value.
  7. Enter api.openweathermap.org as the Allowed domain.
  8. Click Save to create the connection.

Task 3: Creating a custom ticket field

Next, create a custom ticket field to capture the location provided by the end user.

To create the custom ticket field
  1. In Admin Center, click Objects and rules in the sidebar, then select Tickets > Fields.
  2. Click Add field.
  3. Select the Text field type.

  4. Enter Location as the Display name.
  5. Under Permissions, select Customers can edit.
  6. Under Customers, enter Location as the Title shown to customers.
  7. Click Save.

If your account uses a single ticket form, the new field automatically appears in your ticket form. To remove the field, see Editing ticket forms.

Task 4: Building an AI agent answer

Step 1: Creating the answer

Use bot builder to create an answer for your AI agent.

To create the answer
  1. In Admin Center, click Channels in the sidebar, then select AI agents and automation > AI agents.
  2. Click Manage AI agents for messaging.
  3. Click the AI agent you want to work with.
  4. On the Answers tab, click Create answer.

Step 2: Setting the answer’s intent

Set the answer’s intent and training phrases. These include phrases and words used to trigger the answer in a conversation.

To set the answer’s intent
  1. On the Answers tab of the AI agent’s edit page, click Create answer.
  2. Click Build your own answer, then click Next.
  3. Enter Get weather as the answer’s Intent.
  4. Under Training phrases, enter Get weather forecast and Get current temperature.
  5. Click Next.

    The answer opens in the bot builder where you can build out the response.

Step 3: Adding an initial message step

Add a Send message step to ask the user for a location. This is the first step in the answer’s flow.

To add an initial message step
  1. In the bot builder, click Add step.
  2. Under Choose step, select Send message.
  3. In AI agent message, enter the following text:
    
            What location would you like to get the weather for?
    
    Include the country code. For example: "Melbourne, AU" or  "San Francisco, US"
           

Step 4: Asking the end user for a location

After the initial message, add an Ask for details step to present a basic form to the end user. The form includes a text box for the Location ticket field’s value.

To add an Ask for details step
  1. In the bot builder, click the Add step icon ( ).
  2. Under Choose step, select Ask for details.
  3. Enter Get location as the Name.
  4. In Fields, type and select the Location ticket field.

Step 5: Retrieving weather data for the location

Add a Make API call step to get weather data for the location from the OpenWeather API’s Current weather data endpoint.

To add a Make API call step
  1. In the bot builder, click Add step.
  2. Under Choose step, select Make API Call.
  3. Enter Get weather as the Name.
  4. Under API details, enter https://api.openweathermap.org/data/2.5/weather?units=metric&q=as the Endpoint URL.
  5. Use the Add a variable icon ( ) to append the Location field variable to the Endpoint URL value.

    The finished Endpoint URL value should look like this:

  6. In Authentication, select the openweather_api connection.
  7. To test the API request, click Make API call.
  8. Under Test Data, enter Melbourne, AU as the Location.
  9. Click Make API call.
  10. Save the following variables using their default names:
    • main > temp
    • weather > item 1 > description

Step 6: Sending a weather message to the end user

After retrieving the weather data, use a Send message step to respond with a message containing the weather data.

To add an API success message
  1. In the bot builder, click Add step under the Get weather step’s API call successful branch.
  2. Under Choose step, select Send message.
  3. In AI agent message, enter the following text:
    
            It's {{temp}}° C with {{description}} in
           
  4. Use the Add a variable icon ( ) to append the Location field variable to the AI agent message value. Then add a period (.).

    The finished AI agent message value should look like this:

Step 7: Adding a failure message

The request made during the Make API call step may fail. For example, the request may include a location that doesn’t exist. Add a Send message step to the API call failed branch. This step returns a message if the OpenWeather API call fails.

To add an API failure message
  1. In the bot builder, click Add step under the Get weather step’s API call failed branch.
  2. Under Choose step, select Send message.
  3. In AI agent message, enter the following text:
    
            I'm sorry. I wasn't able to get weather data for
           
  4. Use the Add a variable icon ( ) to append the Location field variable to the AI agent message value. Then add a period (.).

    The finished AI agent message value should look like this:

Step 8: Publishing your updated AI agent

To push the answer live, publish the updated AI agent.

To publish the AI agent
  1. Click Done in the upper right corner of the bot builder.
  2. On the AI agent page, click Publish AI agent.
  3. Click Publish.

Task 5: Testing your changes

After you publish your changes, you can test the new answer by asking “How’s the weather?” in a conversation with the updated AI agent. For more information about testing AI agents for messaging, see Testing the end user's messaging experience.

Edited Feb 03, 2025 · James Rodewig

4

Followers

4

Votes

3

Comments