Dispatch Manager (Successor Documents)
This document function (the Dispatch Manager) activates dispatch handling for successor documents derived from a primary document — for example address labels, enclosures, or cover letters. Successor documents are produced per object (e.g. per recipient) and processed through defined targets and actions.
Basic structure
<SuccessorDocumentConfiguration>
<DistributeByObject>
<Targets>
<Target Name="Label" Label="Address label" Icon="Tag">
<TagFilter>
<Tag>label</Tag>
</TagFilter>
<Code>
function main() { return $("RecipientId"); }
</Code>
</Target>
</Targets>
<Actions>
<PrintAction Enabled="true">
<Default TargetName="Label" Printer="LabelPrinter" Tray="Tray2" />
</PrintAction>
<GenerateAction Enabled="true" />
</Actions>
</DistributeByObject>
</SuccessorDocumentConfiguration>
DistributeByObject
Controls the distribution of successor documents per object and contains the two areas Targets (which successor documents) and Actions (what happens with them).
Targets
Defines the available targets (successor document types).
| Element / Attribute | Required | Description |
|---|---|---|
Target | – | A single target. Multiple targets are allowed. |
Target/@Name | yes | Unique identifier of the target; referenced from the actions via TargetName. |
Target/@Label / @translate-Label | optional | Display name or translation key of the target. |
Target/@Icon | optional | Icon for the user interface. |
Target/TagFilter/Tag | optional | Restricts the target to templates carrying the given tags. Multiple Tag entries are allowed. |
Target/Code | yes | JavaScript that returns the distribution value per object. |
GlobalTargets/@Key | optional | Reference to a global target definition instead of an inline Target. |
Actions
Defines what happens with the generated successor documents.
| Element / Attribute | Description |
|---|---|
PrintAction/@Enabled | Enables the print action (default: true). |
PrintAction/Default/@TargetName | References the target to print via its Name. |
PrintAction/Default/@Printer / @Tray | Optional printer and paper tray. |
GenerateAction/@Enabled | Enables the generate action (default: true). |
GlobalActions/@Key | Reference to a global actions definition. |
note
Targets and actions can be maintained centrally as a global configuration via GlobalTargets / GlobalActions and reused across multiple templates.