Select Page

A new knowledge base article has been published on our support portal.

Scenario Overview

In this example the business requirement is to regularly update CRM with data from another system to keep the data synchronized. The example we will use here is a hospital system, sending data to CRM that is updated with information on Doctors, their team assignments and patients.

We will use a N52 scheduler to execute 2 workflows that call the REST API of the hospital system and receive a JSON response back which will then be processed by N52 formulas.

We will be primarily concerned with the Staff Position Assignment data for the Doctor, we will create any Team’s that don’t already exist in CRM, and then add Doctor to that team within CRM. Each Doctor can have multiple Staff Position Overview records returned in the JSON response and the team names are contained within ‘teamInfo’ section of each ‘staffPositionAssignment’ hierarchy. 

Sample JSON Response – From External Hospital System

N52 Formula Manager Solution

Two North 52 Formulas are created

N52 Formula 1

  • Formula of type ’Process Genie’ is set up on the MedicalTeam entity  
  • The formula will call the Rest webservice of the Hospital System
  • It will create a JSON Entity Collection for each of the active assignments
  • It will then check if each listed team exists, if a team is Not Found then it will create that team

N52 Formula 2    

  • A formula of type ‘Process Genie’ is created on the  MedicalTeam entity
  • The formula will call the Rest webservice of the Hospital System 
  • It will create a JSON Entity Collection from the response
  • For each record in the Entity Collection the formula will use a FectchXML call to check if there is an existing Team Member on the Team
  • If not it will then create a Team Member and and add them to the team

View this article in full on our support portal