by S. Patton, Technical Writer, Pervasive Software, Inc.

Salesforce offers outbound messaging so that you can monitor changes in your online CRM data. Once the SOAP message goes out, however, you’re on your own. Salesforce leaves it up to you to handle the message and channel it into something useful. Pervasive has done over 500 Salesforce implementations. Our customers wanted an easy way to handle those messages and turn them into emails or rows in a database, alter the format of the messages, pass them on to an ESB or otherwise turn them into useful data.

The new Salesforce Outbound Message Service is an add-on for version 9.2 of Pervasive Data Integrator that listens for and processes SOAP outbound messages from salesforce.com. When a message arrives from Salesforce, the service accepts the message and spawns a Pervasive Integration Engine instance. The message is then processed based on the specification file that you create with Map or Process Designer. Since Salesforce controls how messages are aggregated and sent, a single SOAP message may contain several notifications, all of which can be handled appropriately by a single specification file.

To use the Salesforce Outbound Message Service, you need to complete four steps:

  1. Set up outbound messaging and associated workflow rules in salesforce.com.
  2. Create a specification file to handle the incoming messages.
  3. Start the service container.
  4. Configure and deploy the Web service.

1. Set up outbound messaging and associated workflow rules in Salesforce.
Determine which fields and tables you wish to monitor in Salesforce. Specify workflow rules for when messages are triggered. For example, a message can be triggered each time a new lead is added, or when a specific contact name is changed. You’ll need to configure at least one workflow rule for each outbound message type. Information on how to set up workflow rules and outbound messages is located in the Salesforce online documentation.

2. Create a specification file to handle the incoming messages.
The specification file tells the service how to handle incoming messages. For example, you may want to save the message in its original format, format it to a specific standard, email it to others, etc. Your specification file can either be a simple process, or a .djar file. Any Pervasive process that does not contain any maps is fully specified in one XML file, and it can simply be uploaded to Salesforce as is. For processes with maps, .djar files can be created that contain all of the XML files for a full process compressed into one file. Since only one file can be uploaded to salesforce.com for each service you configure, upload a .djar file for processes with maps.

3. Start the service container.
Before you can access the Web service application, you need to start the service. On a Windows machine, Start/All Programs/Pervasive/SFDC Outbound Messaging Service/Start Service will get the service running. (Check the Pervasive documentation for Linux instructions.) To stop the service, select the same path to Stop Service.

4. Configure and deploy the Web service.
Log into the Web service application, configure and deploy your application, and you are ready to receive outbound messages. The Service Management Console is on the same Start path as the Start and Stop Service commands.

That’s really all there is to it, but here are a few helpful tips:

To see if a message is undelivered, log into salesforce.com, and click “View Message Delivery Status.”

To view the service log file, use the Start/All Programs/Pervasive/SFDC Outbound Messaging Service/View Service Container Log command on Windows, or open it directly with a text editor in the Pervasive installation directory\SFDC-OM\servicemix-3.2.1 on your server.