Customize your Flex-Zendesk Integration

The setup and configuration outlined in Create your Flex-Zendesk Integration and Manage Flex-Zendesk Call Flows describe how to get up and running with the default behavior in mind. However, you might want to customize both this integration experience as well as call flows.

Do you still need to set up your Flex-Zendesk Integration? Check out our guide for configuring your Zendesk instance for Flex!

In this guide, we will walk through how to customize the default call flow in your Flex-Zendesk integration by

  1. Creating an IVR (Interactive Voice Response) to collect a Ticket number from our caller
  2. Collecting further information about the Ticket or Caller during the flow that you would want to tag the Ticket with .
  3. Looking up an existing Ticket if a valid ticket id is provided, or
  4. Creating a new Ticket from the caller's input if there is no pre-existing Ticket or when an invalid Ticket number is provided

To accomplish this, we'll need to do the following:

  1. Create a Studio flow to introduce IVR and collect a Ticket Number from the caller
  2. Pass Zendesk's Ticket Number to the Flex-Zendesk integration by using a custom Task attribute called zd_ticket_id
  3. Pass Tags to be added to Zendesk Ticket by using a custom Task attribute called zdCustomTags
  4. Re-configure the Flex Zendesk Integration for creation and navigation of Ticket, if not already done in the configuration stage

Remember: Flex is a Programmable Application Platform, so you can customize Flex to any extent using the Flex Plugin Model, and those changes will be reflected in your Zendesk integration as well. The customizations in this guide refer to the enhancements in both the integration and the call flow itself.

Collect Ticket Number in your IVR

IVR Flow for Collecting Ticket Number from Customer

If the call flow in your organisation collects ticket number from the customer on incoming engagement, you can use that information to screen pop the ticket to an agent when they accept the incoming task.

To do so, from your Twilio Console, modify your Flex Flow, as described below.

(1) From the Flex Flow screen, select “Voice IVR” flow

IVR zdTicketNumber Step1

(2) Default “Voice IVR” flow looks like the one below

IVR zdTicketNumber Step2

(3) Add a “Gather Input on Call Widget” to the flow before “Send to Flex” widget, like shown below to collect ticket number from the caller. Let's name this widget "getTicketNumber'

IVR zdTicketNumber Step3

(4) Add the ticket number as a Task Attribute in the “Send to Flex” Widget, as shown below

IVR zdTicketNumber Step4

(5)The task attributes in “Send to Flex” widget after modification will look like the following

{ "type": "inbound",
  "name": "{{}}" ,
  "zd_ticket_id" : "{{widgets.getTicketNumber.Digits}}" }

(6) If you now call your Flex Number and supply the ticket number, you should have the Ticket screen displayed instead of a new ticket. For the scenario when no ticket number is provided in the above IVR, or an invalid ticket number is provided, you would still have a new ticket number created and displayed on the screen

While the above example shows the approach to collect Ticket number in an IVR, the same approach can be applied to any other channel. For example, you can collect Ticket Number using a Messaging Bot in any text-based channel like SMS, Whatsapp or Webchat and pass that Ticket Number as "zd_ticket_id" task attribute to Flex.

Adding Tags to your Zendesk Ticket number

IVR Flow for Adding Custom Tags to Zendesk Ticket

You can add any custom tags identified during your customer engagement flow by adding those tags to a task attribute named “zdCustomTags” made available to you.

(1) Modify your Studio Flex Flow to identify tags you want to add the ticket. Approach to identify tags depends on your Business Logic, and can be done either by automated lookups to your backend, CRM, external API or by explicit questions to the Customer - whatever works best for you.

An example is shown below demonstrating adding tags identified in the Studio Flow using a lookup before “Send to Flex” widget is called. In this example, we used the Http Studio Widget viz. "tagCustomer" and got a list of tags in the parameter "tags"

custom Tag Studio tag Customer

(2) Now add these tags to "zdCustomTags" task attribute in "Send to Flex" widget as shown below


(3)The task attributes in “Send to Flex” widget after modification will look like the following

{ "type": "inbound", 
"name": "{{}}" ,
"zd_ticket_id" : "{{widgets.getTicketNumber.Digits}}" , 
"zdCustomTags": "[{{widgets.tagCustomer.parsed.args.tags}} ]"

(4) If you now call your Flex Number, you should see tags attached to the relevant Ticket, like shown below

custom Tags Zendesk Flex

zdCustomTags” supports multiple tags, so you can pass a list of all the tags you want to add.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!