Forums/Documentation/Managing your support workflow

Notifying external targets

Anton de Young
posted this on April 07, 2011 08:50

You can notify external targets when a ticket is created or updated. External targets are cloud-based applications and services (such as Twitter and Twilio) as well as HTTP and email. Here are some examples of how and why targets are used:

  • Sending an SMS text message when an urgent ticket has been unattended for more than 48 hours
  • Sending a notification to a Twitter stream when a new urgent ticket is created
  • Creating a Salesforce case from a ticket
  • Synchronizing ticket comments in a JIRA bug base

Those are just a few examples. See Setting up a target below for more information about the targets available in Zendesk.

Targets are used in automation and trigger actions. First you configure a target and then you specify the target using the Notify target action.

Setting up a target

In addition to generic targets for HTTP and email targets, Zendesk provides you with predefined targets for well-known cloud-based applications and services.

Table 1

Targets Target Description
Atlassian JIRA

The JIRA target allows you to push comments made in Zendesk tickets to JIRA so that you can keep associated tickets synchronized.

Basecamp
Using the Basecamp target, you can push ticket updates to a project as:
  • New messages in a project
  • New comments in a specific message
  • New ToDo list
  • New ToDo item in a specific todo list

You need to enable API access in your Basecamp account to use this target. For information about setting up Basecamp, see Setting up and using Basecamp.

Campfire Send notifications to a Campfire chat room. See Adding Campfire to your Zendesk.
Clickatell

Use this target to send SMS messages using your Clickatell account.

Follow the steps in Clickatell HTTP API Guide to setup the account, add a HTTP connection and obtain an API ID.
Email Send emails to specific addresses. You can define the action in a trigger or automation.
Flowdock Post updates as messages in a Flowdock flow.
Get Satisfaction

Post public comments to Get Satisfaction topics for tickets created using the Zendesk moderator tool in Get Satisfaction.

By creating this target, Zendesk will automatically create the necessary triggers and views and also add a useful widget in the home and ticket pages (you can remove those widgets if you don't need them).

HTTP request Make a GET or POST request to any HTTP address. You can include URL parameters and use Zendesk placeholders as parameters. Example: www.some-address.com?customer_name={{ticket.requester.name}}. Set up a script on your server to receive the request, and then you can do just about anything from there.
Microsoft Dynamics CRM Push ticket data to a Microsoft Dynamics CRM case.
Pivotal Tracker

Create stories in Pivotal Tracker from a Zendesk ticket to easily prioritize support issues in your project backlog.

The Pivotal Tracker target sends the Zendesk ticket ID to Pivotal Tracker when creating a new story.

If you have enabled Pivotal Tracker's native Zendesk integration in the target Tracker project, a link back to the Zendesk ticket is created in the new story.
Salesforce

Create a Salesforce case from a Zendesk ticket.

When you set up this target, Zendesk automatically creates an example trigger for you.
SugarCRM Push ticket data to a SugarCRM case.
Twillio

Use this target to send SMS messages to a mobile phone using your Twilio account.

Twitter

Send notifications to a Twitter stream.

Note: Make sure that you protect your twitter stream if you don't want notifications to be readable by the general public.
Yammer

Send notifications to a Yammer stream.

Follow the steps in this Yammer Target Guide to create a client application in Yammer and authorize this target to use the Yammer API. For more information, see Notifying your Yammer stream.
Note: To set up many of these external targets, you'll need to consult their documentation. Some targets, such as Twitter, merely require that you authorize your account before you can begin posting messages.
To add a target
  1. Click the Manage icon () in the sidebar, then select Extensions.
    Zendesk Classic: Select the Settings menu, then select Extensions.
  2. Click the Targets tab.
  3. Select Add target.
  4. All of the target options are listed. Select the type of target and enter the required target information (which varies from target to target).
  5. Click Create Target.

Managing your targets

Once you've set up targets, you can edit, delete, and deactivate and reactivate them.

To edit a target
  1. Click the Manage icon () in the sidebar, then select Extensions.
    Zendesk Classic: Select the Settings menu, then select Extensions.
  2. Click the Targets tab.
  3. Locate the target you want to edit and click Edit.
  4. Make your changes and then click Update Target.
To delete a target
  1. Click the Manage icon () in the sidebar, then select Extensions.
    Zendesk Classic: Select the Settings menu, then select Extensions.
  2. Click the Targets tab.
  3. Locate the target you want to edit and click Edit.
  4. Select Delete Target.
To deactivate/reactivate a target
  1. Click the Manage icon () in the sidebar, then select Extensions.
    Zendesk Classic: Select the Settings menu, then select Extensions.
  2. Click the Targets tab.
  3. Locate the target you want to deactivate and select Deactivate.
  4. To reactivate the target, select it from the list of inactive targets and select Activate.

Using targets in automations and triggers

Once you've set up targets, you can use them in automations and triggers. Here's an example of a trigger that notifies a Twitter account when an urgent ticket is created:

Since you're interacting with external targets, there may be a delay between when a trigger or automation runs and when you'll see the results in the external target (in the example above, that would be your Twitter home page or stream).

Zendesk attempts to send the notification 10 times. If all attempts fail, the target is deactivated. You'll then need to edit and test and reactivate the target before you can try to use it again.

 

Comments

User photo
Kathryn

Is it possible to set a target to include more than one email address in the same target?  I.e. - when we receive a ticket from a certain organization we want to be able to trigger an email to the same 5 end users from their organization every time.  We have about 12 organizations we do this with, and it's getting cumbersome to have separate targets and triggers for each person.

April 16, 2012 10:52
User photo
Sara Menefee
Zendesk

Hi there Kathryn, Sorry for the delay in this response. At the present time there is not a way to set an e-mail Target to multiple e-mails at a time. You could however potentially set-up a central Target e-mail address from your mail server system that forwards to multiple e-mail addresses - if your mail server allows for this. 

June 26, 2012 09:58
User photo
Alexander Dobronte

Is it possible to add a new target? We are an online survey tool provider and we would like to offer Zendesk users the ability to automatically send a survey when certain criteria are met, such as when a ticket closes. I was looking at the Apps documentation, but I did not see anything about targets. On our platform, it is possible to setup triggers when respondets answer a certain way. For instance, if they are very dissatisfied, a Zendesk ticket can be created automatically so that someone can call them and try to win them back. 

September 19, 2012 07:29
User photo
Bradlee

Alexander, I would like to do a similar thing. This way a new ticket could be generated based on some behavior on an existing ticket. We find that this would be especially useful when working between departments internally. I.e. when the support desk needs to enlist the help of the development group, a trigger could create a new case via email which could programmatically be assigned to our IT staff based on the subject line. 

Maybe there is a way to do this already, I'm just too new with Zendesk to know how to do it. In our case, we don't want to assign the original case to someone in the IT group because typically, our IT group doesn't want to be customer-facing. 

October 01, 2012 21:13
User photo
Matt Dietsche

@Alexander and @Bradlee,

There is an HTTP Request target that allows you to make a GET or POST request to any address along with parameters.  You can even use Zendesk placeholders within your parameters ( like www.some-address.com?customer_name={{ticket.requester.name}} ).

Just set up a script on your own server to receive the request and then can do just about anything from there, including using Zendesk's API to create a new ticket.  Just manage your extensions, click on the target tab, create a new target, and you'll see the HTTP request target option there.

October 12, 2012 07:38
User photo
Mudaser Ali

Hi,

Is there any way to add notify url through API? I didn't found any api method for it.

 

Thanks

March 25, 2013 04:26
User photo
Amy Au-Yeung
Zendesk

Hi Mudaser,

Perhaps you can try adding the following "action" in your API code?

"actions":
[
{
"field": "notification_target",
"value":
[
"2157",
"this is a test for mudaser"
]
}
],

 

note: 2157 is your ID of the target you'd like to notify


Hope this helps! :)

cheers

-amy

April 15, 2013 01:16
User photo
Matthew Mah
sevone

Could someone please confirm to me that it is not possible to use the HTTP Request Target in conjunction with REST API's that expect POST's with a message body consisting of JSON or XML? It looks as if it is only useful for REST API's that use querystring for transmitting data.  

Specifically I am trying to create a case in SalesForce. The case I am trying to create is more complex than the case created with the SalesForce target.  In fact, while I'm here, can someone either explain or point me in the right direction to what 'Notify SalesForce Target' does exactly? There seems like many different reasons to notify SalesForce yet there are no params to set or configure.


Thank you! Appreciate your response :-)

May 01, 2013 12:57
User photo
David Okner
Zendesk

Hey Matthew,

Yes confirmed!

User defined Targets are designed to allow you to setup a FORM type POST, ie Parameters after the URL, as opposed to having a DATA section with a CONTENT TYPE.

As for Salesforce, you cannot custom configure the target. If you are looking for a custom integration I would suggest an API export from SF to Zendesk and then an API export from Zendesk and imported into SF.

Hope this helps.

June 05, 2013 11:38
User photo
Matthew Mah
sevone

Thank you for your response David! I very much appreciate it :)

June 05, 2013 12:23
User photo
Laura Forné Elkow
komfo

This is great! I just setup SMS notifications via the clickatell target. It took a few minutes and works like a charm. Now we get an sms every time one of our VIP clients sends a ticket.

I included the ticket url (placeholder) in the SMS. Is there any way to make the url direct to the ticket in the Zendesk iPhone app?

 

Thanks

July 12, 2013 04:28
User photo
Allen Hancock
theorchardsolutions

Hi all

I'm looking at the generic HTTP post, and can't help but wonder:  is HTTPS supported via the generic target?

 

September 06, 2013 23:00
User photo
Duane

Allen Hancock, I'm only showing http is allowed.  

I'm having trouble trying to get a POST though, the target is receiving all requests from my trigger as GET.   I experienced the same type of issue because of the Zendesk Proxy where with an app I developed we've had to use CORS to get around.  Is anyone else experiencing this?

September 10, 2013 11:44
User photo
Tom Morris

Hey,

Is there any way to change the 'From' address in "Email targets"? Or is this planned? It would be super-useful.

Thanks

September 25, 2013 08:35
User photo
Daniel Pawluk
Zendesk

@Tom,

You can't change the 'From' address for email targets. Depending on your use case there might be some workarounds. You could set up a forwarding rule on a target, set the target to be your 'From' address, then set the rule to forward tickets to the real target. If you do have a use case please share it and maybe we can think of a better workaround.

@Duane,

Can you try adding a new http target, set the dropdown box to POST, then add the post parameters to the url as in the example

http://somedomain/a/path?id={{ticket.external_id}}&status={{tic...

For doing some tests setting up a requestb.in helps a lot, you'll be able to see the post parameters passed to the requestb.in target. Let us know if you're still having trouble and we'll create a ticket for you.

@Allen,

HTTPS targets should work fine. Make sure there are no SSL errors (self-signed certs could pose a problem). You can test this by hitting the tickets endpoint while testing the target. Make sure the username and password are for an admin and in the path try https://subdomain.zendesk.com/api/v2/tickets.json

@Laura,

While it is possible to develop an app to respond like this (i.e. itunes://blahblah will open an app in itunes) there is no current feature like this in Zendesk iOS. This sounds like a perfect candidate for our **[product feedback](https://support.zendesk.com/forums/1848-Product-Feedback)** forums. I know we are still developing features for our iOS app so it wouldn't hurt to suggest this here.

 

-Dan

November 13, 2013 15:15
User photo
Allen Hancock
watchmanmonitoring

Thanks Daniel!

November 19, 2013 20:52
User photo
Anatolii
teslathemes

Hello , 

I am on demo still . Creating an active target - but not appearing under actions select when adding trigger or automation . 

Please advise.

January 06, 2014 08:56
User photo
Emily
Zendesk

Hi Anatolii, 

I was unable to see any active targets created in your account. Make sure you select Settings > Extensions > Targets > Add Target > Email Target. Then fill out the details. This should populate an email target under your Settings > Extensions >  Targets page. If you sign out/sign back in, you should see a notify target option in your trigger conditions pull-down menu.

January 06, 2014 13:04
User photo
Johan Skibdahl
sgnet

Looking for a way to send multiple SMS messages when something occurs. Installed the Clickatel API but looks like I can only send message to one receiver. Any Ideas?

January 27, 2014 11:00
User photo
Seth Wylie
insightsquared

Have you considered using the email version of SMS addresses? (http://www.emailtextmessages.com/) Not sure this would work, depending on exactly who you're trying to alert...

January 27, 2014 11:09
User photo
Johan Skibdahl
sgnet

Targets are customer lists contained in Zendesk. I do not want to keep multiple external lists. I think I somewhere saw a mention about accessing lists in the API, but I'm lost at the moment...  

January 27, 2014 11:46
User photo
Anatolii
teslathemes

Hello , 

the problem was that it did not update . When adding a target i have to log out then log in again to see it active.

Not hard , but took me some headache to realize .

 

January 27, 2014 13:22
User photo
Emily
Zendesk

Hi Anatolii, 

Thanks for clarifying what you were asking. While the system will index your changes, it's much faster to sign out and then sign back in to see the update. Happy to hear you figured that out!

January 27, 2014 16:34