Headers JSON structure

The headers of document are sent to the script in JSON Convectional format message containing name value pairs for each header. The same format must be used when defining header for output from the script. Some headers cannot be changed by script. FromLogicalID, ToLogicalID, DocumentName(BODType), MessageID and TenantID are created by ION. If a script output with message headers contains these headers or any other invalid header, then it is ignored.

This is an example of a format of message headers in JSON:

{
  "documentName"        : "<string>",
  "messageId"           : "<string>",
  "fromLogicalId"       : "<string>",
  "toLogicalId"         : "<string>",
  "tenantId"            : "<string>",
  "accountingEntity"    : "<string>",
  "location"            : "<string>",
  "documentId"          : "<string>",
  "variationId"         : <long>,
  "revisionId"          : "<string>",
  "batchId"             : "<string>",
  "batchSequence"       : <long>,
  "batchSize"           : <long>,
  "batchRevision"       : <long>,
  "batchAbortIndicator" : <boolean[true, false]>,
  "instances"           : <long>,
  "source"              : "<string>",
  "custom_<anyUnqValue>": "<string>"
}