Sending ticket notifications to HipChat rooms Follow

Comments

18 comments

  • Avatar
    sreenath (Edited )

    Awesome Its worked

  • Avatar
    Jessie Schutz

    Hey sreenath! I'm glad you got it working! :)

  • Avatar
    Adam Chase (Edited )

    EDIT: I'm not on the beta :(

    My integration does not show Content Type. I do have:

    Title
    URL
    Method
    Attribute Name
    Basic Authentication

    I'm a little lost.

  • Avatar
    Jessie Schutz

    Hi Achase!

    As noted at the top of the article, you need to be part of the Targets V2 beta in order to have access to the settings detailed there. You can apply to be a part of here: Targets V2 Beta.

    Hope that helps!

  • Avatar
    Mark Roeling

    Hi, just ran into a problem with the integration, and found the solution as well.

    The problem occured in Google Chrome, every time giving an 401 Unauthorized error.
    What happened, was that although the authentication checkbox was unchecked, the integration did also send a basic authentication header as well. It turned out that Chrome auto-filled the loginname / password fields, and that these fields were sent within the request.

    (temp) solution: check the checkbox, clear the fields, save the form.

    @Devs: unset the fields in case the checkbox isn't checked. Should solve problems to many ;)

  • Avatar
    Jessie Schutz

    Hi Mark! Thank you so much for sharing your solution! If you'd like, you can post a more detailed explanation of the issue and solution in our Tips & Tricks forum...we'll send you swag!

  • Avatar
    Robert Jerina (Edited )

    @Bert Pattyn thanks for the HTML JSON format. I am having one problem though with the HTML link. It shows up in the chat as a link. If I mouse over it, it underlines like it is a link and it's blue. But no one seems to be able to actually click on it and open the link. I tried adding "target="_blank"" to the HREF but still no dice.

    edit: Figured it out. Do this instead (use single quotes):

    {
    "color": "purple",
    "message_format": "html",
    "message": "<b>[New Ticket] <a href='{{ticket.link}}'>{{ticket.title}}</a></b><br /><b>Customer: {{ticket.organization}} </b>"
    }

  • Avatar
    Bert Pattyn

    Indeed Robert. Same thing if you use images:
    "message": "<img src='http://example.com/image.png' /> something"

  • Avatar
    Zaui Support

    I've got everything working but the hipchat emoticon. Help?

    {
    "color": "purple",
    "message_format": "html",
    "message": "<b>(doh) New ticket by {{ticket.requester.name}} ({{ticket.organization.name}}): <a href='{{ticket.link}}'>{{ticket.title}}</a> {{ticket.latest_public_comment_formatted}}</b>"
    }

  • Avatar
    Michael Liebman

    @Brittany, you can't mix HTML and emoticons in the HipChat API. See the documentation for the message_format property at https://www.hipchat.com/docs/apiv2/method/send_room_notification

  • Avatar
    Karl

    Hey guys,

    I noticed the article was updated with the new Card Notification style now support by hipchat however there are no instructions on tweaking that card notification. Any changes I seem to make break it. 

    I have tried adding an assignee field to tickets that are updated and i have also tried changing the colour and they just do not work. Unable to find any information on how to amend these cards via Hipchat support either...

    Code:

    {
    "color": "gray",
    "message_format": "text",
    "card" : {
    "style": "application",
    "format": "compact",
    "url" : "{{ticket.link}}",
    "id": "{{ticket.id}}",
    "title" : "#{{ticket.id}} - {{ticket.title}}",
    "icon": {
    "url": "https://zen-marketing-product.s3.amazonaws.com/product/images/zd.png"
    },
    "attributes": [
    {
    "label": "Ticket Source",
    "value": {
    "label": "{{ticket.via}}"
    }
    },
    {
    "label": "Status",
    "value": {
    "color": "gray",
    "label": "{{ticket.status}}"
    }
    },
    {
    "label": "Assignee",
    "value": {
    "label": "{{ticket.assignee.name}}"
    }
    }
    ]
    }
    }

  • Avatar
    Paul Meelen

    made the triggers and it all works, but........ The ticket created trigger is working 50%. When we create a ticket in zendesk the trigger is pushing the notification into hipchat. But when we receive a ticket by email no notifications are send.

    The weird thing is that inside the ticket events we see the correct trigger listed but nothing in hipchat. Why??

    When an email is send the priority isn't set. :) So keep this in mind ;)

    And we only see the card, the message isn't also showing.

    {
    "color": "gray", 
      "message_format": "text", 
      "card" : {
        "style": "application",
        "format": "compact",
        "url" : "{{ticket.link}}",
        "id": "{{ticket.id}}",
        "title" : "ZD#{{ticket.id}} - {{ticket.title}}",
        "icon": {
          "url": "https://zen-marketing-product.s3.amazonaws.com/product/images/zd.png"
        },
        "attributes": [
          {
            "label": "Priority",
            "value": {
              "label": "{{ticket.priority}}"
            }
          },
          {
            "label": "Status",
            "value": {
              "label": "{{ticket.status}}"
            }
          }
        ]
      },
      "message": "A ticket was created {{ticket.link}} "
    }
  • Avatar
    Jon Daniels (Edited )

    Paul, I think you are correct, the reason this isn't pushing is due to the Priority restriction in the trigger, so if you remove that, I think this should push every ticket into HipChat.

    I created a HipChat account to test this JSON, and it does appear that the message does not go through with the card (although I do see the ticket title as outlined in the JSON).

    I'm still testing this, and will reach out here again when I find the reason for this behavior.

  • Avatar
    Paul Meelen

    @jon: i noticed that the message is used for the mobile hipchat and the card for the desktop/web client. :)

  • Avatar
    Paul Meelen

    Now i need to found a way to trigger a notification when a customer leafs a Good satisfaction or a good + comment. But when i tried different options no notification was send.

    Used trigger:

    When satisfaction changed to good with comment.

    But no trigger was set :(

    {
      "color": "green",
      "notify": "true",
      "message_format": "text",
      "card" : {
        "style": "application",
        "format": "compact",
        "url" : "{{ticket.link}}",
        "id": "{{ticket.id}}",
        "title" : "ZD#{{ticket.id}} - {{ticket.title}}",
        "icon": {
          "url": "https://pbs.twimg.com/profile_images/649557118916390912/ehy3smvl_bigger.jpg"
        },
        "attributes": [
          {
            "label": "Requester",
            "value": {
              "label": "{{ticket.requester.name}}"
            }
          },
          {
            "label": "Satisfaction",
            "satisfaction_rating": {
              "score": "{{satisfaction.current_rating}}",
              "comment": "{{satisfaction.current_comment}}"
            }
          }
        ]
      },
      "message": "A ticket was rated {{ticket.link}} "
    }
  • Avatar
    Jon Daniels (Edited )

    Interesting, Paul! This sounds like it may be an issue with the trigger, so I am reaching out directly to you regarding this, so we can troubleshoot this a bit more in-depth.

    As for getting both the message (which you correctly identified as non-web message) and a description in the card, you would want to use "description", as shown here:

    {
    "color": "gray",
    "message_format": "text",
    "card" : {
    "style": "application",
    "format": "compact",
    "url" : "{{ticket.link}}",
    "id": "{{ticket.id}}",
    "title" : "ZD#{{ticket.id}} - {{ticket.title}}",
    "description": "A high-priority ticket was created: {{ticket.link}}",
    "icon": {
    "url": "https://zen-marketing-product.s3.amazonaws.com/product/images/zd.png"
    },
    "attributes": [
    {
    "label": "Priority",
    "value": {
    "label": "{{ticket.priority}}"
    }
    },
    {
    "label": "Status",
    "value": {
    "label": "{{ticket.status}}"
    }
    }
    ]
    },
    "message": "A high-priority ticket was created {{ticket.link}} "
    }

     

    I'm seeing if we can update our documentation for this improved card notification here.

  • Avatar
    Tanya Fraser

    I am struggling to amend the above examples to include most recent comment (in the case of the updated ticket).
    I attempted to create a card notification of any updates with the most recent enduser comment, but failed dismally.

    Any help to add the most recent enduser comment to either the quoted updated ticket example, or, even better, a card version, would be HUGELY appreciated.

     

  • Avatar
    Paul Meelen

    For an updated ticket trigger to hipchat i am now using this code:

    {
    "color": "yellow",
    "message_format": "text",
    "message": "#{{ticket.id}} '{{ticket.title}}' was updated. Status: {{ticket.status}}. {{ticket.link}}"
    }

    This will show the following:

    And the used trigger settings (maybe a bit more extra options to exclude extra notifications in hipchat)

Please sign in to leave a comment.

Powered by Zendesk