Loading

Legacy:Integration - Salesforce.com

From ServiceNow Wiki
Home > Integrate > Vendor Specific Integrations > Incident > Legacy:Integration - Salesforce.com (Redirected from Integration - Salesforce.com)
Jump to: navigation, search


Retired
This plugin has been retired and is no longer available for new activations (since Eureka).

This page applies only to existing users of the Integration - Salesforce plugin.

Contents

1 Overview

ServiceNow can integrate with your Salesforce.com account to allow you to seamlessly manage your Salesforce.com cases from within ServiceNow with a bidirectional synchronization of case to incident. The integration can create configuration items from a SFDC case's product, and the SFDC case contact will be synchronized with a ServiceNow user record for ease of management.

The integration installs a new web service SFDC_Case to be invoked by Salesforce.com's Outbound Message when triggered by a workflow on Case. Additionally ServiceNow will post updates to the Salesforce.com Case when changes are made to the related Incident.

To work around the inability of Salesforce.com to trigger workflow on their Case Comment object, a scheduled job is installed (in ServiceNow) with this integration, to periodically retrieve updates to Case Comments and update the related Incident.


Note
Note: The following integration is not part of the supported platform. The integration may require additional customization, typically performed by an experienced administrator or consultant, prior to operating correctly.


2 Activating the Plugin

To use the Salesforce.com integration, activate the Integration - Salesforce.com plugin (prior to the Eureka release).

3 How does it work?

It creates a bi-directional integration between a ServiceNow and Salesforce.com instance which allows task creation and updating to occur automatically between the two instances.

4 Requirements

Activate the plugin and use the following steps to set up this integration:

  1. Get your SFDC security token
  2. Setup the SFDC integration plugin in ServiceNow
  3. Configure SFDC workflow to trigger an outbound message to ServiceNow

4.1 Get your Salesforce.com security token

Get your security token from Salesforce.com. You can search their help for "What is a Security Token and how does it work?"

Note
Note: In Salesforce.com, you can simply go to Setup --> My Personal Information --> Reset My Security Token, and click "Reset Security Token" to have a new token emailed to you.

4.2 ServiceNow setup

Navigate to the Application Integration - Salesforce.com and select the Properties link to configure the integration.

4.2.1 Properties

Four new properties related to this integration are created when the plugin is activated.

  • URL for Salesforce.com's SOAP interface - this is currently https://www.salesforce.com/services/Soap/u/27.0
  • Login username - this is your Salesforce.com username
  • Login password - this is your Salesforce.com password with an additional token appended to it. Get this token from Salesforce.com. You can search their help for "What is a Security Token and how does it work?"
    • In Salesforce.com, you can simply go to Setup --> My Personal Information --> Reset My Security Token, and click "Reset Security Token" to have a new token emailed to you.
  • Create the Case Contact as needed - this will create a user record in ServiceNow if one does not exist for a Case Contact, and set that user as the Caller of the incident in ServiceNow

SFDC1.png

4.2.2 SFDC user record in ServiceNow

When the plugin is activated, an active, locked-out user record is created in the instance with a username of "sfdc" and a display name of "Salesforce.com Integration". This user is impersonated for all integration-related activity. e.g., if the Priority of a case is changed in Salesforce.com, it will appear as though the "Salesforce.com Integration" user made the change to the associated incident in ServiceNow.

CaseComments in SFDC will also appear to have been made by this same user.

Note
Note: Do not change the username of this user record, but it is okay to change the display name


SFDC3.png

4.3 Salesforce.com setup

4.3.1 Outbound Message

You must create an outbound message in Salesforce.com to send updates via web services to ServiceNow.

To create an outbound message:

  1. In Salesforce.com, go to App Setup > Create > Workflow & Approvals > Outbound Messages.
  2. Click New Outbound Message.
  3. For the object, select Case, then click Next.
  4. Give your message a Name, and an Endpoint URL, which is your instance's URL with /SFDC_Case.do?SOAP appended to it.
  5. Select all the Available Fields.
  6. Click Save.

SFDC2.png

4.3.2 Workflow Rule

You must create a Workflow Rule to tell Salesforce.com when to send your new Outbound Message.

  1. In Salesforce.com, go to App Setup --> Create --> Workflow & Approvals --> Outbound Messages
  2. Click "New Rule"
  3. Select "Case" as the object and click Next
  4. Give your new rule a Name (any name will do), and set rule criteria under which Salesforce.com will send an update to ServiceNow (e.g., "Case:Type equals to 'ServiceNow IT'", you would have to set up this value for the Type picklist before hand)

Once you have saved your new rule, give it a Workflow Action.

  1. Go to your Workflow Rule
  2. At the bottom in the Workflow Actions section, click Edit
  3. Click the "Add Workflow Action" dropdown and "Select Existing Action" to add your Outbound Message

4.3.3 Case Origin

When a new Case is created from ServiceNow, the Case Origin will be set to be from "ServiceNow," perform the following to add the "ServiceNow" picklist value

  1. In Salesforce.com, go to Setup --> Customize --> Cases --> Fields
  2. Click "Edit" on the line for "Case Origin"
  3. Click "New"
  4. Enter "ServiceNow" as the value and click "Save"

5 Administration

SFDCApp.png

5.1 Properties

  • URL for Salesforce.com's SOAP interface - this is currently https://www.salesforce.com/services/Soap/u/13.0
  • Login username - this is your Salesforce.com username
  • Login password - this is your Salesforce.com password with an additional token appended to it. Get this token from Salesforce.com. You can search their help for "What is a Security Token and how does it work?"
    • In Salesforce.com, you can simply go to Setup --> My Personal Information --> Reset My Security Token, and click "Reset Security Token" to have a new token emailed to you.
  • Create the Case Contact as needed - this will create a user record in ServiceNow if one does not exist for a Case Contact, and set that user as the Caller of the incident in ServiceNow

5.2 Web Service

Navigate to Integration - Salesforce.com > Web Service to see the SFDC_Case Web Services defined for this integration. This web service is invoked by Salesforce.com from an Outbound Message triggered by a workflow set up for the Case object. Invoking this web service creates a ServiceNow Incident from a Salesforce.com Case and links them using the Salesforce.com UID. Updating the Incident will send updates back to the Salesforce.com Case.

5.3 Script Includes

From the left navigation pane, select Integration - Salesforce.com > Script Includes to see the scripts for this integration. The following script includes are installed:

  • SFDCCaseComments - wrapper for SFDC CaseComment SOAP request, used to retrieve Case Comments from the scheduled job as well as using an on-demand UI Action.
  • SFDCFieldMap - mapping object for mapping Incident to Case as well as Case to Incident. Modify this object to modify or add new fields.
  • SFDCSoap - wrapper for SFDC Case SOAP envelope used to send updates back to Salesforce.com
  • SFDCSoapListener - Called from SimpleScriptListener, observes modifications to Incident and sends update back to Salesforce.com
  • SFDCSoapRequest - invoke a SFDC soap request using the SFDCSoap wrapper
  • SFDCUtils - Utility class for SFDC integraion

5.4 Client Scripts

Provides a Client Script SFDC Case Decorations to decorate the Incident form to show fields that are mapped to Salesforce.com. Mapped fields are in blue.

SFDCMapped.jpg

5.5 Scheduled Updates

Salesforce.com does not provide any way to trigger outbound messages when a CaseComment is added. ServiceNow's integration provides a workaround for this limitation in the form of a Scheduled Update (SFDC Update Comments) that pulls comments from Salesforce.com cases into ServiceNow every minute. You can also execute the scheduled update at any time by clicking the "Retrieve SFDC Case Comments" related link at the bottom of the incident form (this is a UI Action).

You may modify the configuration of this to specify a different duration for automatically retrieving Case Comments. The default is set at every 15 minutes, we do not advise any duration shorter than this because there is a limitation as to how many web service invocations Salesforce.com can accommodate over a period of time, per service.

SFDCSched.jpg

5.6 Field Mapping

Fields on the user record in ServiceNow created from the Contact in Salesforce.com are mapped by the createOpenedByUser() function in the SFDC_Case web service. You can modify that function if necessary.

Fields in the incident record in ServiceNow created from the Case in Salesforce.com are mapped by the mapSFDCtoSNC() function in the SFDCFieldMap. Fields in the Salesforce.com Case get mapped from the ServiceNow incident by the mapSFDCField() function. You can modify those functions if necessary.

  • From Salesforce.com to ServiceNow
    • Contact Name (maps to Caller)
    • Product (maps to Configuration item)
    • Priority (maps to Priority)
    • Subject (maps to Short description)
    • Status (maps to Incident state)
    • Reason (maps to Subcategory)
    • Description (maps to Additional comments)
    • Internal Comments (maps to Additional comments)
  • From ServiceNow to Salesforce.com:
    • Caller (maps to Contact Name only if user exists in Salesforce.com)
    • Configuration item (maps to Product)
    • Priority (maps to Priority)
    • Short description (maps to Subject)
    • Incident state (maps to Status)
    • Subcategory (maps to Reason)
    • Additional comments (maps to Case Comments)

6 Troubleshooting

Error or Symptom Solution
The Web Service call to ServiceNow from Saleforce fails with an error that says authentication is required. ServiceNow protects its web services with Basic Authentication. At the time of this documentation, the Salesforce.com libraries do not support Basic Authentication as a setting or function call. Instead, you have to directly modify the HTTP header in the request before submitting the web service call. The following Salesforce.com blog post on Using Basic Authentication for Salesforce Web Service Requests outlines how to submit credentials via Basic Authentication.
Was this article helpful?
Yes, I found what I needed
No, I need more assistance
Views
Personal tools