3.11.1 Importing Content Documents and Attachments with XML
As customer demanding is our concerned, Content Documents and Attachment with XML is now being developed. The logic is the same with CSV file to import those contents. This enhancement support files using Content Version.
This document is specific for upload data into sObject and also upload its attachment. This require to have the same file structure as below:
- Files xml or csv that is store the data of sObject needed to integrate, in this file it must have a field that is a file attachment name.
- File for integrate into attachment object. Example pdf, word etc.
In this document, we use sObject Account as an example with Agent V 1.47
Figure 2: In the xml file, field FileImageName is the file pdf name that is use for upload to Attachment.
To configure this, there are some steps should be followed:
- Create two interfaces (1) for upload the Account data and (2) for upload attachment. Second interface must have sequence number follow the first one.
We need to upload the xml or csv Account data to both interface in order to create IStructure.
But in the second interface, the interface for upload attachment, we need to create one more IStructure with this name “FILE_BODY”. And do the mapping as below.
For the first interface, mapping is normal as integrate data inbound.
Below is mapping for second interface.
We use VLOOKUP function to find parent ID of the attachment.
- Create two adapters, one for each interface. This step we need to go to Agent
Account is created with its attachment.