OpenFn integration between CAST custom app and MF Global Salesforce system. See the main MiracleFeet Repo for more on other Salesforce integrations.
This integration is live on the OpenFn.org MiracleFeet India
project.
Note: All commits master
branch will be automatically published to OpenFn.
See here for the draft data sharing agreement. See here - TO UPDATE for the final data mapping specifications.
This OpenFn-powered integration automates a one-way data sync between the India CAST app and the global Salesforce system. See these slides for an overview.
- The CAST app has developed a custom webhook to schedule a payload of data to be forwarded to the OpenFn inbox. This automation will run every day.
- If OpenFn responds with error code → India will resend the next day.
- This payload will contain any records created or modified since the last upload.
- This payload will contain a “Lookup Table” catalog with a list of coded and corresponding string value definitions to inform how coded values can be translated and mapped to the global system (e.g., For the Abnormalities field, a “1” value should be re-labeled as → “No abnormalities” ).
- OpenFn will perform additional data cleaning rules not performed in CAST - see additional cleaning & mapping rules
How the OpenFn automation works...
- The CAST app will regurlarly send
clinic
,patient
, andvisit
data to the OpenFn inbox as a JSON payload orMessage
(see test example and see original mapping specifications). - On receipt, OpenFn will trigger the job
1. Handle Bulk CAST Data
to read and parse this payload into smaller batches ofclinic
,patient
, andvisit
records to be uploaded to Salesforce. - These smaller batches will trigger the following jobs, which will perform additional data cleaning before uploading to Salesforce:
2a. Upload Clinics
job maps to SalesforceClinics
(Account
object)2b. Upload Patients
job maps to SalesforcePatients
(Contact
object)2c. Upload Visits
job maps to SalesforceVisits
(Visit_new__c
object)2d. Delete Visits
job deletes SalesforceVisits
(Visit_new__c
object) if requested by CAST in the scenario that there was a data entry mistake or change in data sharing consent
- Data uploaded successfully to Salesforce will be visible in the _________ dashboards.
The MiracleFeet Global System Administrators will be responsible for ongoing integration monitoring after the historical sync is complete. Admins may receive email alerts or may monitor Activity History
.
Failures may require additional data cleaning automation or coordination with the MiracleFeet India team to review which data was/was not forwarded from the CAST app.
- Historical migration of all clinic data; adjustment to integration
- System admin training
- Finalization of data sharing agreement - see draft here