Salesforce Service Cloud Integration Guide | PagerDuty

Salesforce Service Cloud + PagerDuty Integration Benefits

  • Orchestrate responses and actions around customer issues, sales opportunities, and other activities across your organization.
  • Customize when to notify the proper on-call team about relevant activities occurring in Salesforce Service Cloud.
  • Create and/or update Salesforce Service Cloud objects with relevant information as soon as there’s a PagerDuty incident update such as an acknowledge, resolve, reassign, etc.
  • Each PagerDuty subdomain can be connected to multiple Salesforce Service Cloud objects to streamline cross-organizational collaboration.
  • Access a Command Console interface that allows agents to create PagerDuty incidents and view linked incidents directly from a case record. The Command Console can be used to help identify customer-impacting issues and escalate urgent issues to engineering / IT.
  • Access a Status Dashboard that provides agents with status updates for ongoing, customer-impacting incidents and context that enables tailored customer communications.

📘

Pricing Plan

The Salesforce Service Cloud v3.6 integration is only available to accounts on Customer Service Professional, Customer Service Business or Digital Operations plans. Please contact our Sales Team if you would like to upgrade to a plan featuring our new Salesforce Service Cloud integration.

Version

  • This guide outlines configuration for the Salesforce Service Cloud v3.6 integration.
  • If you would like to upgrade from a previous version, please follow instructions in our Upgrade to v3.6 section.

📘

Looking for a Different Version?

The following integrations are also available:

How it Works

  • Once a Salesforce Service Cloud object is connected to your PagerDuty instance, new record creations and updates on that object are evaluated against rules that you predefine. If the rule criteria is met, PagerDuty will perform actions specified by those predefined rules, including creating new PagerDuty incidents and updating the fields of Salesforce Service Cloud objects.
  • PagerDuty can also send information to Salesforce Cloud, where you can define the evaluation criteria against the updates made in PagerDuty and select an action to be performed in Salesforce Cloud.

Requirements

Required Permissions to Configure or Upgrade the Integration

In Salesforce Cloud:

  • Permissions to install Salesforce Managed Package applications.
  • A Salesforce Professional, Unlimited or Enterprise edition, which can allow Apex classes to be run from a Managed Package.
  • Ensure that API Access is enabled on your Organization. Salesforce Organizations in Trial Mode will normally not have API access enabled.

In PagerDuty:

A Global Admin or Account Owner base role is required for configuration.

Required Permissions to Use the Integration

If you are using custom permissions in Salesforce, please see our FAQ for more information.

Integration Walkthrough

In PagerDuty

Create an API Key

  1. First, you will need to generate a REST PagerDuty API Key to allow Salesforce Service Cloud to connect to PagerDuty. Navigate to Integrations API Access Keys and click Create New API Key.
  2. Enter a Description (e.g. “Salesforce Service Cloud API Key”) and click Create Key.
  3. On the next screen, copy the API Key and paste it in a safe place for later use. Note: You will not have access to this key after this screen.

Create an Extension

  1. Next you will add the Salesforce Service Cloud extension in PagerDuty. Go to Integrations Extensions and click New Extension. Enter the following information:

Field

Instructions

Extension Type

Search and select Salesforce v3.

Name

Enter a name for the extension, e.g. “PagerDuty for Salesforce”..

Service

Choose the first service you’d like to have the application interact with. You can change this at any point. Please note that you are still able to trigger incidents from Salesforce Service Cloud to PagerDuty services not selected here.

Username

Enter the Salesforce Service Cloud username of a Salesforce user with the required permissions to install Salesforce Managed Package applications (which will be performed in Salesforce in the next step).

Click Save.

In Salesforce Service Cloud

Download the PagerDuty Application

  • If you are configuring the Salesforce Service Cloud integration for the first time: Open a new tab in order to reference the details in the PagerDuty web app that you just created. In your new tab, download the PagerDuty Application to your Salesforce Service Cloud Account. You will be prompted to select which users you want to download the application for. We recommend that you select Install for All Users. You will have more options to restrict which users can access PagerDuty functionality later during installation. Click Install.
  • If you are upgrading your Salesforce Service Cloud integration from V2 to V3: Navigate to Salesforce AppExchange search PagerDuty select the PagerDuty for Salesforce Service Cloud application scroll down to Additional Information and confirm the Package Version to download is PagerDuty for Service Cloud 3.6.0 click Get It Now in the bottom right.
  1. You will then be asked to approve third party access to PagerDuty APIs. Please check the box Yes, grant access to these third-party web sites and click Continue.
  2. If you see a message that says, “The app is taking a long time to install,” you will receive an email from Salesforce Service Cloud when the app has finished installation:
Example EmailExample Email

Example Email

  1. Now that you have downloaded the PagerDuty app, you will also need to install a connected app component of the PagerDuty application to ensure all of your users can log in to the PagerDuty app within Salesforce Service Cloud. To do this, input your Salesforce Service Desk instance name and navigate to:

https://[INSTANCE-NAME].my.salesforce.com/identity/app/AppInstallApprovalPage.apexp?app_id=0Ci1U000000Ccvi

For example, if your Salesforce Service Cloud domain’s URL is example-domain.lightning.force.com your re-direct URL would be:

https://example-domain.my.salesforce.com/identity/app/AppInstallApprovalPage.apexp?app_id=0Ci1U000000Ccvi

  1. Click Install when asked if you want to install the connected app.

Manage Connected App Permissions and Credentials

  1. On the next page, click the Edit Policies button. Or, if you are resuming the configuration process, please navigate to Setup Home Apps ​​App Manager PagerDuty Platform V3 Connected App click Manage from the dropdown.
  2. In the Permitted Users field, select Admin approved users are pre-authorized, click Ok when prompted and then click Save. This is a necessary step to ensure that PagerDuty rulesets function appropriately.
  3. Lower on the same page, click the Manage Profiles button under the Profiles heading.
  4. Next, check the box next to the Profile of the user whose username you entered in step 4 and click Save. This user’s PagerDuty permissions will be used to update records in Salesforce Service Cloud based on your rulesets. If you are upgrading the Salesforce Service Cloud integration from V2 to V3.6: Please skip steps 14-15 and resume from Step 16.
  5. Navigate back to your Salesforce Service Cloud account, click the cog icon in the top right menu, select Setup and then search for Named Credentials.
  6. Click the New Named Credential button and enter the following information in the fields on the next screen:

Field

Instructions

Label

Enter PagerDuty_API.

Name

This should autofill after filling in the Label field.

URL

US service region: https://api.pagerduty.com
EU service region: https://api.eu.pagerduty.com

Certificate

Leave this field blank.

Identity Type

Select Named Principal

Authentication Protocol

Select Password Authentication

Username

PagerDutyAPI

Password

Paste the PagerDuty API Key (generated in step 3 of the In PagerDuty section, above)

Generate Authorization Header

UNCHECK

Allow Merge Fields in HTTP Header

CHECK

Allow Merge Fields in HTTP Body

UNCHECK

Click Save.

Assign User Permissions for the PagerDuty Application

  1. All users logging in to the PagerDuty Command Console or Status Dashboard will need to have permissions to the relevant Salesforce Objects in the PagerDuty Managed Package. If the only user/user profile who plans to use this application is the user/user profile you selected in step 13, you can skip to step 18.
  2. As a Salesforce Administrator, navigate to Setup Users Permission Sets. Select the PagerDutyUser or PagerDutyAdmin permission set, click Manage Assignments and click Add Assignments. Select all users you want to assign the PagerDutyUser or PagerDutyAdmin permission set to, and then click Assign.

Note: If you would prefer to use Salesforce Profiles, please see our FAQ for more information.

Add the PagerDuty Console to a Salesforce Service Cloud Case

  1. Next, you will need to add the PagerDuty application to the page where you’d like members of your team to have access. For this example, we’re going to add the PagerDuty app to the Salesforce Service Cloud Case. If you will be adding the PagerDuty application to a different record only, please skip to the next section.
  2. Navigate to any Salesforce Service Cloud Case in the Service Console. Click into the case and navigate to the cog in the upper right hand corner and click Edit Page.
  3. In the left side bar, search for “PagerDuty”. You can drag one of the following into the Case view in a placement of your choice:
  • PagerDuty Combined Console (Recommended): The best of PagerDuty, including both the PagerDuty Command Console and the PagerDuty Status Dashboard. With the Combined Console, frontline agents immediately become aware of customer impacting issues, and can engage key experts across the organization when they hear about a new high-priority issue.
  • PagerDuty Command Console: Only the PagerDuty Command Console. Recommended for any PagerDuty teams that do not plan to use the PagerDuty Status Dashboard.
  • PagerDuty Status Dashboard: Only the PagerDuty Status Dashboard. Best for teams that want to understand which issues are customer-impacting, or teams setting up 24/7 after hours support for the first time.
  1. Click Save, then click Activate, and when prompted, select the permissions that best fit your needs. We recommend:
  • Org Default click Assign as Org Default ​​Desktop Next Save
  • App Default Assign as App Default Service Console ​​ Desktop and Phone Next Save.
  1. Navigate back to any case to confirm you can see the selected application.

Add the PagerDuty Console to a Salesforce Service Cloud Incident or other Non-Case Record

  1. If you would like the Command Console or Status Dashboard to work with other Salesforce Service Cloud Records (e.g. an Incident or Opportunities), you can repeat the previous section in this guide starting on the record where you want the console to appear.

Configure Rulesets

📘

Upgrading From V2 to V3

If you have upgraded your PagerDuty application in Salesforce Service Cloud from V2 to V3, existing rulesets will still remain. If needed, you can create new rulesets by following the instructions below.

  1. Now you can set up rules to create/modify incidents based on the content of a Salesforce record, or visa-versa. Click the App Launcher in the top left menu, search and select PagerDuty Configuration and perform the following:

In the SUMMARY Tab:

Field

Instructions

Connection

If the Named Credential was properly configured, the Connection should show an OK message in green text.

Object Mappings

Disregard the error message, this will be addressed in the next step.

In the OBJECT MAPPINGS Tab:

Field

Instructions

Integration User Email

Search and select the email that belongs to the integration user who will be creating and updating the incidents in PagerDuty.

Sync Salesforce Service Cloud Comments to PagerDuty Notes (optional)

You can sync the Salesforce Service Cloud Case Comments to PagerDuty Notes, but please be aware that syncing between the two may consume your API request limits in Salesforce Service Cloud. If you would like to choose this option, CHECK the box.

Click Save.

In the LOGGER Tab:

Field

Instructions

Log Level

Select from the following log types:

  • Debug: This type will record and display all log types.
  • Info: This type will record and display both info and error logs.
  • Error: This type will record and display error logs only.

Storage Delete Intervals

Select the number of days for PagerDuty logs to be stored in Salesforce before they are deleted.

Click Save.

  1. Next, select the RULESETS tab. This is where you will build the rules that will specify what should happen to the object and fields when PagerDuty sends an update back to Salesforce Service Cloud. Click Add Ruleset on the right, enter a Ruleset Name and click Save. This Ruleset is a folder that will hold any rules you create. For ease of troubleshooting, we recommend that you maintain one ruleset for actions triggered from Salesforce to PagerDuty, (e.g., "SFDC > PD”) and one ruleset for actions triggered from PagerDuty to Salesforce (e.g., “PD > SFDC”).
  2. Next, Click the name of the rule and then click Add Rules. Enter a Rule Name, click Save and then click the name of the rule. Each rule will ask for conditions that should be met prior to performing the actions specified in the latter part of the rule definition.

Field

Instructions

Choose Salesforce Object

Search and select the Salesforce Service Cloud object that you would like to map to PagerDuty based on this rule’s criteria.

Run rule on

Depending on the direction you would like actions to be triggered, make the following selection:

  • Salesforce to PagerDuty Actions: Select [OBJECT-LABEL] create or update.

OR

  • PagerDuty to Salesforce actions: Select PagerDuty incident create or update.

When

Depending on your preferences, select:

  • All conditions are met

OR

  • Any conditions are met
  1. Click Add Condition. Under Choose Field, you will have the option to choose fields from PagerDuty, or from the Salesforce Service Cloud object that this rule will run on. The following PagerDuty Fields are available:

Field

Definition

Event Type

Run the rule based on the type of PagerDuty event. Trigger, Acknowledge, Resolve, Assign, Escalate, Custom or Delegate.

Incident Title

Run the rule based on whether the PagerDuty incident Title matches a predefined string.

Incident Status

Run the rule based on the PagerDuty incident’s status. Triggered, Acknowledged or Resolved.

PagerDuty Service

Run the rule based on events generated by a selected PagerDuty service.

PagerDuty Service Name

Run the rule based on events generated by a PagerDuty service name that matches a predefined string.

PagerDuty Escalation Policy

Run the rule based on incidents assigned with a selected PagerDuty escalation policy.

PagerDuty Escalation Policy Name

Run the rule based incidents assigned with a PagerDuty escalation policy name that matches a predefined string.

PagerDuty Incident Priority

Run the rule based on the selected incident priority.

Urgency

Run the rule based on the selected incident urgency.

The available Salesforce Fields vary by object label and account configuration. Please search for your object’s fields in Salesforce’s documentation for more details.

  1. Next, select an Operator and enter a value to complete the condition. You may choose to add multiple conditions for each rule. Once you are done adding your conditions, proceed to the next step.
  2. Now click Add Action and select a PagerDuty Action or Salesforce Action. You may choose multiple actions to be triggered from each rule.

PagerDuty Actions

Definition

Create new Incident, if there are no linked incidents

If rule conditions are met, create a PagerDuty incident.

Create new Incident, if there are no linked incidents
Set PagerDuty Incident Title

If rule conditions are met, a PagerDuty incident will be created with a custom, preconfigured title.

To create a custom incident title:

  • Select the PagerDuty Action Create new Incident, if there are no linked incidents.
  • Click the Set PagerDuty Incident Title dropdown and select Use Custom Incident Title.
  • You can add preliminary custom text as the prefix and select up to three Salesforce case fields to construct the custom incident title.
  • Use the Preview bar to see how the title will look. Incident titles longer than 1024 characters will be truncated when the incident is created.

Acknowledge Incident

If rule conditions are met, acknowledge the PagerDuty incident.

Resolve Incident

If rule conditions are met, resolve the PagerDuty incident.

Set Incident Priority

If rule conditions are met, set the PagerDuty incident’s priority to a specified value.

Set Incident Urgency

If rule conditions are met, set the PagerDuty incident’s urgency to a specified value.

Run Response Play

If rule conditions are met, run a specified response play on the incident.

Run Automated Action

If rule conditions are met, run a specified Automation Action on the incident.

Reassign

If rule conditions are met, reassign the PagerDuty incident.

Add Responders

If rule conditions are met, add responders to the PagerDuty incident.

Salesforce Actions

Definition

Set [SALESFORCE-OBJECT] field value

If rule conditions are met, set an object’s specified field value.

Create new [SALESFORCE-OBJECT]

If rule conditions are met, create a new specified object.

  1. Click Save to complete the rule configuration. Navigate back to the RULESETS tab and click the toggle switch next to your ruleset to Enabled.
Enable RulesetEnable Ruleset

Enable Ruleset

  1. Next, navigate back to your PagerDuty account and click Services, select Service Directory and click the name of the service that you just connected to the Salesforce Service Cloud OAuth Flow webhook. Manually trigger a test incident on this service.
  2. Once the test incident has been triggered, return to Salesforce Service Cloud, click the App Launcher and search and select PagerDuty Logs to see if a webhook from PagerDuty arrives. When you receive the webhook, the integration is complete. If you do not receive the webhook, check your log management tool to troubleshoot why the webhook failed to deliver.

Upgrade to v3.6

Upgrade from v3.0-v3.2 to v3.6

Users who already have an earlier version of v3 installed in their Salesforce Service Desk environments may follow the instructions below to upgrade to v3.6. You can check the current version of PagerDuty you have installed in Salesforce Service Cloud by navigating to Setup search and select Installed Packages.

In Salesforce Service Cloud

Upgrade the PagerDuty Application

  1. Download the PagerDuty Application to your Salesforce Service Cloud Account. You will be prompted to select which users you want to download the application for. We recommend that you select Install for All Users. You will have more options to restrict which users can access PagerDuty functionality later during installation. Click Upgrade.
  2. You will then be asked to approve third party access to PagerDuty APIs. Please check the box Yes, grant access to these third-party web sites and click Continue.
  3. Once the app has finished upgrading, you are ready to use the newest version of the PagerDuty for Salesforce application.

Upgrade from v2 to v3.6

🚧

Extension Migration

Upgrading the PagerDuty for Salesforce Service Cloud app from v2 to v3.6 automatically migrates all existing Salesforce extensions on PagerDuty services to a new Salesforce V3 extension. Please contact PagerDuty Support before upgrading if you have multiple Salesforce accounts connected to PagerDuty and you would only like to upgrade some of the accounts.

Users who already have PagerDuty for Salesforce Service Cloud v2 in their environments may follow the instructions linked below to upgrade to v3.6. You can check the current version of PagerDuty you have installed in Salesforce Service Cloud by navigating to Setup search and select Installed Packages.

To upgrade from v2 to v3.6, follow steps 4-32 of the Integration Walkthrough.

Salesforce Service Cloud User Guide

Please read our User Guide for more information on how to use the integration after it has been configured.

FAQ

How can I use this application to set up 24/7 after-hours support for high priority cases or premium customers?

  1. First, create a PagerDuty service for your Support team and create an an on-call rotation that will determine which service agents will be alerted when an urgent issue arises.
  2. Next, create a ruleset that creates an incident on this service whenever a new Salesforce case is created that meets your qualifying criteria (e.g., a high priority Salesforce Service Cloud case outside of business hours).
  3. Trigger a case that meets the qualifying criteria in your ruleset to confirm that the ruleset is working as expected.
Example 24/7 After-Hours Support RulesetExample 24/7 After-Hours Support Ruleset

Example 24/7 After-Hours Support Ruleset

How can I create new cases in Salesforce Service Cloud based on the content of a PagerDuty incident?

  1. First, make sure you have the PagerDuty extension added to all PagerDuty services from which you would like to trigger behavior.
  2. When you are defining the rule, make sure you select On PagerDuty Update instead of [Object] Create/Update, specify what conditions to look for on a PagerDuty update, and what you would like Salesforce Service Cloud to do when it meets that criteria. Make sure you also use Set [SALESFORCE-OBJECT] field value for ALL required fields in your Salesforce Service Cloud object.

For example, if you want to automatically create a Salesforce Service Cloud Case object when a PagerDuty incident is created on Service “XYZ”, you would have a Ruleset that looks like the following:

Example ruleset for creating new cases in Salesforce Service Cloud based on the content of a PagerDuty incidentExample ruleset for creating new cases in Salesforce Service Cloud based on the content of a PagerDuty incident

Example ruleset for creating new cases in Salesforce Service Cloud based on the content of a PagerDuty incident

Can I use PagerDuty Rulesets with other Salesforce records besides Cases?

Yes. Please follow these steps to allow PagerDuty rulesets to interact with other Salesforce records:

  1. In Salesforce Service Cloud, click the cog icon select Setup click Objects and Fields in the left hand menu select Object Manager.
  2. Click the Label name of the object on which you would like to create a trigger and click Triggers in the left hand menu. Click New on the right side of the screen.
  3. Enter the following text as a trigger body, replacing [SALESFORCE-OBJECT] with your Salesforce Service Cloud object:
trigger PagerDuty[SALESFORCE-OBJECT]Trigger on [SALESFORCE-OBJECT] (after insert, after update) {
    if (!System.isFuture() && !System.isBatch()) {
        String oldStr = JSON.serialize(Trigger.oldMap);
        String newStr = JSON.serialize(Trigger.newMap);
        if (!Test.isRunningTest()) pagerdutyinc.PagerDutyEngineLauncher.launchByTrigger(oldStr, newStr, Trigger.isInsert);
    }
}

Example:

trigger PagerDutyOpportunityTrigger on Opportunity (after insert, after update) {
    if (!System.isFuture() && !System.isBatch()) {
        String oldStr = JSON.serialize(Trigger.oldMap);
        String newStr = JSON.serialize(Trigger.newMap);
        if (!Test.isRunningTest()) pagerdutyinc.PagerDutyEngineLauncher.launchByTrigger(oldStr, newStr, Trigger.isInsert);
    }
}
  1. Click Save. Repeat these steps for each object on which you would like to create a trigger.

Why don’t I see any data on my Status Dashboard?

If you don’t see any data on your Status Dashboard, please confirm that you have a one configured in PagerDuty. To check, navigate to https://[your PagerDuty subdomain].pagerduty.com/status-dashboard.

What kind of custom permissions do users need to use this integration?

If you use custom permissions in Salesforce, you will need to ensure that agents have the correct permissions to use and access the PagerDuty integration. There are four permission sets included in the managed package that can be given to users.

PagerDutyAdministrator PagerDutyConfiguration read
write
PagerDutyIncident Mapping read
create
edit
delete
PagerDutyRules & Rulesets read
create
edit
delete
PagerDutyConfiguration Tab on
PagerDutyAuditor PagerDutyConfiguration read
PagerDutyIncident Mapping read
PagerDutyRules & Rulesets read
PagerDutyConfiguration Tab on
PagerDutyManager PagerDutyConfiguration read
PagerDutyIncident Mapping read
create
edit
delete
PagerDutyRules & Rulesets read
create
edit
delete
PagerDutyConfiguration Tab on
PagerDutyUser PagerDutyConfiguration read
PagerDutyIncident Mapping read
create
edit
PagerDutyRules & Rulesets read
PagerDutyConfiguration Tab off

If you do not want to add permission sets to your users, you may check their profiles and ensure the profiles have similar object permissions for their user type.

How can I troubleshoot issues during login to the PagerDuty console?

  • Check to make sure all users have valid permissions.
  • Check to make sure the redirect URL is set correctly in PagerDuty.
  • Check to make sure that the OAuth app has read/write privileges and not just read privileges.

How can I troubleshoot my integration?

We have provided a logging tool to help troubleshoot problems in the integration. Under the LOGGER tab in the PagerDuty Configuration, you can turn on logging by selecting one of the following levels and clicking Save:

Logger Tab for TroubleshootingLogger Tab for Troubleshooting

Logger Tab for Troubleshooting

How can I troubleshoot my Rulesets?

We have provided a logging tool to help troubleshoot problems in the integration. To access PagerDuty logs, click App Launcher and search for “PagerDuty Logs”. When you navigate to the page, you will see a record of all webhooks successfully delivered to Salesforce Service Cloud from PagerDuty, as well as all errors. If you are still experiencing issues, please reach out to PagerDuty support.

Can PagerDuty actions be invoked from Salesforce Flows?

PagerDuty actions cannot currently be invoked from Salesforce Flows. To share your interest in the development of this feature, please contact PagerDuty support.

How can I set up PagerDutyUser equivalent permissions with Salesforce Profiles?

As a Salesforce Administrator:

  1. Log in to Salesforce Service Cloud and navigate to Setup Users Profiles select the Profile to modify.
  2. Add the required permissions below:

Object Level Permissions for a PagerDuty User

Objects

Required Permissions

PagerDutyConfigurations
PagerDutyRules
PagerDutyRulesets

read
view all

PagerDutyIncidentMappings

read
create
edit
view all

Field Level Security for a PagerDuty User

Objects

Required Permissions

PagerDutyConfigurations

Read Access Required for the following Fields:

API Token
Created By
Last Modified By
Logging JSON
Mapping JSON
Owner
PagerDuty Base Url
PagerDuty Configuration
PagerDuty Default Email

Edit Access Required for the following Fields:

Owner
PagerDutyConfiguration

PagerDutyRules

Read Access Required for the following Fields:

Created By
Last Modified By
Owner
PagerDutyRule
Rule Name

Edit Access Required for the following Fields:

Owner
PagerDutyRule
Rule Name

PagerDutyRuleSets

Read Access Required for the following Fields:

Created By
Last Modified By
Owner
PagerDutyRuleset
Ruleset Name

Edit Access Required for the following Fields:

Owner
PagerDutyRuleset
Ruleset Name

PagerDutyIncidentMappings

Read Access Required for the following Fields:

Created By
Incident ID
Last Modified By
Linked Case
Owner
PagerDutyIncidientMapping
SObject ID
Subdomain

Edit Access Required for the following Fields:

Incident ID
Linked Case
Owner
PagerDutyIncidentMapping
SObject ID
Subdomain

What can I do about an error that says I don't have enough trial cache capacity while upgrading in my developer account?

a. Salesforce Developer accounts must request Cache Partition Capacity in Salesforce Service Cloud. Click Setup search and select Platform Cache Request Trial Capacity.
b. Set Session Cache Allocation (Set Trial 2)
c. Set Org Cache Allocation Trial (Set Trial 2)
d. Click Save.


Did this page help you?