Documentation
Feedback
Guides
API Reference

Guides
Conversational Commerce
Create Zendesk integration

This guide explains how to create an integration with the Conversational Commerce VTEX and Zendesk. To do so, first you will need to gather some information about the store's Zendesk account:

  • URL: store's Zendesk account URL, such as https://{accountName}.zendesk.com.
  • Tags: tags that will be added by VTEX when a new ticket is created by the user.
  • Email: email of a Zendesk account that will be used to create the tickets. This email must have permission to create tickets and add comments to it via API. This email will be used in the from field in all support emails.
  • API token: Zendesk API token that needs to be sent to VTEX support. To generate a token, follow the steps in this article.

After gathering this information, follow the steps below:

  1. Create a custom field with the phone number that will be used on WhatsApp Business by the store. You must send its ID to VTEX support.
  2. Create a webhook with the following information:
  • URL: https://live-agent-handler.vtex.com/webhooks/zendesk
  • Request method: POST
  • Request format: JSON
  • Bearer token: API token
  • Token: token send by VTEX
  1. Once you created the webhook, you must create two triggers to activate the webhook. To create a trigger check this documentation. Create the first trigger with the following information:

{"base64":"  ","img":{"width":1570,"height":1400,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":145055,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/create-zendesk-integration-0.png"}}

  • Trigger name: VTEX Chatbot - Incoming Live Agent Comment
  • Category: Notifications
  • Conditions: Meet ALL of the following conditions
    • Tags Contains at least one of the following {VTEX tag}
    • Update via Is not Web service (API)
    • Ticket Is Updated
    • Comment Is Present, and requester can see the comment
  1. On Actions, you must select Notify active webhook and the previously configurated webhook.

  2. Add the following code on the JSON body field. Notice that you must replace {{ticket.ticket_field_6228597897108}} with the custom field ID previously created.


_10
{
_10
"conversationId": "{{ticket.external_id}}",
_10
"userPhoneNumber": "{{ticket.requester.phone}}",
_10
"accountPhoneNumber": "{{ticket.ticket_field_6228597897108}}",
_10
"ticket": {
_10
"id": "{{ticket.id}}",
_10
"comment": "{{ticket.latest_public_comment}}",
_10
"author": "{{ticket.latest_public_comment.author.name}}"
_10
}
_10
}

  1. Create another trigger that will be activated when a support agent resolves a ticket. Fill the trigger form with the following information:

{"base64":"  ","img":{"width":1300,"height":1066,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":102576,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/create-zendesk-integration-1.png"}}

  • Conditions:
    • Meet ALL of the following conditions
      • Tags Contains at least one of the following {VTEX tag}
    • Meet ANY of the following conditions
      • Status Changed to Solved
      • Status Changed to Closed
  1. On Actions, you must select the Notify active webhook and the previously configurated webhook.
  2. Add the following code on the JSON body field. Notice that you must replace {{ticket.ticket_field_6228597897108}} with the custom field ID previously created.

_10
{
_10
"conversationId": "{{ticket.external_id}}",
_10
"userPhoneNumber": "{{ticket.requester.phone}}",
_10
"accountPhoneNumber": "{{ticket.ticket_field_6228597897108}}",
_10
"event": {
_10
"type": "enable_bot"
_10
}
_10
}

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page