Configuring Salesforce CreatedBy and LastModifiedBy Field Values
By default, when you configure Service Board-to-Salesforce real-time sync, the CreatedBy and LastModifiedBy field values in Salesforce Events are set to the integration user by Create and Update transform templates. To ensure that these field values reflect user who actually created or updated the associated records on the Service Board side, you must explicitly configure this behavior.
This configuration depends upon Salesforce Audit fields, which are not supported for Update transform templates. This means that to configure LastModifiedById field values for record updates during Service Board-to-Salesforce real-time sync, you must add a custom field to the relevant Salesforce object and add custom field mapping code to the applicable transform template.
To configure Salesforce CreatedBy and LastModifiedBy field values:
1. In Salesforce, enable the Create Audit Fields permission.
2. In
Max Designer, add the following custom field mapping code to these transform templates:
Event to SFE Create Template
Event to SME Create Template
Appointment to SFE Create Template
Appointment to SME Create Template
{
"payload": {
"fields": {
"CreatedById": "payload.fields.io_created_by",
"LastModifiedById": "payload.fields.io_updated_by"
}
}
}
3. To configure the LastModifiedById field value for Event updates during Service Board-to-Salesforce real-time sync, in Salesforce, add a custom field to the relevant object, for example, SVMXC__LastModifiedBy__c, and then in Max Designer, in the applicable Update transform template, add custom field mapping code for the newly created custom field.
{
"payload": {
"fields": {
"SVMXC__LastModifiedBy__c": "payload.fields.io_updated_by"
}
}
For more information:
Was this helpful?