SourcingAudit

A Sourcing Audit is an immutable record of the inputs, evaluation results, and outcome of a single Sourcing Request.
It captures why a sourcing decision was made for an Order or FulfilmentChoice.
Sourcing Audits are stored as documents in object storage and are exposed through the sourcingAudits query.
Quantity arrays within an audit are positional: SourcingAuditStrategyLocation.missingItemQuantities and SourcingAuditStrategyFulfilment.itemQuantities each contain one entry per Item in items, aligned by index (0-based). They carry quantities only; Item identity is defined solely by items.
Access requires SOURCINGAUDIT_VIEW at account level or at the retailer level of the audited entity.

Fields

ref (String)

Unique reference identifier for the Sourcing Audit.
Max character limit: 30.

entityType (String)

The type of the audited entity.
Supported values are ORDER and FULFILMENT_CHOICE.

entityId (ID)

The identifier of the audited Order or FulfilmentChoice.

entityRef (String)

The reference of the audited Order or FulfilmentChoice.

retailer (RetailerLink)

The Retailer the audited Sourcing Request belongs to.

type (String)

The type of the Sourcing Request.
Supported values are PRIMARY and FALLBACK.
Max character limit: 30.

status (String)

The overall outcome of the Sourcing Request.
Supported values include FULLY_SOURCED (all Items sourced in full), PARTIALLY_SOURCED (at least one Item has less than its full quantity sourced), and NOT_SOURCED (no Items sourced).
Max character limit: 30.

createdOn (DateTime)

Time the Sourcing Audit was created.

profile (SourcingProfile)

The SourcingProfile and version used for the sourcing decision.
Resolved when the audit is queried and populated only if the caller holds the SOURCINGPROFILE_VIEW permission.

strategies ([SourcingAuditStrategy])

The Strategies considered during evaluation, in priority order.

items ([SourcingAuditItem])

The Items and their quantities included in this Sourcing Request, in a fixed, significant order.

locationCount (Int)

The total number of unique Locations considered across the Sourcing Request.