FlowmageDocs

Post transaction

BetaChanges data

Posts a sales, purchase, journal, cash or bank transaction in Twinfield.

Settings

SettingWhat it is
ConnectionRequiredThe Twinfield connection the step signs in with.
Company codeLeave empty to use the company code on the connection.
Day bookRequiredThe Twinfield transaction type — VRK for sales, INK for purchase, MEMO for a journal entry.
Transaction numberFill this in to CHANGE a provisional transaction. Leave it empty and Twinfield assigns a new number, which means a second run posts a second transaction.
Post asOnly a provisional transaction can still be changed or deleted.
DateTwinfield writes dates as yyyymmdd.
PeriodThe bookkeeping period this entry lands in.
Currencytext
Invoice numbertext
Due datetext
Payment referencetext
Free text 1text
Free text 2text
Free text 3text
Let Twinfield balance the VATtrue/false
Report Twinfield's warningsOff, Twinfield keeps its warnings to itself and posts anyway.
LinesThe debit and credit sides have to balance, unless Twinfield balances the VAT for you.
Lines (JSON)Lines an earlier node built, instead of the rows above — for example [{"@type":"total","dim1":"1300","debitcredit":"debit","value":"121.00"},{"@type":"detail","dim1":"8000","debitcredit":"credit","value":"100.00","vatcode":"VH"}]
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `twinfield`)
officetext
transactionCodetext
transactionNumbertext
destiny"temporary" or "final", by default "temporary"
datetext
periodtext
currencytext
invoiceNumbertext
dueDatetext
paymentReferencetext
freeText1text
freeText2text
freeText3text
autoBalanceVattrue/false, by default true
raiseWarningtrue/false, by default false
lineslist of {type?: "total" or "detail" or "vat", dim1?: text, dim2?: text, debitCredit?: "debit" or "credit", value?: text, vatCode?: text, description?: text}, by default []
linesJsontext

Output

FieldType
transactionobject
transactionNumberstring
resultTwinfield's own result markerstring
Sample output, and the expression for each field
  • result"1"
  • transaction
    • header
      • [0]
        • number
          • [0]"202100095"
    • result"1"
  • transactionNumber"202100095"

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": {
    "autoBalanceVat": true,
    "connection": "<connection id>",
    "currency": "",
    "date": "",
    "destiny": "temporary",
    "dueDate": "",
    "freeText1": "",
    "freeText2": "",
    "freeText3": "",
    "invoiceNumber": "",
    "lines": [],
    "linesJson": "",
    "office": "",
    "paymentReference": "",
    "period": "",
    "raiseWarning": false,
    "transactionCode": "<day book>",
    "transactionNumber": ""
  },
  "label": "Post transaction",
  "type": "twinfield.postTransaction",
  "version": 1
}