Standard and Custom object mapping

Customer mapping

Mapping the Contact object links Customer/Member data to a Salesforce object that represents a client. Standard Objects are likely to be: Contact and Lead

Standard objects

The following template is standard and includes all objects which are recommended to use.

{

"FirstName": "{{client.first_name}}",

"LastName": "{{client.last_name}}",

"Email": "{{client.email}}",

"MailingStreet": "{{client.address1}},{{client.address2}}",

"MailingCity": "{{client.address3}}",

"MailingState": "{{client.address4}}",

"MailingPostalCode": "{{client.postcode}}",

"MailingCountry": "{{client.country}}",

"MobilePhone": "[+{{client.mobile_prefix}}]{{client.mobile}}",

"Phone": "[+{{client.phone_prefix}}]{{client.phone}}",

"booking__ClientId__c": "{{client.id}}"

}

Custom objects

The following objects can be used but are not required. Custom objects are marked by __c.

{

"Address1__c": "{{client.address1}}",

"Address2__c": "{{client.address2}}",

"Address3__c": "{{client.address3}}",

"Address4__c": "{{client.address4}}",

"Address5__c": "{{client.address5}}",

"ClientType__c": "{{client.client_type}}",

"CompanyId__c": "{{client.company_id}}",

"CompRef__c": "{{client.comp_ref}}",

"Country__c": "{{client.country}}",

"DefaultCompanyId__c": "{{client.default_company_id}}",

"Email__c": "{{client.email}}",

"FirstName__c": "{{client.first_name}}",

"LastName__c": "{{client.last_name | default: 'LastNamePlaceHolder'}}",

"ClientId__c": "{{client.id}}",

"MemberLevelId__c": "{{client.member_level_id}}",

"Mobile__c": "{{client.mobile}}",

"MobilePrefix__c": "{{client.mobile_prefix}}",

"Name__c": "{{client.first_name}} {{client.last_name}}",

"Phone__c": "{{client.phone}}",

"PhonePrefix__c": "{{client.phone_prefix}}",

"PostCode__c": "{{client.postcode}}",

}

Appointment mapping

Mapping the Booking object links Appointment data to a Salesforce object that represents a booking. Standard Object used is: Event

Standard objects

The following template is standard and includes all objects which are recommended to use.

{

"booking__BookingId__c": "{{booking.id}}",

"booking__LongId__c": "{{booking.total.obfuscated_id}}",

"Subject": "{{booking.full_describe}}",

"Description": "{% for space_detail in booking.booking_question_and_answer_objects %}{{"question: "|append: space_detail.name| append: "\n" | append: "answer: "| append: space_detail.answer_to_question| append: "\n\n"}}{% endfor %}",

"DurationInMinutes": "{{booking.slot.duration_in_minutes}}",

"ActivityDateTime": "{{booking.slot.date_time}}",

"StartDateTime": "{{booking.slot.date_time}}",

"EndDateTime": "{{booking.slot.end_date_time}}"

}

Custom objects

The following objects can be used but are not required. Custom objects are marked by __c.

{

"AddressId__c": "{{booking.slot.address_id}}",

"Attended__c": "{{booking.attended}}",

"CancelReason__c": "{{booking.cancel_reason}}",

"CancellationDate__c": "{{booking.cancellation_date}}",

"ClientEmail__c": "{{booking.member.email}}",

"ClientMobile__c": "{{booking.member.mobile}}",

"ClientName__c": "{{booking.member.first_name}} {{booking.member.last_name}}",

"ClientPhone__c": "{{booking.member.phone}}",

"CompanyId__c": "{{booking.slot.company_id}}",

"CreatedAt__c": "{{booking.created_at_tz}}",

"CurrentStatus__c": "{{booking.current_status}}",

"DateTime__c": "{{booking.slot.date_time}}",

"DayOfWeek__c": "{{booking.day_of_week}}",

"Duration__c": "{{booking.slot.duration_in_minutes}}",

"EndDateTime__c": "{{booking.slot.end_date_time | iso8610}}",

"FullDescribe__c": "{{booking.full_describe}}",

"BookingBugId__c": "{{booking.id}}",

"IsCancelled__c": "{{booking.is_cancelled}}",

"JustDate__c": "{{booking.just_date_tz}}",

"JustTime__c": "{{booking.just_time_tz}}",

"LateCancel__c": "{{booking.late_cancel_integer}}",

"Location__c": "{{booking.slot.lat_long}}",

"MemberId__c": "{{booking.member.id}}",

"Month__c": "{{booking.month}}",

"MoveReason__c": "{{booking.move_reason}}",

"Name__c": "{{booking.name}}",

"Notes__c": {{booking.all_notes | to_json | to_json}},

"ObfuscatedId__c": "{{booking.total.obfuscated_id}}",

"PersonId__c": "{{booking.person_id}}",

"PersonName__c": "{{booking.person}}",

"PostTime__c": "{{booking.slot.post_time}}",

"PreTime__c": "{{booking.slot.pre_time}}",

"PrettyPrintMultiStatus__c": "{{booking.pretty_print_multi_status}}",

"Quantity__c": "{{booking.quantity}}",

"ReadableCurrentMultiStat__c": "{{booking.readable_current_multi_stat}}",

"ResourceId__c": "{{booking.resource_id}}",

"ResourceName__c": "{{booking.resource}}",

"SelectedDetails__c": "{{booking.choosen_person_resource}}",

"ServiceId__c": "{{booking.service_id}}",

"ServiceName__c": "{{booking.service}}",

"Settings__c": {{booking.settings | to_json | to_json}},

"SlotId__c": "{{booking.slot_id}}",

"UpdateAt__c": "{{booking.updated_at}}",

"WhoCancelled__c": "{{booking.who_cancelled}}",

"BookingQuestions__c": "Additional_notes: {{booking.questions.additional_notes.answer_to_question}}, add_note: {{booking.questions.additional_notes.answer_to_question}}",

"Status__c": "{{booking.s_status}}",

"Subject": "{{slot.session.name}}",

"Description": "{{slot.session.description}}"

}

Event mapping

Events are not currently mappable but keep an eye out.. they'll be along soon!

How did we do?

Use Studio inside Salesforce

Link JRNI staff to Salesforce users

Contact