Creating Salesforce records

Use the SalesforceRequest node to create a new record in the Salesforce system, for a specified Salesforce object such as an Account.

About this task

You can create a new Salesforce record by specifying Create in the Operation property of the SalesforceRequest node, and specifying the Salesforce resource type (such as Account) in the Salesforce object property. The object can be overridden by the LocalEnvironment.Destination.Salesforce.Request.object local environment variable.

The record that you are creating must exist in the input message tree as a JSON object.

When the Salesforce record is created, the input message tree is copied to the location specified by the Output data location property, and augmented with the newly assigned Salesforce ID in an Id element of the message. If an Id element is already in the input message tree, it is ignored.

JSON schema are supplied for a wide range of Salesforce objects, and you can use them as input and output for message maps in a Mapping node. For more information, see Using Salesforce models.

Procedure

  1. Set up a Salesforce account on Salesforce.com.
  2. Configure the connection to Salesforce.com.
  3. Create a flow containing a SalesforceRequest node, and set the node properties:
    1. On the Basic tab, set the following properties:
      • In the Salesforce URL property, specify the URL of the external Salesforce system.
      • In the Operation property, specify Create.
      • In the Salesforce object property, specify the Salesforce object (for example, Account) for which you are creating a new record.
      • In the Security identity property, specify the security identity that you will use when connecting to the Salesforce system. For information about configuring the security identity on the integration node, see Configuring a secure connection to Salesforce.com.
      • In the Timeout property, specify the time (in milliseconds) that the node waits for Salesforce to process the operation.
    2. On the Request tab, set the Data location property to specify the location in the incoming message tree that contains the JSON object data to be created in Salesforce; this data forms the request that is sent from the SalesforceRequest node to the Salesforce system.
    3. On the Result tab, set the Output data location property to specify the location in the output message tree that will contain the data of the record that is created in Salesforce.
    For more information, see SalesforceRequest node.
  4. Send the required message through the flow to the Salesforce system.
    You will receive a confirmation message from the Salesforce system, which will include the Salesforce ID of the new record.
  5. Go to your Salesforce account to verify that the new record has been created correctly.