You are here:
Mapping File Attachments From an Omniscript to Salesforce (Managed Package)
For the managed package runtime, after adding a file or image to an Omniscript, you can map the file from the Omniscript to a parent record in Salesforce. Follow the instructions below to accomplish this:
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
File elements using the Upload to Content Document functionality cannot be mapped in Omnistudio Data Mapper. If Upload to Content Document is checked and the file is mapped in Data Mapper the file will be corrupted.
Before You Begin
LWC Omniscripts do not support file mapping in Data Mapper. See Add a File or Image to Omniscript (Managed Package).
-
From the Data Mapper Load (JSON) associated with the Omniscript, add the Attachment
object to the Creation Sequence.

- Create the following mappings (where FileElement is the name of the File element on the Omniscript):
- Map an Object Id, such as the ContextId, to the Attachment.ParentId. If an object is being created in the same Data Mapper, create a Linked Mapping that maps the Id of the previously created or updated parent object to Attachment.ParentId.
- (Optional) To ensure that files with the same name are not overwritten, check the Upsert Key box for the Attachment:ParentId and Attachment:Name mappings.



