Skip to main content

Payload provenance

The Payload provenance answers one question after the fact: why does this value in the generated e-invoice say what it says? It records what a field assignment wrote into the payload, what it replaced, and which assignment should have fired and did not.

Only what a configuration decided is recorded. The values the standard mapping writes by itself are not logged row by row - they stand in the stored payload, and the reason for them is the app's own mapping, not a setting somebody made. A document without field assignments therefore produces no provenance at all.

Where to find it

  • Artifacts - the Payload Provenance action opens the entries of the selected artifact. Because the provenance belongs to the artifact, it always answers for the exact payload that was generated, including a superseded earlier attempt.
  • Document queue - the Field Assignments FactBox summarises the same entries for the queue entry in view.

The Field Assignments FactBox

{add screenshot of Field Assignments here}

  • Assigned Values - how many values a field assignment wrote into the payload of this document.
  • Replaced Standard Values - how many of those replaced a value Business Central had produced. These are the ones to look at first when a recipient disputes what was invoiced.
  • Assignments That Did Nothing - how many assignments applied to this document but wrote nothing, for instance because their condition did not hold or their source was empty.

Each count drills down to the matching entries. The counts are facts, not verdicts: a replaced standard value is the one a reader should look at and a skipped assignment is worth a second glance, but neither is an error.

Where there is nothing to count, the FactBox says why: "No e-invoice has been generated for this entry yet." or "No field assignment applied to this document."

The entries

{add screenshot of DEXPRO eInvoice Payload Provenance here}

  • XRechnung Field Path - the field the entry is about.
  • Line No. - the document line the value belongs to. Zero means the document header.
  • Origin - Field Assignment, Extension or Skipped.
  • Assignment Code - the field assignment behind the entry.
  • Source Description - the source in words: the table and field, the constant, or the rule group. It is stored as it stood when the payload was built, so the entry still reads correctly after the assignment behind it has been changed or deleted.
  • Value Written - the value that went into the payload.
  • Value Replaced - the value Business Central had produced, where the assignment replaced it.
  • Skip Reason - why an assignment wrote nothing.
  • Logged At - when the entry was written.

Why it is kept

The provenance is a child of the artifact, which already keeps the payload, its hashes, the API spec version and the KoSIT report. The value and the reason for it are therefore kept together and cleaned up together, and an e-invoice can be defended afterwards down to the single field: the stored payload says what was sent, and the provenance says which setting put it there.

A test run from the field assignments shows the same rows, but writes nothing: a payload that is never stored as an artifact leaves no provenance behind.