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 webhook 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 webhook in Zendesk, follow the first 3 steps in this article, with one difference; When it comes to setting the Endpoint URL in step 3, set it with this URL instead: 

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

 

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 active webhook and select the webhook 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:

Zendesk_Admin_Center.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?
2 out of 2 found this helpful