• Get started
  • Documentation

Integrate Opsgenie with Salesforce Service Cloud

Salesforce logo

What does Opsgenie offer Salesforce Service Cloud users?

Use the integration to send Salesforce Service Cloud cases to Opsgenie with detailed information. Opsgenie acts as a dispatcher for Salesforce Service Cloud cases, 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.

This document describes how to configure the integration and details of data that Opsgenie receives from Salesforce Service Cloud.

Functionality of the Integration

  • When a case is created by Salesforce Service Cloud, an alert is created in Opsgenie.

  • When the case's state is changed to Working in Salesforce Service Cloud, the corresponding alert is acknowledged in Opsgenie.

  • When the case's state is changed to Closed in Salesforce Service Cloud, the corresponding alert is closed in Opsgenie.

  • If Send Alert Updates Back to SalesForce Service Cloud is enabled, actions for Salesforce Service Cloud are executed in Salesforce Service Cloud when the chosen action is executed in Opsgenie for alerts which are created by the Salesforce Service Cloud integration.

  • These action mapping features are explained in detail in the Action Mapping Feature section below.

Adding Salesforce Service Cloud Integration in Opsgenie

This integration is only available with Standard and Enterprise plans in Opsgenie, and Premium and Enterprise plans in Jira Service Management.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only. Follow the rest of the steps in this section to set up the integration.

  1. Go to Settings > Integrations. Search for Salesforce Service Cloud and select Add.

  2. Specify who is notified of Salesforce Service Cloud alerts using the Responders field. Auto-complete suggestions are provided as you type.

  3. Copy the integration URL which includes the Opsgenie endpoint as well as the API key.

  4. Select Save Integration.

Configuration on Salesforce Service Cloud

  1. Download the opsgenieClass.apxc file.

  2. In Salesforce Service Cloud, click the Settings icon and click the Developer Console.

  3. In Developer Console page select File and click New -> Apex Class and copy opsgenieClass.apxc, then click Save.

  4. Download the opsgenieTrigger.apxt file.

  5. On the Developer Console page, select File.

  6. Click New -> Apex Trigger and paste opsgenieTrigger.apxt. Then, paste the API URL copied previously into the endpoint field in the trigger function.

  7. Click Save.

Salesforce Service Cloud Apex trigger

8. Go back to the Salesforce page and select Setup from settings and go to Setup->Security->Remote Site Settings page.

9. Add a new remote site: name it "Opsgenie" and then paste the URL copied previously to the "Remote Site URL" field.

10. Click Save.

Salesforce Service Cloud remote site settings

Action Mapping Feature

  • Opsgenie allows customers to define action mappings between Opsgenie actions and Salesforce Service Cloud actions.

For alerts created by Salesforce Service Cloud

  • Use this section to map Opsgenie actions to Salesforce Service Cloud actions when the source of the alert is Salesforce Service Cloud (i.e When the alert is created by Salesforce Service Cloud integration.)

  • Map different Opsgenie actions to different Salesforce Service Cloud actions. For example, set case status to Working in Salesforce Service Cloud, when the alert is acknowledged. In order to do this, define If alert is acknowledged in Opsgenieset case's status to Working in Salesforce Service Cloud. mapping in Send Alert Updates Back to Salesforce Service Cloud section.

Opsgenie to Salesforce alert
  • a tag is added to the alert and a custom action is executed on alert actions differ from other actions. When one of these actions is selected, an extra field appears to enter for which tags or for which custom action this mapping works.

  • Enter multiple tags by separating the tags with a comma. If multiple tags are entered, the mapping works if the alert has one or more of the specified tags. Leave the tags field empty to have the mapping to work for any tag.

  • If an Opsgenie action is mapped to multiple Salesforce Service Cloud actions, an error occurs except for the a tag is added to the alert and a custom action is executed on alert actions. Save multiple mappings for these actions because they differ by the given tags and the given custom action names.

Salesforce Service Cloud tags

For other Opsgenie alerts

  • Use this section to map Opsgenie actions to Salesforce actions when the source of the alert is NOT Salesforce (i.e When the alert is created by another integration.)

  • For this purpose, use Create Salesforce Issues for Opsgenie Alerts section. In order to use this functionality, map one Opsgenie action to create an issue Salesforce 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 one of these actions is selected, an extra field appears to enter for which tags or for which custom action this mapping works.

  • Enter multiple tags by separating the tags with a comma. If multiple tags are entered, the mapping works if the alert has one or more of the specified tags. Leave the tags field empty to have the mapping to work for any tag.

  • If an Opsgenie action is mapped to multiple Salesforce actions, an error occurs except for the a tag is added to the alert and a custom action is executed on alert actions. Save multiple mappings for these actions because they differ by the given tags and the given custom action names.

In order to use the Forwarding feature of the integration you must create a custom field as "opsgenie-alias" to the Case object. Without setting this, you cannot create a Case on Salesforce side.

In order to update the Salesforce Service Cloud cases when an action is performed on Opsgenie alerts, you may need to add our IP's to Salesforce Service Cloud instance. Please contact us if you need to learn the correct IP addresses to add to allowlisted IPs list.

If you do not have access to your client Id and client secret. You need to create a new Connected App from Setup->Apps->App Manager. Do not forget to enable OAuth settings before saving it. You can give any URL to callback URL. After saving it, you will get id and key.

Still need help?

The Atlassian Community is here for you.