When to use a script instead of an XML file
An XML file can only hold static settings. A script can vary the file naming rules, file locations, and field mappings according to the data in the exported document. A script is also required with ABBYY FlexiCapture Cloud, which cannot store an XML configuration file on Processing Stations.Changing the export settings means editing the script, which in turn means publishing a new version of the Document Definition.
Script to use
Use the script namedUiPath - ExportScript - Configure by script.cs from the connector files.