Performing ticket actions based on who is CC'd

It is possible to perform ticket actions based on who is CC'd on a ticket. For example, every time the accounting department is CC'd you could automatically do something, like popping up a notification or applying a specific task list. 

 

Performing a ticket action based on who is CC'd can be done with the following 3 steps: 

1. Create a target to update the ticket.

2. Create a trigger that converts the CCs into tags.

3. Create a trigger that performs actions based on the tag.

 

Step 1

To create the target in Zendesk, click on the cog in the left bar, then on Extensions and then on add target like this: 

SweetHawk__-_Agent.png

Then click to create an HTTP target like this:

SweetHawk__-_Agent.png

 

Give the HTTP target a name and in the URL section add the following...

https://yourhelpdesk.zendesk.com/api/v2/tickets/update_many.json

...Where yourhelpdesk is the URL name used for your helpdesk. 

Then, set the Method to PUT, the content type to JSON, put in your Zendesk user credentials and click to create the approval like this: 

SweetHawk__-_Agent.png

 

Step 2

To create a trigger to convert the CC addresses to tags click on the cog on the left, go to Triggers and click add trigger like this:

SweetHawk__-_Agent.png

 

Then give your trigger a name and set the conditions for when you want it to fire like this: 

SweetHawk__-_Agent.png

Under the Actions section, set a rule to Notify target and select the target you created in step 1. 

Then in the JSON body section. copy and paste in the following code:

 

{
"tickets": [
{
"id": "{{ticket.id}}",
"additional_tags": [{% for cc in ticket.ccs %}"{{ cc.email }}"{% if forloop.last == false %},{% endif %}{% endfor %}]
}
]
}

Finally, click to save the trigger at the bottom.

The Actions section should look something like this:

updatemyticket.jpg

Step 3

To take action on the support tickets with a specific tag, once again you will need to click on the cog on the left, go to Triggers and click add trigger like this:

 

SweetHawk__-_Agent.png

Then give the trigger a name as to what the action will be. 

 

Next set a rule to look for the tag that matches the email address in question. 

 

Note: Tags can not include @ symbols, so when you write your tag, ensure that it matches the email address precisely with the exception that the @ symbol should be removed. Ie. instead of setting the rule to look for the tag accounting@company.com, set it to look for the tag accountingcompany.com. 

 

Next, in the Actions section, ensure that you set a rule to remove the tag the conditions are checking for. This will ensure that the trigger does not 'loop' and continue firing 

 

SweetHawk__-_Agent.png

Lastly, you can add further actions to the trigger to ensure that what you want to happen, happens. In the case below, it has been set to automatically apply a task list to the ticket while also sending an emailing notification to Fin Raziel informing her of the ticket:

SweetHawk__-_Agent.png

After creating the trigger, you can test this process by sending in a ticket where the relevant CC address has been added. 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.