/
Create Zendesk ticket from Jira Issue

Create Zendesk ticket from Jira Issue

Create ticket from issue

  1. Goto Integrations

  2. Click New

  3. Enter a name, we will call it: Create Zendesk ticket from issue

  4. Select Template application/json

  5. Click Create

Edit the action details

  1. Select method POST

  2. Add URL {your_instance_url}/api/v2/tickets

  3. In the Authentication method select list select the credential created earlier (Token or OAuth)

  4. In the Body section add

    { "ticket": { "comment": { "body": "{{issue.description}}" }, "priority": "urgent", "subject": "{{issue.summary}}" } }


Note. it is recommended to add the base url to your zendesk instance as a Variable to easier refer to it in further actions. We will add a static variable called zendesk. This will make our call look like this {{zendesk}}/api/v2/tickets

Second note. if priority needs to be mapped then Groovy can be used to make the mapping see Mapping of priority. We will hard code it in this tutorial.

 

Example setup

Add Trigger

  1. Click on the Triggers & Condition tab

  2. We will use the Issue Created as event to when to send the issue to zendesk

  3. Use the condition Run only on these project(s) and/or JQL and select the Jira project that will be the source for all Zendesk issues

  4. Click Save

Add a Action to set the ID from the Zendesk ticket in the Jira Issue

  1. Click Create (top menu)

  2. Select Action and enter a name: Add Zendesk ticket number to issue

  3. Select Template Category: Jira Core Server

  4. Select Template: Edit Issue 

  5. Click Create

  6. In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)

  7. In the body section paste the code in below and change the customfield id to match your field.

{ "fields":{"customfield_10201":"{{id}}"} }

Note. If you have not setup a field to add the ticket number in from external system, then add a new Text field in Jira and add that to the Jira project, context and screen.

Testing

  1. Goto the project that was selected in the Run only on these project(s) and/or JQL and create an issue with description.

  2. Result should be a 201 OK





Related content

Zendesk - setup API token
Zendesk - setup API token
More like this
Add Comment to Zendesk ticket from Jira comment
Add Comment to Zendesk ticket from Jira comment
More like this
Zendesk - setup OAuth
Zendesk - setup OAuth
More like this
Create an Integration
Create an Integration
More like this
Incoming Webhooks example
Incoming Webhooks example
More like this
Create a user and find a user
Create a user and find a user
More like this