FlowmageDocs

Send XML document

BetaChanges data

Sends any Twinfield XML document and reads the answer back.

Settings

SettingWhat it is
ConnectionRequiredThe Twinfield connection the step signs in with.
Company codeLeave empty to use the company code on the connection. The offices list is the one document that takes none.
DocumentRequiredThe Twinfield document itself — the sign-in, the company code, the envelope and both of Twinfield's failure channels are handled for you. It starts with <list>, <read>, <dimension>, <transaction>, <salesinvoice> or <columns>, for example <read><type>dimensions</type><office>001</office><dimtype>DEB</dimtype><code>1000</code></read>. A value you bring in with {{ }} goes in exactly as written, so wrap one that can hold & or < yourself.
What this document doesThis is what tells the engine whether the call is safe to retry — say reads about a document that posts, and a retry posts twice.
Answer as textHands the answer back as the XML text Twinfield sent, instead of reading it into data.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `twinfield`)
officetext
xmlRequesttext
mode"read" or "write", by default "write"
rawtrue/false, by default false

Output

FieldType
resultTwinfield's own result markerstring
xmlThe answer as textstring
parsedThe answer as dataany
Sample output, and the expression for each field
  • parsed
    • dimension
      • code
        • [0]"1000"
      • result"1"
  • result"1"
  • xml"<dimension result=\"1\"><code>1000</code></dimension>"

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "connection": "<connection id>",
    "mode": "write",
    "office": "",
    "raw": false,
    "xmlRequest": "<document>"
  },
  "label": "Send XML document",
  "type": "twinfield.processXml",
  "version": 1
}