Flow Builder - Ask for details

The new Ask For Details option in Flow Builder allows you to pull in contextual information via API into your Zendesk Chat Bot.

Flow Builder - Ask for details

Last summer Zendesk added the ability to make API calls from within Flow Builder. Instead of having a Chat bot that just replies with Help Center articles, you can now reply with there data types too by calling your own or external APIs.

One of the improvements we listed was the ability to ask the customer for data, and use that as part of our query. Example: ask for order number, and retrieve status of that order.

Luckily, Zendesk has just enabled this feature, making the range of options for Flow Builder way bigger by adding an Ask for Details step.

Concept

OMDb API is a free API that enabled movie lookups from within IMDB.  We’ll use this API to have Flow Builder ask our customer for a movie title, and reply with its full title and year of release.

In reality you’ll probably use this API to show the user order information, system status updates, product pricing or other types of more useful data.

https://www.omdbapi.com/?apikey=[yourkey]&t=[query]

Setup

Custom Field

The Ask for Detail step stores the customer reply in a custom field. You can use an existing one, or create a new one for this specific step. Make sure you choose Text Field if you want the customer to enter any kind of text.

For this demo I’ve added a DEMO Movie text field.

Add a new step to gather details

Go to Bots in the Admin Center and open an existing answer, or create a new answer for your Bot.

Once in edit mode you can add the first new step to your bot flow:

  • In our example we already have an existing Bot that Presented Options, so we added a new option called Movie Database.
  • Underneath that option we add an Ask for Details Step
  • Give it a title (Enter a movie title) and link it to the new Custom Field you created above.

Add API call

Next we’re going to add the actual API call

  • Under the Ask for Detail step we add an Make API call step
  • Give it a name (Finding Movie Details), description, and add the API details. Important here is to add the API and then choose Add a variable to select the Response from the customer.

[GET] https://www.omdbapi.com/?apikey=[yourkey]&t=[your custom field]
No header info needed

Once you added the API call we can validate it by running a test.

  • In our test we search for Blade Runner
  • The API gets called and returns a response
  • You can browse through the response and store specific keys as variables to use in your responses.
  • In our example we store the Name and Release Date keys for the first matched movie as variables year and title.

The variables are stored and worked for all successful API calls. So for each query your customers execute we store the first matched movie as the variables for a reply.

Reply to the customer

And we can now add two final steps to our Flow:

  1. Send Message under successful API call
  2. Send Message under failed API call

The success message used the variables we created above. So we’ll always reply with:

“The movie [title] was released on [year]”

And the failed message can reply with:

“No match found for [DEMO Movie]”

Customer Experience

Once you enable the new flow, this is the experience your customers get:

Conclusion

This new Ask for Details option allows for more personalised Flow Builder experiences that can pull in external data based on the customer request instead of generic information or only Help Center articles.

Currently the Call an API option is still fairly limited in its reply option. You can basically reply with hardcoded variables in text form.

I’d love to see richer formats. Loop across results and reply with a list of results. Or parse the returned data and render it as images, links or buttons.
Hopefully we’ll see this sooner than later.