How to configure Zendesk for integration with Service-Flow

Introduction

This document shows an example of what needs to be done in Zendesk to make it integration-ready with Service-Flow (S-F). Note also, that the amount of fields used in integrations might vary. The document also describes what S-F needs to be able to send messages to the Zendesk instance.

Note that to be able to use any integration features in Zendesk, you need to have at least Support Team subscription level. Essential subscription plan does not include the needed features.


For any questions related setting up the integration, please send mail to experience@service-flow.com.

Sending messages from Service-Flow to Zendesk

S-F accesses Zendesk with using Zendesk REST API.

Create Integration user to ServiceNow

Add integration user to Zendesk. This user is used be able to create an update the entities that are integrated. These credentials need to be inserted to Service-Flow's end-point configuration.

Sending messages from Zendesk to Service-Flow

Zendesk accesses S-F with form-encoded HTTP requests. The needed parts are HTTP Target and a TriggerThe following chapter explains how to configure the needed functions to trigger calling the web services when inserting and/or updating incidents in Zendesk.

Incident integration

Create an ID attribute to incident table

You need to have an attribute to match updates coming from external vendors system. This field is typically called Correlation ID (correlation_id). You can use a field of you choice but in this guide correlation id is used.

Create HTTP target

Settings → Extensions → add target → HTTP target

Name: Service-Flow Integration Target

URL: https://rest-receiver-test.service-flow.com/api

Method: POST

Content Type: JSON

Authentication: you will receive these credentials from Service-Flow UI's endpoint configuration

Create a trigger

Business rules → Triggers → Add trigger

Trigger name: Service-Flow Integration

Add at least the following condition:

    • Ticket update via - is not - Web service (API)

Perform these actions: 

    • Notifications: Notify target → Service-Flow Integration Target

JSON body


JSON
{
  "ticket": {
    "id": "{{ticket.id}}",
    "external_id": "{{ticket.external_id}}",
    "title": "{{ticket.title}}",
    "description": "{{ticket.description}}",
    "requester_email": "{{ticket.requester.email}}",
    "assignee_name": "{{ticket.assignee.name}}",
    "status": "{{ticket.status}}",
    "priority": "{{ticket.priority}}",
    "created_at_with_timestamp": "{{ticket.created_at_with_timestamp}}",
    "comments": "{{ticket.comments}}",
    "latest_comment" : {
        "id" : "{{ticket.latest_comment.id}}",
        "value" : "{{ticket.latest_comment.value}}",
        "attachments" : [
            {% for attachment in ticket.latest_comment.attachments %}
              {
                "filename" : "{{attachment.filename}}",
                "url" : "{{attachment.url}}"
              }
              {% if forloop.last == false %}
                ,
              {% endif %}
            {% endfor %}
          ]
    },
    "sf_attachments" : [
            {% for attachment in ticket.latest_comment.attachments %}
              {
                "filename" : "{{attachment.filename}}",
                "url" : "{{attachment.url}}"
              }
              {% if forloop.last == false %}
                ,
              {% endif %}
            {% endfor %}
          ]
  }
}