Picture of Using Approval Comments and Status History in Connect: Flow XML/JSON

Using Approval Comments and Status History in Connect: Flow XML/JSON

 

Overview

Connect: Flow can embed two history related, fully-structured data blocks in every order export (XML or JSON):

  • Job History – a chronological log of all order-level status changes.

  • Approval History – a dedicated log of approval events that captures the approver’s comments (e.g., a billing code) alongside the status that triggered the event.

These optional nodes give your MIS or downstream XSLT transformations immediate visibility of what happened, when it happened, and, for approval events, why it happened. The result is cleaner hand-offs to production, richer reporting, and fewer support calls asking “what changed?”


Key Settings

Setting Location What it Does Typical Impact
Include job history Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure] Adds a <History> (XML) / history (JSON) node under each <OrderLine> containing every recorded status change for that line. Enables detailed audit trails and MIS dashboards that rely on end-to-end status progression.
Include approval history Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure] Adds a <ApprovalHistory> / approvalHistory node under each <OrderLine> containing only approval-related statuses. Allows an MIS to pick up approver comments (e.g., purchase codes) without parsing the entire job history.

Good to know:

  • Both settings are independent. You can export only job history, only approval history, or both, depending on the needs of each supplier-specific flow.
  • Both settings can be applied at a general level for Connect: Flow or on a supplier basis

 


What You’ll See in the Payload

Each history entry is serialised as a HistoryItem with the following fields:

Field Description
Timestamp UTC time in the platform’s global date-time format.
Status Human-readable status name (e.g., AwaitingApproval).
StatusId Integer enum value – useful for systems that map on numeric codes.
CustomerId Identifier of the user whose action triggered the event.
Info Free-text note. For approval events this contains the approver’s comment.

The approval log is automatically filtered to include only: UnapprovedOrder, AwaitingApproval, PartiallyApproved, Approved, and Rejected.


4️⃣ Typical Use Cases

  1. Billing-code hand-off to an MIS
    Approver enters a billing code in the approval comment. The MIS extracts it from the Info field of the first Approved entry and routes the job to the correct cost-centre.

  2. Shop-floor dashboards
    Production screens poll the job-history node to display live status changes without hitting the storefront API.

  3. Supplier-specific compliance logs
    For suppliers that require a full audit trail, enable both settings at supplier level; for low-touch suppliers, leave them disabled to reduce payload size.


5️⃣ Step-by-Step Implementation Guide

  1. Open the Connect → Flow plug-in settings

    • In your storefront admin, navigate to Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure].

    • (If supplier overrides are required) open Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure] ➜ Suppliers [Section].

  2. Enable the desired history blocks

    • Tick Include job history to insert the <History> node.

    • Tick Include approval history to insert the <ApprovalHistory> node.

  3. Update or create your XSLT / JSON transform

    • Map the new nodes into the target schema.

    • Example XSLT snippet for approval comments (XML):

    <ApprovalComments>
      <xsl:for-each select="ApprovalHistory/HistoryItem">
        <xsl:if test="Status='Approved'">
          <xsl:value-of select="Info"/>
        </xsl:if>
      </xsl:for-each>
    </ApprovalComments>
    
  4. Place a test order

    • Use a product that requires approval.

    • Approve the job and enter a distinctive comment.

    • Download the raw export from Admin → Sales→ Orders → [Order] → Extra Data and verify that:

      • The <History> and/or <ApprovalHistory> nodes are present.

      • Your comment appears in the Info field of the Approved entry.

      • Timestamps are in UTC.

  5. Validate downstream processing
    Run the export through your MIS or a staging transform to ensure the new data is consumed correctly.

Incomplete
Alternate Search Terms
WYSIWYG stands for "What You See Is What You Get" which means that the styling choices made in this editor will be reflected on the front end.