It is possible to uniquely identify objects to import using the 'sourceName' and 'sourceId' attributes in the XML, e.g.
<root>
<document id="doc001" name="my document" sourceName="AmazingSystem" sourceId="amz5843">
<data mime="application/x-indesign">pallino.indd</data>
</document>
</root>
identifies the document to be imported as coming from 'AmazingSystem' and with an unique id 'amz5843' (unique within AmazingSystem).
The 'sourceName' value MUST be the name of one of the source object in the system. If this is not the case the import will stop with an error.
The 'sourceId' value can be any string of up to 80 character. It MUST be unique and immutable within the source system - e.g. there is no other object with source id 'amz5843' with 'AmazingSystem' and the object that source id is always the same document.
When the ImportDocuments worfklow detects XML with a sourceName/sourceId pair it will look for an already existing archive object associated with that source ('sourceRef' attribute) and with that source id ('sourceId' attribute).
If there is such an object the workflow will update it with the imported data, if there is not object the workflow will create a new one, setting its 'sourceRef' and 'sourceId' attributes - so that future re-imports of data coming from the same source will update it.
If the XML does not specify sourceName and sourceId the workflow will always import it as a new object and it will not set its 'sourceRef' and 'sourceId' attributes.
The source names 'GN4:<GUID>' (e.g. 'GN4:15a64d6b-5c31-48b0-838b-0d62f7904121') identify GN4 systems with that system unique identifier (see System Unique Identifier ). In this case the source id MUST be the GN4 object id (e.g. 'obj6793').
When the ImportDocuments workflow detectes XML with a sourceName indicating the same system as its source it tries to find existing archived objects to modify by id first - e.g. assuming that '15a64d6b-5c31-48b0-838b-0d62f7904121' is the current system unique identifier, when importing
<root>
<document id="doc001" name="my document" sourceName="GN4:15a64d6b-5c31-48b0-838b-0d62f7904121" sourceId="obj5843">
<data mime="application/x-indesign">pallino.indd</data>
</document>
</root>
if there is no existing object with the specified source the workflow will then look for an archive object with id 5843 under the archiving root folder - if it finds it it will update it (WITHOUT modifiying its 'sourceRef' and 'sourceId' attributes), otherwise it will create a new object.