Create Account flow for the MQ to Salesforce:Account Management pattern
Details about the Create Account flow
-
The Create Account flow first call the GetSession flow which executes a login to Salesforce
if there is no active session.
-
Account data from the MQ input message is mapped into the SOAP message structure for the
Salesforce service call with operation upsert and derived type Account for the sobject.
The session information, which is set up in the LocalEnvironment by the GetSession flow
is added to the Session Header.
-
A web service request is made to Salesforce. The URL used is that set up in the
LocalEnvironment by the GetSession flow.
-
If the service call returns a fault then the fault code is checked and an exception is thrown
to invoke the error handling process.
If the fault code is INVALID_SESSION_ID then the shared variable SessionSet
will be cleared: this will cause GetSession to login to Salesforce when next called.
-
If the service call returns a response and the success status in the response is true
then the Salesforce Account ID is saved in the Environment, the service call is logged and
the flow continues to process any contacts present. Otherwise
an exception is thrown to invoke the error handling process.
-
Control is returned to the Flow Order node: this restores the message and
LocalEnvironment tree to the state on entry to the node so that the original input
data is available to process any contact data..
-
The ContactsUpsert flow is called to make the necessary service calls to
create any new contacts in Salesforce.