Supply Lens

Shopify order settings

Every setting on the Shopify Orders Configuration, from which orders are imported to customer matching, metafields, tags, tax codes, currency and order splitting.

These settings live on the Orders Configuration of a Shopify Integration. They decide which Shopify orders are imported and how each one is turned into a Supply Lens Document. setupDate and importDelay are inherited from the base Shopify configuration, so they also appear on the other Shopify Configurations. For the other Document types, see Shopify shipment settings, Shopify inventory settings and Shopify product update settings.

Which orders are imported

An order is imported only if it passes every one of these filters.

SettingWhat it doesValues / defaultWhen to change it
Setup date setupDateOnly orders created on or after this date are imported, so historical orders aren't pulled in at go-live.Date. Set automatically when the Integration is first configured.Not normally changed afterwards.
Last import date lastImportDateThe import watermark. Each run only fetches orders modified after it, and it moves forward after every run.Date and time. Managed by the system.Don't edit it by hand.
Financial statuses financialStatusesThe Shopify payment statuses an order must have to be imported.List. Default ["paid", "partially_refunded", "refunded"]. See the values below.Add authorized if you capture payment after picking; add pending or partially_paid only if you're happy to ship before full payment.
Fulfilment statuses fulfillmentStatusesThe Shopify fulfilment statuses an order must have to be imported.List. Default ["unfulfilled"]. See the values below.Add partially_fulfilled if part of an order may be fulfilled elsewhere and the rest should still come through.
Fulfilment order statuses fulfillmentOrderStatusesShopify splits each order into one or more fulfilment orders, one per fulfilment location. Only fulfilment orders with a status in this list are imported, each as a separate Document.List. Default ["open", "in_progress", "scheduled", "on_hold"].Rarely; narrow it if some fulfilment order states shouldn't reach the warehouse.
Include POS orders includePosIncludes orders placed through Shopify POS (point of sale, the in-person till) alongside online orders.true or false. Default false: POS orders are excluded.Turn on when your back-office system should see shop and pop-up sales too.
Customer country filter customerCountryFilterWhen it has values, only orders from customers in those countries are imported.List of country codes or names as they appear in Shopify. Empty (the default) means every country.Use it when one set-up should only handle some countries.
Import delay importDelayA wait before an order is imported after it arrives.Duration, for example 00:05:00 for five minutes.Set it when another Shopify app (a 3PL or fulfilment app, for example) needs time to update the order first.

Financial status values

ValueMeaning
authorizedPayment has been authorised but not captured
expiredAn authorisation has expired
paidThe order has been fully paid
partially_paidPart of the order has been paid
partially_refundedPart of the payment has been refunded
pendingPayment is pending
refundedThe full payment has been refunded
voidedThe payment has been voided

Fulfilment status values

ValueMeaning
unfulfilledNo items have been fulfilled
partially_fulfilledSome items have been fulfilled
fulfilledAll items have been fulfilled
in_progressFulfilment is in progress
on_holdFulfilment is on hold
scheduledFulfilment is scheduled
pending_fulfillmentFulfilment is pending
restockedItems have been restocked (typically after cancellation)

Customers

SettingWhat it doesValues / defaultWhen to change it
Default customer defaultCustomerIdThe Party used when an order has no identifiable customer: a fallback "guest" or "anonymous" customer.A Party ID.Set it as a safety net for orders without a matched customer.
Always use the default customer alwaysSetDefaultCustomerIdUses defaultCustomerId for every order, whether or not a customer could be identified.true or false.Turn on when all orders should go to one generic customer account, such as a consumer web shop.
POS customer posCustomerIdThe Party used for Shopify POS orders that have no customer.A Party ID.Set it to a walk-in or counter-sales customer if you import POS orders.
Always use the POS customer alwaysSetPosCustomerIdUses posCustomerId for every POS order, even ones with a customer attached in Shopify.true or false.Turn on when every POS sale should land on the POS customer.
Identify the customer from a metafield metafieldCustomerIdentificationA list of rules that read the customer's identifier from a Shopify metafield on the order. Rules are tried in order and the first successful match is used.List of rules; fields below.Use it when the customer's code or other identifier is stored in an order metafield.
Identify the customer from a custom attribute customAttributeCustomerIdentificationA list of rules that read the customer's identifier from a Shopify custom attribute (order note attribute).List of rules; fields below.Use it when a checkout field or app stores the identifier as a note attribute.
Use the purchasing company location usePurchasingCompanyLocationTakes the address and contact details from the Shopify B2B purchasing company's location, not the company itself.true or false.Turn on for Shopify B2B where a company has several ship-to locations.
Use the company external ID useCompanyExternalIdForIdentificationMatches the customer on the Shopify company's external ID field instead of the Shopify global ID (GID).true or false.Turn on when your customer records are keyed on a reference stored in Shopify's external ID field.

Metafield rule fields

Each rule in metafieldCustomerIdentification has these fields.

FieldWhat it does
metafieldKeyThe Shopify metafield key to read the identifier from
partyIdentifierTypeThe type of identifier the value represents (for example customer-code or email)
jsonPathOptional. A JSON Path expression to pick a value out of a JSON-formatted metafield
patternOptional. A regular expression applied to the metafield value
replacementA replacement string used with the regular expression match
groupNumberThe numbered capture group to take from the match
groupNameThe named capture group to take from the match

Custom attribute rule fields

Each rule in customAttributeCustomerIdentification has these fields.

FieldWhat it does
customAttributeKeyThe custom attribute key to read
partyIdentifierTypeThe type of identifier the value represents

Metafields and custom attributes

The four metafield keys below fall back to the order's custom attributes with the same key when the metafield isn't found.

SettingWhat it doesValues / defaultWhen to change it
Earliest ship date metafield earliestShipDateMetafieldKeyThe metafield (of type date) to read the earliest ship date from.A metafield key.Set it when orders carry a "don't ship before" date.
Salesperson metafield salesPersonMetafieldKeyThe metafield to read the salesperson's name or identifier from.A metafield key.Set it when orders record a sales rep.
Fulfilment location metafield fulfillmentLocationMetafieldKeyThe metafield that says which fulfilment Location (warehouse) should handle the order.A metafield key.Set it when the warehouse is chosen per order in Shopify.
Fulfilment location identifier type fulfillmentLocationMetafieldIdentifierTypeHow the fulfilment location value is interpreted.Default warehouse-code. Other identifier types may be supported depending on your configuration.Change it if the metafield holds a different kind of Location identifier.
Purchase order number metafield purchaseOrderNumberMetafieldKeyThe metafield holding the customer's purchase order number.A metafield key.Set it when B2B customers give a PO number at checkout.
Custom attribute tag maps customAttributeMapsReads a custom attribute value from the order and produces tags from a tag map. Each entry has a key (the custom attribute to read) and a tagMap (a list of partial tag patterns; the first match decides the tag applied).List of entries.Use it to turn free-form checkout values into standard tags.
Custom attribute line tags customAttributeLineTagsA dictionary of custom attribute keys to tag definitions. When a line item has a matching custom attribute, the tag is applied to that line.Dictionary.Use it to carry line-level data, such as personalisation text, through as tags.
Custom attribute date format customAttributeDateFormatThe format used to read dates from custom attributes.A format string such as "yyyy-MM-dd". If not set, standard formats are tried.Set it when a custom attribute date doesn't parse.

Tags

SettingWhat it doesValues / defaultWhen to change it
Document tag generation documentLevelTagGenerationRules that create tags on the imported Document from values in the source data, using a simple path.List of rules; fields below.Use it to tag orders with any field from the Shopify order.
Advanced document tag generation documentLevelAdvancedTagGenerationThe same, but using JSON Path or JSON Pointer expressions for nested or complex data.List of rules; fields below.Use it when a simple path can't reach the value.
Source name map sourceNameMapMaps the Shopify order source name (for example web, pos or app, the channel the order came through) to an internal tag or value. The first matching entry is applied.List of entries.Use it to tag or route orders by channel.

Rule fields for documentLevelTagGeneration:

FieldWhat it does
sourceOptional. The source document or payload to read from. Defaults to the order.
keyThe tag key to create
pathA simple path to the field whose value becomes the tag value

Rule fields for documentLevelAdvancedTagGeneration:

FieldWhat it does
sourceOptional. The source document or payload to read from
keyThe tag key to create
jsonPathA JSON Path expression to extract the value
jsonPointerA JSON Pointer expression to extract the value (an alternative to JSON Path)

Tax codes

The force settings put a specific tax code from your tax configuration onto part of the order, overriding the tax code that would normally be worked out.

SettingWhat it doesValues / defaultWhen to change it
Force tax code forceTaxCodeApplies one tax code to the whole order.A tax code ID.When every order should carry one tax code.
Force line tax code forceLineTaxCodeApplies one tax code to every product line.A tax code ID.When product lines should always use one tax code.
Force adjustment tax code forceAdjustmentTaxCodeApplies one tax code to every discount and charge adjustment.A tax code ID.When adjustments need a fixed tax code.
Force shipping tax code forceShippingTaxCodeApplies one tax code to every shipping line.A tax code ID.When shipping needs a fixed tax code.
Tax code identifiers by country taxCodeIdentifiersByCountryPer country, which identifiers are offered when matching a goods line's tax to a tax code.Map with a default list and per-country values. Default ["shopify-tax-code-title", "uncl5305-code"] for every country.Add rate-qualified forms for a country with reduced rates (such as the UK) so a 5% line doesn't resolve to the standard-rate code.
Shipping tax code identifiers by country shippingTaxCodeIdentifiersByCountryThe same selection for shipping lines.Same shape and default.Normally leave on the default (see below).

Why rate-qualified identifiers matter

Shopify gives every tax line for a country the same title whatever the rate: a UK order labels both a 20% line and a 5% line GB VAT. On the default selection, both match the same tax code and the reduced-rate line is treated as standard rate. The rate-qualified forms let each rate resolve to its own tax code. For each country, choose any combination of:

ValueExample
uncl5305-codeS for a line with tax, Z for one without
shopify-tax-rate5%
shopify-tax-country-rateGB 5%
shopify-tax-code-titleGB VAT
shopify-tax-code-title-rateGB VAT 5%

Percentages are shown to at most four decimal places (17.5%, 8.25%).

{
  "default": ["shopify-tax-code-title", "uncl5305-code"],
  "values": { "GB": ["shopify-tax-code-title-rate", "shopify-tax-country-rate"] }
}

How matching works:

  • A code list entry is a candidate if it matches any identifier provided, so each extra form widens the match. Where several entries match, the more specifically scoped one wins: organisation-specific before shared, country-specific before country-agnostic, then the entry's order. A tie raises no error, so point all the forms you configure at the same tax code.
  • That's why uncl5305-code is normally dropped when you add a rate-qualified form: it matches the shared standard-rate entry, which would then compete on every line.
  • An identifier that can't be built is skipped (a country form on an order with no address, or a title form on a tax line with no title). If that leaves nothing, uncl5305-code is used so there's always something to resolve on.
  • Zero-rated lines are unaffected: a line with no tax always resolves on the UNCL5305 code Z.
  • Keep the default for countries that charge several taxes per line. A US order carries separate state, county, city and special district tax lines, and you'd need a code list entry for every combination.

Place of supply. For goods lines the country is taken per line: physical goods (requiresShipping) use the delivery address, falling back to billing; digital goods use the billing address, falling back to delivery. A line with no requiresShipping flag counts as physical. Order-level tax such as discounts and duties uses the delivery address. For shipping lines, the country is the delivery address, falling back to billing.

Shipping lines. Shopify charges shipping tax at a blended rate based on the mix of goods, so the rate on a shipping line is nominal: it can read 0.2 while the amount charged is zero. Qualifying by that rate would match a tax code the order never used, which is why shippingTaxCodeIdentifiersByCountry normally stays on the title and the S / Z distinction even when goods lines are rate-qualified.

Add the code list entries first

Before configuring a rate-qualified form for a country, the code list must have an entry for every combination it will produce. A combination with no entry leaves the tax code unresolved, and any map that reads a value from it (such as the BATA vat_code column) writes an empty value rather than failing. shopify-tax-country-rate (GB 20%, GB 5% and so on) is the lower-maintenance option where tax line titles are inconsistent.

Currency

SettingWhat it doesValues / defaultWhen to change it
Use presentment money usePresentmentMoneyTakes prices from Shopify's presentment amounts (the currency shown to the customer at checkout) instead of the shop's base currency.true or false.Turn on when you sell in several currencies and need the currency the customer paid in.

Order splitting and lines

Shopify orders are split by fulfilment order automatically, so one Shopify order can produce several Documents, one per fulfilment location.

SettingWhat it doesValues / defaultWhen to change it
Process lines without fulfilment orders processLineItemsWithoutFulfillmentOrdersIncludes line items that aren't on any fulfilment order (gift cards or custom items Shopify doesn't fulfil).true or false. When off or not set, those lines are skipped.Turn on when those lines must reach the target system, for example for invoicing.
Apply line discounts at order level applyLineDiscountsAtOrderLevelApplies Shopify per-line discounts as order-level adjustments instead of building them into each line's unit price.true or false.Turn on when the target system handles order-level discounts differently from line discounts.