Skip to main content

Create Person in SF

This job was provided by an user via the job library API.


Key Functions

dataValue, field, fields, humanProper, relationship, upsert


upsert("Patient__c", "CommCare_Case_ID__c", fields(
field('CommCare_Case_ID__c', dataValue("")),
relationship('Clinic__r', 'Location_ID__c', dataValue('')),
field('First_Name__c', humanProper(,
field('Last_Name__c', humanProper(,
field('Patient_ID__c', dataValue('')),
field('Age_Months_Started_Treatment__c', dataValue('')),
field('Registration_Date__c', (state) => {
const validDate =
return ( validDate ? new Date(validDate).toISOString() : null )