Is there any way to detect whether a cart was created from the Online Store (customer-facing) versus the Admin interface (draft orders)?
Context: We’re building a cart transform function that applies bundle logic. We need to disable this logic for orders created via the Admin (Draft Orders) while keeping it active for standard Online Store carts.
What we’ve checked:
- The
cartobject in the Cart Transform Function API input doesn’t seem to have a source indicator sourceNameis available on the Order object post-purchase, but we need to catch this during the cart transformation phase
Questions:
- Is there a field (documented or undocumented) in the cart GraphQL input that indicates the source is a Draft Order?
- Are there alternative approaches to differentiate these during the cart transform phase (
buyerIdentity, etc.)?
Any insights or workarounds would be greatly appreciated!