Freshservice Integration

Freshservice is a plug and play ITIL service desk on the cloud. Freshservice triggers webhook actions and sends webhook notifications on ticket actions (Create, Close, Add note etc). Forwarding Freshservice webhooks to OpsGenie notifies users via iPhone and Android push notifications, email, SMS, and phone calls, tracks the alert lifecycle, escalates alerts, etc.

What does OpsGenie offer to Freshservice users?

Use OpsGenie's Freshservice Integration to forward Freshservice alerts to OpsGenie. OpsGenie determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

  • When a new ticket created in Freshservice, an alert is also created in OpsGenie automatically through the integration.
  • When status of triggered event is changed between from 2 or 3 to 4 or 5, OpsGenie automatically closes the alert.
  • If Send Alert Updates Back to Freshservice is enabled, actions for Freshservice will be executed in Freshservice when the chosen action is executed in OpsGenie for alerts which are created by the Freshservice integration.
  • If Create Freshservice Tickets for OpsGenie Alerts is enabled, actions for Freshservice will be executed in Freshservice when the chosen action is executed in OpsGenie for alerts which have a source other than the Freshservice integration.
  • These action mapping features are explained in detail in the Action Mapping Feature section below.

Add Freshservice Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done so already.
  2. Go to OpsGenie Freshservice Integration page.
  3. Specify who is notified of Freshservice alerts using the Teams field. Auto-complete suggestions will be provided as you type.
  4. Copy the URL.
  5. Click Save Integration.

Configuration on Freshservice

  • If you are using new version of Freshservice:
  1. From Admin -> Workflow Automator, click New Automator and select Ticket.
  1. Add new event and set the following rules:
    1) "Status Is Changed" From "Closed" To "Any Status" (For reopened tickets' notifications)
    2) "Status Is Changed" From "Any Status" To "Close" (For closed ticket's notifications)
    3) "Status Is Changed" From "Resolved" To "Any Status" (For reopened tickets' notifications)
    4) "Status Is Changed" From "Any Status" To "Resolved" (For resolved ticket's notifications)
  2. Add an Action for the event and choose Trigger Webhook.
  3. Paste the integration URL to "Callback URL" field.
  1. Set "POST" as request type, Encoding "JSON" and content "Simple".
  2. Enable all fields in the content field.
  3. Click Done.
  1. Select Activate.
  1. Add another event and set the following rule:
    1) "Note is Added" Type "Public" (For Public note notifications)
  1. Add an Action for the event and choose Trigger Webhook.
  2. Paste the integration URL to "Callback URL" field.
  3. Set "POST" as request type, Encoding "JSON" and content "Advanced".
  4. Paste the JSON from here.
  1. Click Done.
  2. Select Activate.
  3. Add another event and set the following rule:
    1) "Note is Added" Type "Private" (For Private note notifications)
  1. Add an Action for the event and choose Trigger Webhook.
  2. Paste the integration URL to "Callback URL" field.
  3. Set "POST" as request type, Encoding "JSON" and content "Advanced".
  4. Paste the JSON from here.
  1. Click Done.
  2. Select Activate.

If you are using old interface of Freshservice:

A "Dispatch'r Rule" is needed to send webhook notifications for newly created tickets and an "Observer Rule" is needed to send notifications on ticket actions(Add note, close, reopen etc).

Adding Dispatch'r Rule

  1. From Admin -> Dispatch'r Rule screen, click "add rule".
  2. Set rule's name as "OpsGenie Create Alert"
  3. In actions section, choose "Trigger Webhook" from dropdown.
  4. Paste the integration URL to "Callback URL" field.
  5. Set "POST" as request type, Encoding "JSON" and content "Simple"
  6. Enable all fields in the content field.
  7. Click "Save"

Adding Observer Rule

  1. From Admin -> Observer Rule screen, click "add rule".
  2. Set rule's name as "OpsGenie Add Note Or Close Or Re-open"
  3. In "When Any of these events occur" populate following conditions with the given order:
    1) "Status Is Changed" From "Closed" To "Any Status" (For reopened tickets' notifications)
    2) "Status Is Changed" From "Any Status" To "Close" (For closed ticket's notifications)
    3) "Status Is Changed" From "Resolved" To "Any Status" (For reopened tickets' notifications)
    4) "Status Is Changed" From "Any Status" To "Resolved" (For resolved ticket's notifications)
    5) "Note is Added" Type "Any" (For Private and Public note notifications)
  4. In actions section, choose "Trigger Webhook" from the dropdown.
  5. Paste the integration URL to "Callback URL" field.
  6. Set "POST" as request type, Encoding "JSON" and content "Simple"
  7. Enable all fields in the content field.
  8. Click "Save"

Action Mapping Feature

  • OpsGenie allows customers to define action mappings between OpsGenie actions and Freshservice actions.

For alerts created by Freshservice

  • You can use this section to map OpsGenie actions to Freshservice actions when the source of the alert is Freshservice (i.e When the alert is created by Freshservice integration.)
  • You can map different OpsGenie actions to different Freshservice actions. For example, you can add public comment to Freshservice ticket, when the alert is acknowledged. In order to do this, you should define If alert is acknowledged in OpsGenie, add it as a public comment to ticket in Freshservice. mapping in Send Alert Updates Back to Freshservice section.

For other OpsGenie alerts

  • You can use this section to map OpsGenie actions to Freshservice actions when the source of the alert is NOT Freshservice (i.e When the alert is created by another integration.)
  • For this purpose, you can use Create Freshservice Tickets for OpsGenie Alerts section. In order to use this functionality, you need to map one OpsGenie action to create an issue Freshservice action. The OpsGenie action doesn't have to be alert is created, it can be other actions as well.
  • a tag is added to the alert and a custom action is executed on alert actions differ from other actions. When you select one of these actions, you'll see an extra field to enter for which tags or for which custom action this mapping will work.
  • You can enter multiple tags by separating the tags with a comma. If you enter multiple tags, the mapping will work if the alert has one or more of the specified tags. You can also leave the tags field empty, if you would like the mapping to work for any tag.
  • If you map an OpsGenie action to multiple Freshservice actions, you will get an error except for the a tag is added to the alert and a custom action is executed on alert actions. You can save multiple mappings for these actions, because they will differ by the given tags and the given custom action names.

Sample payload sent from Freshservice to OpsGenie

{
  "freshdesk_webhook": {
    "ticket_id": "INC-3",
    "ticket_subject": "trial",
    "ticket_description": "Test ticket",
    "ticket_url": "https://opsgenie.freshservice.com/helpdesk/tickets/3",
    "ticket_public_url": "https://opsgenie.freshservice.com/public/tickets/cfc13eb4a143ef632d219870a11ee6cd",
    "ticket_portal_url": "https://opsgenie.freshservice.com/support/tickets/3",
    "ticket_due_by_time": "Thu, 27 Aug, 2015 at 3:36 PM GMT +0300",
    "ticket_tags": "tag1, tag",
    "ticket_latest_public_comment": null,
    "ticket_group_name": "grp1",
    "ticket_agent_name": "agent1",
    "ticket_agent_email": "agent1@asd.com",
    "ticket_satisfaction_survey": "asd",
    "ticket_department_name": "Customer Support",
    "approval_url": null,
    "approval_portal_url": null,
    "ticket_status": "Open",
    "ticket_priority": "Low",
    "ticket_source": "Phone",
    "ticket_type": "Incident",
    "ticket_requester_name": "Tuba Ozturk",
    "ticket_requester_firstname": "Tuba",
    "ticket_requester_lastname": "Ozturk",
    "ticket_requester_email": "tubaozturk92@gmail.com",
    "ticket_requester_phone": "1234",
    "ticket_requester_address": "",
    "helpdesk_name": "opsgenie",
    "triggered_event": "{ticket_action:created}"
  }
}

This payload is parsed by OpsGenie as:

{
    "ticket_id" : "2",
    "subject" : "test subject",
    "description" : "test deskripsiyon",
    "url" : "2",
    "portal_url" : "https://opsgenie.freshdesk.com/support/tickets/2",
    "due_by_time" : "March 23 2016 at 10:06 AM",
    "tags" : [
        "tag1", "tag2"
    ],
    "latest_public_comment" : "pablik",
    "group_name" : "Product Management",
    "agent_name" : "eycint",
    "agent_email" : "agent1@asd.com",
    "satisfaction_survey" : "test data",
    "status" : "Open",
    "priority" : "Medium",
    "source" : "Phone",
    "ticket_type" : "Incident",
    "requester_name" : "halit okumus",
    "requester_first_name" : "halit",
    "requester_last_name" : "Incident",
    "requester_phone" : "1222",
    "requester_address" : "adres",
    "company_name" : "OpsGenie",
    "company_description" : "compa desc",
    "company_note" : "compnot",
    "helpdesk_name" : "opsgenie",
    "event_type" : "Create"
}

Sample Alert

Freshservice Integration

Freshservice is a plug and play ITIL service desk on the cloud. Freshservice triggers webhook actions and sends webhook notifications on ticket actions (Create, Close, Add note etc). Forwarding Freshservice webhooks to OpsGenie notifies users via iPhone and Android push notifications, email, SMS, and phone calls, tracks the alert lifecycle, escalates alerts, etc.