How to configure Zendesk for integration with ONEiO

Introduction

This document shows an example of what needs to be done in Zendesk to make it integration-ready with the endpoint in your ONEiO. Note also, that the amount of fields used in integrations might vary. 

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 support@oneio.cloud.

You can sign up for a free trial of ONEiO from the following link: ONEiO Free Trial

Sending messages from ONEiO to Zendesk

mceclip3.png

ONEiO accesses Zendesk by using the Zendesk REST API.

Create Integration user to Zendesk

Add integration user to Zendesk. This user is used be able to create an update the entities that are integrated. Zendesk API uses API tokens instead of the password of the user. To create a token navigate to Settings → Channels → API. Remember to name your token so you recognise it in the future.

Sending messages from Zendesk to ONEiO

mceclip4.png

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

 

Create HTTP target

  • Settings → Extensions → add target → HTTP target
  • Name: ONEiO Integration Target
  • URL: 
    • For QA: https://rest-receiver-test.service-flow.com/api
    • For Production: https://rest-receiver.service-flow.com/api
  • Method: POST
  • Content type: JSON
  • Basic Authentication: you will receive these credentials from ONEiO UI's endpoint configuration

mceclip0.png

 

Create trigger(s)

To be able to send out updates and comments properly, you need two triggers; one that handles only new comments and one that handles all the rest.

You can modify the outbound payload as you like as long as you keep the "ticket" as the base container and keep "id" as one of the attributes. You can find the list of possible placeholders from Zendesk Documentation 

Trigger 1 - Ticket updates.

  • Business rules → Triggers → Add trigger
  • Trigger name: ONEiO Integration
  • Add at least the following condition:
    • Ticket update via - is not - Web service (API)
    • (add more conditions according to your use-case)
  • Perform these actions: 
    • Notifications: Notify target → ONEiO Integration Target
  • JSON body:
{
"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}}",
"priority": "{{ticket.priority}}",
"created_at_with_timestamp": "{{ticket.created_at_with_timestamp}}",
"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 %}
]
}
}
mceclip2.png
 

Trigger 2 - New comments.

  • Business rules → Triggers → Add trigger
  • Trigger name: ONEiO Integration - new comment
  • Add at least the following condition:
    • Ticket update via - is not - Web service (API)
    • Comment is present (public or private)
    • (add more conditions according to your use-case)
  • Perform these actions: 
    • Notifications: Notify target → ONEiO Integration Target
  • JSON body:
{
"ticket": {
"id": "{{ticket.id}}",
"external_id": "{{ticket.external_id}}",
"title": "{{ticket.title}}",
"description": "{{ticket.description}}",
"requester_name": "{{ticket.requester.name}}",
"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}}",
"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 %}
]
}
}
}
mceclip0.png
 
 
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.