Notify an agent of special instructions or requirements when solving tickets

Answered

1 Comments

  • Dan Cooper
    Community Moderator

    Mo Elsopki,

    I've done this a few ways.  All are dependent on a customer user/org field that you populate with your special instructions. In the examples below, I assume you create this field with the field key of special_instructions.

    via User Data

    Zendesk provides an app called User Data that lets you display custom user and organization fields in the ticket sidebar. This is the easiest to implement.  Train your team to review this app before replying.

    via Trigger to HTTP Target

    Create an HTTP Target

    • URL (replace SUBDOMAIN with your own, note the placeholder for {{ticket.id}} should stay the same.) 
      https://SUBDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}}.json
    • Method:  PUT
    • Content Type: JSON
    • Basic Authentication: Enabled, enter your admin username + password or {{username}}/token + token 

    Create a trigger

    • Set any conditions you want to apply for your target.  I would recommend having it apply the special instructions on creation.  On each update might be excessive because this is going to publish a private comment each time the trigger notifies your target. 
    • Set your Action to Notify Target and select the HTTP Target you created. 
    • Set the body of the Notify Target action to. Note that the body is looking for a placeholder of your custom field.
    {
    "ticket": {
    "comment": {
    "body": "{{ticket.requester.custom_fields.special_instructions}}",
    "public": false
    }
    }
    }

    Now when you trigger fires, your special instructions will be published to the ticket as an internal note on the ticket.  Train your team to review the full ticket comments before replying.

    via App Framework

    You can build an app using the Zendesk App Framework, below is the code you would need to pull the custom field you created above for the currently selected ticket's requester and to display a red alert on the screen for 5 seconds.  This is going to get you actual alerting, but you have to do more with code.  Note there is more code than this, but this is the logic to accomplish what you want outside of the basic app pieces.

    $(function () {
    var client = ZAFClient.init();
    client.get('ticket.organization').then(function (data) {
    var special_instructions = data['ticket.requester'].userFields.special_instructions
    if (special_instructions) {
    client.invoke('notify', "special_instructions, 'alert', 5000)
    }
    })
    });
    2

Please sign in to leave a comment.

Powered by Zendesk