🚀 Connect: Flow Tips & Tricks 🚀

Read our handy storefront styling tips and tricks!

Adding the Stripe CaptureRequestId to Connect: Flow

Many customers’ downstream systems (ERPs, fulfilment hubs, reporting tools, etc.) need the Stripe CaptureRequestId to reconcile payments.
This artfcle introduces:

  1. Database support – a CaptureRequestId column is present on the Transaction table.

  2. Connect: Flow “Payment” node – an optional block of detailed payment data (including CaptureRequestId) that can be added to every MIS.Generic XML/JSON payload.

  3. A new settings group – lets you turn the Payment node on or off globally and/or per supplier.


Key settings

Setting Location What it does
Include payment information Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure] When ON, the connector injects the full <Payment> node into the payload. When OFF, no payment data is sent (default for backwards-compatibility).
General vs. Supplier-specific toggle Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure] ➜ Suppliers [Tab] Lets you override the global choice for a specific supplier if they do (or don’t) require the extra data.

Fields inside the <Payment> node

PaymentMethod
PaymentTransactionId
CaptureTransactionId
PurchaseOrderNumber
InfigoTransactionId
AuthorizationRequestId
CaptureRequestId   ← new & critical
CurrencyCode
Amount
AuthorizationExpirationDateUtc
TransactionDateUtc

Typical use cases

Use case Why the Payment node helps
ERP reconciliation Finance teams can match Stripe captures to sales orders by CaptureRequestId.
Chargeback investigations Support agents see full transaction lineage (auth → capture IDs) inside their MIS logs.
Multi-capture orders Future-proofed: the <Payment> node is already a list, so multiple transactions per order won’t break existing integrations.
   

Step-by-step implementation guide

1 Enable the Payment node

  1. Sign in as an administrator.

  2. Navigate to Admin ➜ Configuration ➜ Plugins ➜ Connect: Flow [Configure]

  3. Toggle “Include payment information” to ON.

  4. Save your changes.

3 Verify the payload

  1. Place a test order on a storefront that uses ExternalPayments.

  2. Allow the Connect Flow job to post to your test API endpoint

    • or view the “Extra Data” preview in the order details. (Sales ➜ Orders ➜ View [Order] ➜ Extra Data [Section]

  3. Confirm the <Payment> node is present and contains the fields listed above, including a non-null <CaptureRequestId>.

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
🔎
Loading…
    Select a tip or trick