Using Salesforce models
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
example, you can create the message tree for a new Account record,
or transform the message tree for a returned Account record, by using
the JSON schema for the Salesforce Account object.
About this task
The JSON schema for Salesforce objects are provided with IBM® Integration Bus in the install_dir/server/sample/Salesforce directory,
where install_dir is the directory in which you
installed IBM Integration Bus.
Procedure
To reference the Salesforce object schema from a Mapping node, complete the
following steps:
- Create a shared library.
Note: The map and the
JSON schema that it references must all be held in the same shared
library.
- Import into the shared library the schema for the objects
that you want to map.
- If you have added custom fields to your Salesforce objects,
edit the schema to add the custom fields, and save it. For
information about the JSON schema, see JSON schema requirements for message maps.
- Add a reference to the shared library from the application
that contains your message flow.
- Drag and drop a Mapping node
onto the message flow canvas and then double-click the Mapping node to launch the New
Message Map wizard.
- Specify a name for the map, change the container to be
the shared library that holds the JSON schema, and click Next.
- Select as input or output the required Salesforce object
from the list under JSON schema. Each object
appears as both a JSON object and a JSON array:
- Use the JSON object if creating a message tree prior to a
Salesforce Create or Update operation.
- Use the JSON object if transforming a message tree after a
Salesforce Retrieve operation that used a Salesforce ID.
- Use the JSON array if transforming a message tree after all
other Salesforce Retrieve operations.
- Select the other output or input to the map and click Finish.