Salesforce.com Outbound Messaging

Overview

Outbound messaging is part of the workflow rule functionality in Salesforce.com. Workflow rules watch for specified field changes and trigger automatic sending of an outbound message. Using the notifications() call in Salesforce.com, outbound messaging sends SOAP messages over HTTP or HTTPS to a designated endpoint when triggered by a workflow rule.

You can configure workflow rules in Salesforce.com so that it sends notifications when any changes are made to Salesforce objects. Once a workflow rule has been associated with an outbound message, a WSDL is created and is made available for download from the Salesforce.com user interface. This WSDL contains the endpoint URL for the recipient of the message and the information you want to include in the outbound message.

If you configure an outbound message, then whenever an event defined in the workflow rule is triggered, Salesforce.com sends an outbound message containing the values of the specified fields to your Integration Server. You create a web service descriptor in Integration Server using the WSDL generated at Salesforce.com to process the outbound notification message resulting from the workflow rule. For more information, see Receiving Outbound Messages from Salesforce.com and the IBM webMethods Service Development Help for your release.

To ensure security, place your Integration Server behind an internal firewall and place a IBM webMethods Enterprise Gateway in the DMZ to allow it to accept communications and process requests from Salesforce.com. For information related to setting up an Enterprise Gateway Server for processing Salesforce.com notifications, see Setting Up an Enterprise Gateway Server. For detailed information about using an Enterprise Gateway Server, see the IBM webMethods Integration Server Administrator’s Guide for your release.

Setting Up to Receive the Outbound Messages from Salesforce.com

About this task

This section lists the steps you perform to set up Salesforce.com to send outbound messages and Integration Server to receive the outbound message notifications from Salesforce.com.

To set up Integration Server and Salesforce.com for outbound messaging

Procedure

  1. Define the outbound message and configure the workflow rule using the Salesforce.com user interface. When you define an outbound message, Salesforce.com creates a WSDL file that is associated with the outbound message. For more information about the steps to define the outbound message, see the Force.com Web Services API Developer's Guide.
  2. Download the WSDL file using the Salesforce.com user interface. Use this WSDL file when creating the web service descriptor for the outbound message. For more information, see Downloading the WSDL for the Outbound Message.
  3. Create a web service descriptor to handle the outbound notification message resulting from the workflow rule. The procedure to implement the web service descriptor depends on the version of Integration Server. For more information, see Creating a Web Service Descriptor in Integration Server for Receiving the Outbound Message.
  4. Set up an Enterprise Gateway Server for receiving the outbound messages from Salesforce.com. For information, see Setting Up an Enterprise Gateway Server.
  5. Update the endpoint URL of the Salesforce.com outbound message. Specify the Enterprise Gateway external port of the Enterprise Gateway Server as the endpoint URL for the outbound message. For more information, see Updating the Endpoint URL of the Salesforce.com Outbound Message.

Downloading the WSDL for the Outbound Message

About this task

After defining the outbound message and the workflow rules in Salesforce.com, Salesforce.com creates a WSDL that is associated with the message. This section lists the steps to download the WSDL file using the Salesforce.com user interface. Use this WSDL file when creating the web service descriptor for the outbound message.

To obtain the WSDL for the outbound message

Procedure

  1. In the Salesforce.com user interface, go to Setup > Create > Workflow & Approvals > Outbound Messages.
  2. On the All Outbound Messages page, click the name of the message for which you want to create a service.
  3. In the Endpoint WSDL field, click Click for WSDL to display the WSDL.
  4. Save the WSDL to your file system. You will use this WSDL when creating the web service descriptor that handles the outbound messages.
  5. For more information on how to download the WSDL file, see the Force.com Web Services API Developer's Guide.

Creating a Web Service Descriptor in Integration Server for Receiving the Outbound Message

About this task

In Integration Server, you can create a web service descriptor for the outbound message from Salesforce.com.

To create the web service descriptor that processes the outbound message in Integration Server

Procedure

  1. Create a provider web service descriptor using the WSDL file from Salesforce.com.
    1. In Designer, select File > New.
    2. Select Web Service Descriptor and click Next.
    3. On the Web Description Window, select the following and click Next.
      • For Create Web service descriptor as, select Provider.
      • For Web service source, select WSDL URL. Click Browse to select the WSDL source.
      • For Enforce WS-I Basic Profile 1.1 compliance, select Yes or No. The default is No.
    4. Provide a name for the service, select where to save the service, and click Next.
    5. Click Finish.

      Designer creates the provider web service descriptor and a flow service with the name, notifications. The input and output signatures of this flow service will be defined.

  2. Code the logic in the empty notifications flow service. You can add any custom code for further processing.

    Because Salesforce.com expects an acknowledgment to the outbound message that it sends, the business logic should also include steps to map the output signature with the required value.

Setting Up an Enterprise Gateway Server

About this task

This section provides the basic steps for setting up an Enterprise Gateway Server. For detailed information, see the IBM webMethods Integration Server Administrator’s Guide for your release.

To set up an Enterprise Gateway Server

Procedure

  1. Install an Integration Server in your DMZ to be your Enterprise Gateway Server.
  2. Disable the Integration Server "Developer" and "Replicator" users because you will not need these users on an Enterprise Gateway Server. Disabling these users prevents someone from gaining access to your Enterprise Gateway Server through them.
  3. Set up the Enterprise Gateway external port to make Integration Server an Enterprise Gateway Server. The Enterprise Gateway external port is the port through which the Enterprise Gateway Server will listen for the requests from Salesforce.com.

    The endpoint URL of the Salesforce.com outbound message must point to the Enterprise Gateway external port of the Enterprise Gateway Server. For more information, see Updating the Endpoint URL of the Salesforce.com Outbound Message.

  4. Set up the Enterprise Gateway registration port. Through this port the Enterprise Gateway Server maintains its connection to the Internal Server and routes the outbound message to the web service descriptor.

    Create the connections from the Internal Server to the Enterprise Gateway Server. For more information, see the IBM webMethods Integration Server Administrator’s Guide for your release.

Updating the Endpoint URL of the Salesforce.com Outbound Message

About this task

After setting up an Enterprise Gateway Server, you must update the endpoint URL specified in the outbound message to point to the external port of the Enterprise Gateway Server.

To update the endpoint URL of the outbound message for Integration Server

Procedure

  1. In the Salesforce.com user interface, go to Setup > Create > Workflow & Approvals > Outbound Messages.
  2. Click Edit to make changes to an existing outbound message.
  3. View the WSDL document on which the web service descriptor is based. For more information about how to acquire a WSDL document for the provider web service descriptor, see the webMethods Web Services Developer’s Guide.

    The value of the address location element in the WSDL document currently specifies the location of the web service descriptor.

  4. Use the value of the address location element in the WSDL and replace the <IP>:<port> part of this address with <Enterprise Gateway Server IP>:<Enterprise Gateway external port> to create an endpoint URL for the outbound message.

    When Salesforce.com sends an outbound message to this newly created endpoint URL, the outbound message is routed through the Enterprise Gateway Server and reaches the web service descriptor in the Internal Server.

    For more information about creating the web service descriptor for the outbound message from Salesforce.com, see Creating a Web Service Descriptor in Integration Server for Receiving the Outbound Message.

  5. In the Endpoint URL field, enter the endpoint URL for the outbound message (that is, the endpoint URL you created in step 4).

    For example, let us consider that the value of the address location element in the WSDL is http://10.60.28.176:5555/ws/OutboundMessaging:testWSDLDescriptor, the IP address of the Enterprise Gateway Server is 10.30.20.110, and the Enterprise Gateway external port is 7777.

    If you replace 10.60.28.176:5555 with 10.30.20.110:7777 in the address, the resulting address will be http://10.30.20.110:7777/ws/OutboundMessaging:testWSDLDescriptor

    Then, you will specify http://10.30.20.110:7777/ws/OutboundMessaging:testWSDLDescriptor as the endpoint URL for the outbound message.

  6. Click Save.
  7. For more information about configuring the outbound messages, see the Force.com Web Services API Developer's Guide.