younifyd
Menu

site_order

Fetch a placed order by its ID or cart ID, including its payments.

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the site_order action (under Order).
  3. Fill in the fields below, then reference the result from later steps as {{siteOrder.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query SiteOrder($filter: OrderFilterInput) {
  site {
    order(filter: $filter) {
      id
      entityId
      orderedAt {
        utc
      }
      updatedAt {
        utc
      }
      status {
        value
        label
      }
      billingAddress {
        firstName
        lastName
        company
        address1
        address2
        city
        stateOrProvince
        stateOrProvinceCode
        country
        countryCode
        postalCode
        phone
        email
      }
      isTaxIncluded
      consignments {
        downloads {
          recipientEmail
        }
        email {
          __typename
        }
      }
      subTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      discountedSubTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      discounts {
        nonCouponDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        couponDiscounts {
          couponCode
        }
        totalDiscount {
          currencyCode
          value
          formatted
          formattedV2
        }
        orderBasedAutoDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        manualDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
      }
      wrappingCostTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      shippingCostTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      handlingCostTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      storeCreditTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      taxTotal {
        currencyCode
        value
        formatted
        formattedV2
      }
      taxes {
        name
        amount {
          currencyCode
          value
          formatted
          formattedV2
        }
      }
      totalIncTax {
        currencyCode
        value
        formatted
        formattedV2
      }
      totalIncTaxAfterGiftCertificatesAndStoreCredit {
        currencyCode
        value
        formatted
        formattedV2
      }
      customerMessage
      totalProductQuantity
      backorderShippingExpectationMessage
      comparisonShippingCost {
        currencyCode
        value
        formatted
        formattedV2
      }
      fees {
        entityId
        feeType
        displayName
        cost {
          currencyCode
          value
          formatted
          formattedV2
        }
        source
      }
      promotions {
        entityId
        displayName
        priority
        couponCode
        discounts {
          type
          target
        }
      }
      permalink
      poNumber
      reference
      company {
        entityId
        name
      }
      history {
        id
        eventType
        statusLabel
        source
        createdAt
      }
      extraFields {
        name
        value
      }
      invoice {
        id
      }
      placedBy {
        entityId
        firstName
        lastName
        email
      }
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

filterobject

Order filter.

entityIdnumberrequired
cartEntityIdstring
json
{
  "filter": {
    "entityId": 0,
    "cartEntityId": "string"
  }
}

Response

Read the result with {{siteOrder.response.data.data.order}}. If the API returns errors, the step fails and they are at {{siteOrder.response.data.errors}}.

idstring
entityIdnumber
orderedAtobject
utcstring
updatedAtobject
utcstring
statusobject
valuestring

One ofAWAITING_FULFILLMENTAWAITING_PAYMENTAWAITING_PICKUPAWAITING_SHIPMENTCANCELLEDCOMPLETEDDECLINEDDISPUTEDINCOMPLETEMANUAL_VERIFICATION_REQUIREDPARTIALLY_REFUNDEDPARTIALLY_SHIPPEDPENDINGREFUNDEDSHIPPED

labelstring
billingAddressobject
firstNamestring
lastNamestring
companystring
address1string
address2string
citystring
stateOrProvincestring
stateOrProvinceCodestring
countrystring
countryCodestring
postalCodestring
phonestring
emailstring
isTaxIncludedboolean
consignmentsobject
downloadsarray<object>
emailobject
subTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
discountedSubTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
discountsobject
nonCouponDiscountTotalobject4 fields
couponDiscountsarray<object>
totalDiscountobject4 fields
orderBasedAutoDiscountTotalobject4 fields
manualDiscountTotalobject4 fields
wrappingCostTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
shippingCostTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
handlingCostTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
storeCreditTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
taxTotalobject
currencyCodestring
valuestring
formattedstring
formattedV2string
taxesarray<object>
nameobject
amountobject
totalIncTaxobject
currencyCodestring
valuestring
formattedstring
formattedV2string
totalIncTaxAfterGiftCertificatesAndStoreCreditobject
currencyCodestring
valuestring
formattedstring
formattedV2string
customerMessagestring
totalProductQuantitynumber
backorderShippingExpectationMessagestring
comparisonShippingCostobject
currencyCodestring
valuestring
formattedstring
formattedV2string
feesarray<object>
entityIdobject
feeTypeobject
displayNameobject
costobject
sourceobject
promotionsarray<object>
entityIdobject
displayNameobject
priorityobject
couponCodeobject
discountsobject
permalinkstring
poNumberstring
referencestring
companyobject
entityIdnumber
namestring
historyarray<object>
idobject
eventTypeobject
statusLabelobject
sourceobject
createdAtobject
extraFieldsarray<object>
nameobject
valueobject
invoiceobject
idstring
placedByobject
entityIdnumber
firstNamestring
lastNamestring
emailstring

Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.

Was this page helpful?