When you work with multiple data sources (e.g., Salesforce, Google, SFTP), itβs critical to control which records synchronize with which feed. Without careful management, one import could accidentally overwrite or delete records from another source.
MetaLocator solves this by allowing you to create a custom field called Segment and use Import Mapping to scope records by their source.
This approach ensures that:
Only records belonging to a specific data source are updated or deleted during synchronization.
Records from other sources remain unaffected.
When to Use Segment-Based Import Mapping
You should implement this method if:
You manage multiple data sources and want to keep their records separate.
You need granular control over which records get updated or deleted.
You want to avoid overwriting or removing records that belong to other imports.
1. Create the Custom Segment Field
Start by creating a field that identifies which data source each record belongs to.
Go to Locations > Fields in the MetaLocator Admin.
Click New Field.
Name the field
segment
.Choose Text as the field type.
Save the field.
You will use this field to label records with their source, for example:
segment = Salesforce
segment = Google
segment = SFTP
2. Configure Import Mapping
Next, create an import mapping so that all records imported by a specific job are automatically tagged with the right segment value.
Go to Tools > Import Mapping.
Click New to create a new mapping.
Set the Mapping Type to JobId.
Choose the Job ID for the data source you are importing (e.g., your Salesforce import job under Background Jobs).
In Field Name, select the
segment
field you just created.In Field Value, enter the name of the data source (e.g.,
Salesforce
).Save the mapping.
This ensures that every record imported by that job is automatically labeled with the correct segment.
3. Enable Sync Logic for the Job
Once segmenting is set up, you can safely enable deletion logic so that only records in that segment are updated or removed when missing from the import file.
Steps:
Open the Existing Job
Go to Background Jobs.
Locate the job you want to update (e.g., Salesforce import job).
Click Actions > Edit Import Settings.
Review Mapping Rules
Click Save and Continue until you reach the Import Options screen.
Confirm that the mapping is correctly assigning
segment = Salesforce
.
Configure Sync Logic
Under Options, set:
Update Existing and Insert New
Update Where:
segment = Salesforce
Delete Where:
segment = Salesforce
This ensures that only Salesforce records are updated or deleted when missing from the file.
Save and Test
Save your changes.
Run a test import to verify that:
Records with
segment = Salesforce
are updated or deleted as expected.Records with other segments remain unaffected.
What Happens After Setup
Records with
segment = Salesforce
Will be deleted if they no longer exist in the Salesforce import file.Records without
segment = Salesforce
Will remain in MetaLocator even if they are missing from the file, preventing accidental deletion of other data.
This keeps multiple data sources in sync without interfering with each other.
4. Best Practices
Use Clear Segment Values
Choose meaningful names likeSalesforce
,SFTP
, orGoogle
so that data ownership is easy to identify.Create One Mapping Per Source
Set up separate JobId mappings for each import job.Test Carefully
Always run test imports with deletion logic enabled before doing production imports.Document Your Setup
Keep a record of which segment values map to which data source to help your team maintain the system over time.
Example Configuration
Goal: All records from Salesforce should be tagged with segment = Salesforce
and deleted if they are missing from the Salesforce import file.
Example Mapping:
Setting | Value |
Mapping Type | JobId |
JobId | Salesforce Import Job ID |
Field Name | segment |
Field Value | Salesforce |
After configuration, MetaLocator will keep Salesforce records in sync β updating or deleting only those records β without affecting data from other sources.