Synchronize Salesforce Incidents with ServiceNow Incidents based on Platform Events > Recipe contents > Synchronize Salesforce Incidents with ServiceNow Incidents using Platform Events process
  

Synchronize Salesforce Incidents with ServiceNow Incidents using Platform Events process

When an incident is created or updated in Salesforce, a Salesforce platform event triggers the process.
The process checks whether the user exists in ServiceNow. If the user does not exist, the process creates a user in ServiceNow. The process then searches for a matching incident in ServiceNow by description and creates or updates the incident based on the search results.
The following image shows the steps that the Synchronize Salesforce Incidents with ServiceNow Incidents using Platform Events process contains:
The image shows the steps that the Synchronize Salesforce Incidents with ServiceNow Incidents using Platform Events process contains.
The following table lists the steps that the Synchronize Salesforce Incidents with ServiceNow Incidents using Platform Events process contains:
Step Name
Description
Start
The event searches for the Salesforce platform event name, that is, the Salesforce connection incident.
New/Update Incident trigger
When the incident is created the event in Salesforce trigger the process execution.
Assign Salesforce Incident
Assigns the Salesforce incident to a temporary incident ID.
Prepare Incident Object
Parses the event and assigns values.
Is Description empty
Verifies whether the incident description is empty. If it is empty, an error occurs, and the process ends. Otherwise, the process continues to the next step.
Get Access Token
Gets an access token to authorize all the connection requests.
Search User in ServiceNow
Searches for the user if it is specified in the Salesforce incident.
Get User ID
Saves the user ID.
Is User ID missing in ServiceNow
If the user ID is missing in ServiceNow, creates a user in ServiceNow and gets the user ID. Otherwise, the process continues to the next step.
Search Incident in ServiceNow
Searches for the incident by description. If the incident description is modified in Salesforce, a new incident will be created in ServiceNow.
Get Incident ID
Gets the incident ID.
Is Incident ID missing in ServiceNow
Verifies whether the incident ID is missing in ServiceNow. If the incident ID exists, updates the incident. Otherwise, creates a new incident.
End
Ends the process.