younifyd
Menu

checkout_addCheckoutShippingConsignments

Add shipping consignments (address and line items) to a checkout.

Use it in a workflow

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

Query

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

graphql
mutation CheckoutAddCheckoutShippingConsignments($input: AddCheckoutShippingConsignmentsInput!) {
  checkout {
    addCheckoutShippingConsignments(input: $input) {
      checkout {
        id
        entityId
        currencyCode
        displayCurrencyCode
        billingAddress {
          entityId
          firstName
          lastName
          email
          company
          address1
          address2
          city
          stateOrProvince
          stateOrProvinceCode
          countryCode
          postalCode
          phone
        }
        cart {
          id
          entityId
          currencyCode
          displayCurrencyCode
          isTaxIncluded
          locale
          version
          externalSource
          source
          companyId
        }
        shippingConsignments {
          entityId
          lineItemIds
        }
        shippingCostTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        shippingCostTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        shippingCostBeforeDiscount {
          currencyCode
          value
          formatted
          formattedV2
        }
        shippingCostBeforeDiscountInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        comparisonShippingCost {
          currencyCode
          value
          formatted
          formattedV2
        }
        comparisonShippingCostInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        giftWrappingCostTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        giftWrappingCostTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        handlingCostTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        handlingCostTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        taxTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        taxTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        taxes {
          name
        }
        subtotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        subtotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        grandTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        grandTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        createdAt {
          utc
        }
        updatedAt {
          utc
        }
        customerMessage
        outstandingBalance {
          currencyCode
          value
          formatted
          formattedV2
        }
        outstandingBalanceInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        coupons {
          entityId
          promotionEntityId
          code
          couponType
          displayName
          status
          hasMaxLimitReached
        }
        giftCertificates {
          entityId
          code
        }
        promotions {
          entityId
          displayName
          priority
        }
        fees {
          id
          feeType
          name
          displayName
          source
          taxClassId
        }
        version
        totalDiscount {
          currencyCode
          value
          formatted
          formattedV2
        }
        totalDiscountInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        displayDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        displayDiscountTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        orderBasedAutoDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        orderBasedAutoDiscountTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        manualDiscountTotal {
          currencyCode
          value
          formatted
          formattedV2
        }
        manualDiscountTotalInDisplayCurrency {
          currencyCode
          value
          formatted
          formattedV2
        }
        order {
          id
          entityId
          isTaxIncluded
          customerMessage
          totalProductQuantity
          backorderShippingExpectationMessage
          permalink
          poNumber
          reference
        }
      }
    }
  }
}

Variables

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

inputobjectrequired

Apply checkout shipping consignments input object

checkoutEntityIdstringrequired
dataobjectrequired1 fields
versionnumber
json
{
  "input": {
    "checkoutEntityId": "string",
    "data": {
      "consignments": [
        "string"
      ]
    },
    "version": 0
  }
}

Response

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

checkoutobject
idstring
entityIdstring
currencyCodestring
displayCurrencyCodestring
billingAddressobject14 fields
cartobject20 fields
shippingConsignmentsarray<object>
shippingCostTotalobject4 fields
shippingCostTotalInDisplayCurrencyobject4 fields
shippingCostBeforeDiscountobject4 fields
shippingCostBeforeDiscountInDisplayCurrencyobject4 fields
comparisonShippingCostobject4 fields
comparisonShippingCostInDisplayCurrencyobject4 fields
giftWrappingCostTotalobject4 fields
giftWrappingCostTotalInDisplayCurrencyobject4 fields
handlingCostTotalobject4 fields
handlingCostTotalInDisplayCurrencyobject4 fields
taxTotalobject4 fields
taxTotalInDisplayCurrencyobject4 fields
taxesarray<object>
subtotalobject4 fields
subtotalInDisplayCurrencyobject4 fields
grandTotalobject4 fields
grandTotalInDisplayCurrencyobject4 fields
createdAtobject1 fields
updatedAtobject1 fields
customerMessagestring
outstandingBalanceobject4 fields
outstandingBalanceInDisplayCurrencyobject4 fields
couponsarray<object>
giftCertificatesarray<object>
promotionsarray<object>
feesarray<object>
versionnumber
totalDiscountobject4 fields
totalDiscountInDisplayCurrencyobject4 fields
displayDiscountTotalobject4 fields
displayDiscountTotalInDisplayCurrencyobject4 fields
orderBasedAutoDiscountTotalobject4 fields
orderBasedAutoDiscountTotalInDisplayCurrencyobject4 fields

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