This tutorial describes an Interaction flow based on the Sample In Ticket Interaction that is provided to demonstrate Zendesk integration. The Interaction shows how you can create a flow that automatically updates a Zendesk ticket with data collected in the Interaction. In this case, an Integration Point is used to update a ticket with comments entered by the Interaction user. 

Since Integration Points for Zendesk integration are not provided out-of-the-box, the second part of the tutorial explains how to create an Integration Point for this purpose.

Designing the Interaction Flow

The Sample In Ticket Interaction is an example of an flow that agents can use in In-ticket mode. The flow demonstrates how to use questions to perform troubleshooting, and how to use the Zendesk variables to direct the course of the flow. The phases of the Interaction that are relevant to updating a ticket are explained in detail in the sections following the diagram. 


Phase 1: Initial Troubleshooting
In this initial phase, a Yes/No question demonstrates how an In-ticket Interaction can guide agents to perform a complex troubleshooting flow.

Phase 2: Selecting a Zendesk Operation
In this multi-choice question, users are asked to select a Zendesk operation. In our example, the user selects Add comments to a ticket.

Phase 3: Determining Interaction Flow
At this point, users are asked whether or not to continue with the Add Comments demonstration, using a Yes/No question.

Phase 4: Entering Comments
In this input question, users are prompted to enter the relevant comments.

Phase 5: Running the Integration Point
Clicking Next on the Enter Comments page of the Interaction triggers the Update Ticket Integration Point to run, and the Zendesk ticket is updated with the comments that were entered. This phase of the Interaction is transparent to users, who immediately see the Statement described in the next phase.

The input parameters of this Integration Point element are the Ticket ID of the Zendesk ticket, and the comments that were entered by the Interaction user. The value of the ticket identifier is taken from the Zendesk variables of the Interaction:

The comments are taken from the input entered in Phase 4 of the Interaction.

The output value is stored in a user variable (res).

Phase 6: Displaying an Ending Statement
In the final step of the Interaction, users are shown a Statement that informs them that the Zendesk ticket has been updated.

Creating the Integration Point

An Integration Point is a call to a web service that retrieves information from an external data source. This part of the tutorial explains how to build a REST Integration Point that updates a ticket in Zendesk. 

Note: For detailed information about Integration Points, refer to Utilizing External Data Sources.

To design an Integration Point that updates a Zendesk ticket:

  1. From the Resources menu of the Admin Console, select Integration Points.
    The Web Service Integration Points page opens. 
  2. At the upper right corner of the page, click Add, and then select REST.

    The New Rest Integration Point wizard opens.

  3. In the REST Url field, enter the endpoint URL for a Zendesk ticket update. Be sure to include the identifier for your Zendesk account in the URL.
    For example:[id].json
  4. From the Request Type dropdown list, select PUT.
  5. In the Request Headers field, add a line and enter your authentication credentials. For successful authentication, base64 encoding needs to be used on either an API token, or on your Zendesk credentials.

    Basic Access Authentication

    In this case, authentication is done against your Zendesk account credentials (as shown in this tutorial scenario). As an example, assume that your authentication credentials are zendeskUser:zendeskPassword. Following encoding using basic access authentication, the credentials are emVuZGVza1VzZXI6emVuZGVza1Bhc3N3b3Jk
    For more information about basic access authentication, click here.

    Enter the credentials in the Request Headers field using the following format:
    Authorization: Basic <encoded credentials>
    For example:

    API Token Authentication

    In this case, the API token used to authenticate against the Zendesk server is base64 encoded and passed in the request header. If you have an API token, you may use it anytime (instead of basic access authentication). An API token must be used if you authenticate to Zendesk using Active Directory (or any other external server).

    As an example, assume that your authentication credentials are Following base64 encoding, the credentials are emVuZGVza1VzZXJAZXhhbXBsZS5jb20vdG9rZW46QVBJVG9rZW4=
    For more information about API token authentication, click here.

    Enter the credentials in the Request Headers field using the following format:
    Authorization: Basic <encoded credentials>
    For example: Authorization: Basic emVuZGVza1VzZXJAZXhhbXBsZS5jb20vdG9rZW46QVBJVG9rZW4=

  6. In the Request Body field, enter parameters from the Interaction (in this case, the comments) that will be used to update the ticket. For example:
    "ticket": {
    "comment": { "body": "${comment}" }

  7. At the upper right corner of the page, click Next.
    The Request page is displayed.
  8. For each parameter, in the Variable Type column, select the appropriate parameter type. Then, if desired, in the Variable Name column, change the default name to a more meaningful name. The name assigned in this column is the one displayed to users in the Interaction Designer.
  9. Click Next
    The Response page is displayed, with basic response mapping displayed by default.
  10. For the response parameter, select the appropriate variable type. 
    In this example, we put the response into a user variable called res.

  11. Click Next.
    The Definition page is displayed, listing the request and response parameters.
  12. At the top of the page, enter a relevant name and description in the appropriate fields. For example:

  13. At the upper right corner of the page, click Create.
    A confirmation message appears, and the Finished page is displayed.

  14. To exit the wizard, click Done

Note: If desired, you may test the Integration Point by clicking Test. This navigates you to the Test Integration Point page. For details, refer to Testing Integration Points.



  • Avatar
    Rob Hyatt