younifyd
Menu

checkout_updateCheckout

Update a checkout.

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the checkout_updateCheckout action (under Update).
  3. Fill in the fields below, then reference the result from later steps as {{checkoutUpdatecheckout.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 CheckoutUpdateCheckout($input: UpdateCheckoutInput!) {
  checkout {
    updateCheckout(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
        }
      }
      errors {
        __typename
        ... on CartError {
          message
        }
        ... on CartLineItemError {
          message
        }
        ... on CheckoutShippingConsignmentError {
          message
        }
        ... on CheckoutBillingAddressError {
          message
        }
        ... on CheckoutCouponError {
          message
        }
        ... on CheckoutTaxError {
          message
        }
      }
    }
  }
}

Variables

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

inputobjectrequired

Update checkout input object

checkoutEntityIdstringrequired
dataobjectrequired5 fields
versionnumber
json
{
  "input": {
    "checkoutEntityId": "string",
    "data": {
      "lineItems": [
        "string"
      ],
      "shippingConsignments": [
        "string"
      ],
      "billingAddress": {
        "countryCode": "string",
        "shouldSaveAddress": "string",
        "firstName": "string",
        "lastName": "string",
        "email": "string",
        "company": "string",
        "address1": "string",
        "address2": "string",
        "city": "string",
        "stateOrProvince": "string",
        "stateOrProvinceCode": "string",
        "postalCode": "string"
      },
      "customerMessage": "string",
      "coupons": [
        "string"
      ]
    },
    "version": 0
  }
}

Response

Read the result with {{checkoutUpdatecheckout.response.data.data.updateCheckout}}. If the API returns errors, the step fails and they are at {{checkoutUpdatecheckout.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
errorsarray<object>
codeobject
contextobject
messageobject

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

checkout_updateCheckout — BigCommerce Storefront — Documentation