To successfully import or update SMS data within the Mogli platform, several technical prerequisites must be met to ensure data integrity. These protocols maintain the accuracy of messaging history and ensure that records are properly associated with Salesforce Leads, Contacts, and Opportunities. Before beginning any data operation, verify that the system is running Mogli version 5.69 or later and that the "Create Audit Fields" permission set is active, as this is required to map restricted system fields like "Created Date."
Data Loading Records
Proper historical data migration starts with ensuring that Gateways are configured for SMS mapping and that all message data is organized in a spreadsheet. Each record must be mapped to specific Mogli SMS fields to maintain functionality:
Ensure you’re running Mogli on version 5.69 or later.
Ensure that Gateways are configured in Mogli for proper SMS mapping.
Ensure you have the Create Audit Fields permission set.
Collect your historical SMS data in a spreadsheet and map it to our SMS fields:
Direction (picklist) = Incoming or Outgoing
Status (picklist) = Sent Successfully or Received Successfully
Message (long text) = message text
Created Date
Created By ID
Owner ID
Last Modified By ID (can only be modified on insert)
Last Modified Date (can only be modified on insert)
Scheduled Delivery (date/time) = the date and time the original message was sent (important for message order)
Phone Number ([+][country code][area code][phone number]) = must be in this format: +12223334444
Opportunity ID (lookup) = ID of Opportunity (if applicable)
Lead ID (lookup) = ID of Lead (if applicable)
Contact ID (lookup) = ID of Contact (if applicable)
Campaign ID (lookup) = ID of Campaign (if applicable)
Gateway ID (lookup) = ID of the Gateway used to send or receive the message (or of a placeholder gateway)
Attachments (true/false) = if the message contains an attachment
Export your file to CSV.
Use your preferred data import tool to Insert records and map accordingly. Be sure to trigger processes and workflows if needed.
More information
For more information about editing read-only fields like 'Created Date', refer to these Salesforce Help Articles
Updating SMS Records
When performing bulk updates on records already in the system, precision is maintained through the use of Case Safe IDs.
If a Case Safe ID field does not already exist, create a custom formula field on the SMS object:
Ensure you’re running Mogli on version 5.69 or later.
Ensure you have the Create Audit Fields permission set.
Run a report that includes the Case Safe IDs of the SMS records to update.
Need a Case Safe ID field?
Create a custom formula field named Case Safe ID on the SMS object.
Formula Return Type: Text
Formula:
CASESAFEID(Id)
Export the Case Safe SMS IDs into a spreadsheet and map your changes using the SMS fields as described above. Include any custom fields that also require changes.
Save your file as a CSV.
Use your preferred data import tool to Update records and map accordingly.
Trigger processes and workflows if needed.