Send XML document
BetaChanges data
Sends any Twinfield XML document and reads the answer back.
Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Twinfield connection the step signs in with. |
| Company code | Leave empty to use the company code on the connection. The offices list is the one document that takes none. |
| DocumentRequired | The 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 does | This 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 text | Hands the answer back as the XML text Twinfield sent, instead of reading it into data. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `twinfield`) |
office | text |
xmlRequest | text |
mode | "read" or "write", by default "write" |
raw | true/false, by default false |
Output
| Field | Type |
|---|---|
resultTwinfield's own result marker | string |
xmlThe answer as text | string |
parsedThe answer as data | any |
Sample output, and the expression for each field
- parsed
- dimension
- code
- [0]"1000"
- result"1"
- code
- dimension
- 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
}