Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Provide the ability to generate JSON output from process data.

The node will allow for authoring a JSON styled template, and will map the output based on field names written into the template.

Example Template:

{
	"Vendor":@@Vendor Name@@,@@PO Field Descriptor@@:@@PO Number@@,
	"Amount":##Invoice Amount##,"Invoice Date":@@Document Date@@,
	"Approvers":[
		@@MV Approver List@@
	],
	"Invoice Lines":[@@Line Items[0,1,3,4]@@]
}

Use two @ symbols to represent a JSON string. Use two # symbols to represent a JSON number. Strings are wrapped in quotes. Numbers of left alone. This formatting applies to all field types.

Multi-value fields are written in their entirety in a comma delimited form. In the example above, @@MV Approver List@@ would be represented like:

“Steve”, “Brian”, “Dan”

This results in a valid JSON structure when injected into the JSON as defined:

"Approvers":[
  "Steve","Brian","Dan"
]

Table fields are written in their entirety (all rows) for the table columns specified. All Table Field columns are written as strings. In the example above, @@Line Items[0,1,3,4]@@ will output an object for each row:

{“GL Code”:”100-299300-01”, “Quantity”:”20”,”Amount”:”124.67”}

This results in a valid JSON structure when injected into the JSON as defined:

"Invoice Lines":[
  {“GL Code”:”100-299300-01”, “Quantity”:”20”,”Amount”:”124.67”},
  {“GL Code”:”100-726352-01”, “Quantity”:”1”,”Amount”:”88.98”}
  {“GL Code”:”100-763521-01”, “Quantity”:”23”,”Amount”:”12.95”}
]

Workflow

The JSON Export node is a conditional node with two outputs (Original Process and JSON File). There will always be two routes out, but those two paths can merge downstream in the workflow.

Original Process

The original process is the standard route the source document should take in the workflow.

JSON File

The node, on successful processing of the process' data, will spawn a new workflow process and attach the JSON output as a file in that new process. This will allow the JSON output and the file output to potentially take two different paths if that’s necessary for the workflow.

There will ALWAYS be two processes on successful processing of this node.

Field Names should not contain square brackets.

  • No labels