Orchestration

Rather than using the detail array to update the CRM, you can choose to orchestrate as illustrated in this diagram:

This image shows a diagram of the orchestration flow.

Details Steps for Orchestration

  • Do not include the detail array in the subscribe message. This reduces the amount of data transmitted, which saves bandwidth and allows the application to handle a higher number of events per second.
  • Use the primaryKey and eventName from the event to determine which resource has been modified. For example, if eventName is Update Profile, then the resource is a profile.
  • Step A in the diagram: Send a synchronous API call to fetch the latest state of the identified resource. In the case of Update Profile, the operation would be getProfile. getProfile and requires a profileId, which is found in the primaryKey.

Bear in mind the API rate limits on the synchronous API calls. Also note that there is a potential for discrepancies between the event data and the data retrieved through the API call if there are rapid successive changes to the resource.