Use Import Lookups
Import lookups resolve related record IDs from values in your file (for example, an account name instead of an Account ID) while you run an import in Dataloader from MuleSoft.
A lookup is a relationship between two objects. Salesforce objects often include lookup fields that associate two records. For example, a Contact record includes an Account lookup field (AccountId) that links the contact to an account. The object that contains the lookup field is the source object; the object the lookup points to is the target object.
Use lookups when you import data that depends on another object in one operation, for example, loading contacts and linking each to a parent account by name instead of by Account ID.
If your source file has an account name but not the Account ID that Salesforce requires, configure a lookup on the Account ID field mapping. Select Lookup via, then choose Account Name as the lookup field. Dataloader from MuleSoft resolves the Account ID from that value before sending the data to Salesforce.
Lookups infer a unique ID from a field that can be non-unique (for example, a contact name). A lookup can return multiple matches for your reference value, for example, more than one account with the same name.
You can choose how to handle multiple or missing matches:
- Use first match in multiple results: Dataloader from MuleSoft uses the first matching record when more than one row matches your field. For example, if several accounts are named
Great Consulting, the app uses the first match Salesforce returns. - Mark record with an error if more than one match is found: Dataloader from MuleSoft marks the row with an error when it finds more than one match. Fix the data in Salesforce or add the correct ID to your file and run again.
- Insert null value(s) if no match is found: If no row matches, Dataloader from MuleSoft inserts empty values or skips creating the lookup relationship, depending on your mapping.
Besides insert, you can use lookups for Update, Upsert, or Delete when you don’t have Salesforce IDs but do have another identifying field.