Synchronize Dynamics 365 Cases with ServiceNow Incidents > Synchronize Dynamics 365 Cases with ServiceNow Incidents contents > Synchronize Dynamics 365 Cases with ServiceNow Incidents process
  

Synchronize Dynamics 365 Cases with ServiceNow Incidents process

You can run the process to synchronize the cases created or updated during the previous day in Dynamics 365 with ServiceNow incidents.
The process is called by an HTTP request with email as the incoming parameter and searches for all the cases that were created or updated during the previous day in Dynamics 365. The process searches for a matching incident in ServiceNow based on the short description and case title. If the incident does not exist, the process searches for the case contact by email in Dynamics 365 with the email in ServiceNow and creates the incident based on the contact details from Dynamics 365 without manual intervention.
The following image shows the steps that the Synchronize Dynamics 365 Cases with ServiceNow Incidents process contains:
The image shows the steps that the Synchronize Dynamics 365 Cases with ServiceNow Incidents process contains.
The following table lists the steps that the Synchronize Dynamics 365 Cases with ServiceNow Incidents process contains:
Step Name
Description
Start
The request searches for the email address to which the process execution result needs to be sent.
Get Access Token
Gets an access token to authorize all the connection requests.
Get Last Created Case
Gets all the cases that were created or updated from the previous day. You can also modify the day from when you want to synchronize the data. For example, if you want to synchronize the cases created or updated today in Dynamics 365, you can update the filter field value from Microsoft.Dynamics.CRM.Yesterday(PropertyName='modifiedon') to Microsoft.Dynamics.CRM.Today(PropertyName='modifiedon') on the Input Fields tab. Similarly, you can update the value to LastWeek, LastMonth, and so on. to synchronize the cases that were created or updated during that period.
Wait to Create Case
When you invoke the process, a message appears to notify the user that the background job has started.
Prepare Case Object
Parses the cases and assigns values.
Pagination
The process iterates the response results for all cases. The process contains a pagination of search results for cases with a limit of 100 results per page. If the number of records is greater than the temporary count value, that is, 100 records per page, the process links the results to the next page.
If the number of records does not cross the temporary count value, the process starts validating the cases. The process performs the steps configured in the Create Incident process and increases the count of successful and failed synchronizations based on the synchronization results. Otherwise, the process increases the count of failed synchronizations. If the case doesn't have a contact type, the number of failed records increases.
Prepare Email with Result
Collects the result that contains the number of successful and failed synchronization cases in the email.
Send Email with Result
Sends an email with the results.
End
Ends the process.