younifyd
Menu

loginWithCustomerLoginJwt

Login with Customer Login JWT.

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the loginWithCustomerLoginJwt action (under Login).
  3. Fill in the fields below, then reference the result from later steps as {{loginwithcustomerloginjwt.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 LoginWithCustomerLoginJwt($jwt: String!, $guestCartEntityId: String) {
  loginWithCustomerLoginJwt(jwt: $jwt, guestCartEntityId: $guestCartEntityId) {
    redirectTo
    customer {
      entityId
      company
      customerGroupId
      customerGroupName
      email
      firstName
      lastName
      notes
      phone
      taxExemptCategory
      addressCount
      attributeCount
      storeCredit {
        currencyCode
        value
        formatted
        formattedV2
      }
      attributes {
        __typename
      }
      formFields {
        entityId
        name
      }
      activeCompany {
        companyName
      }
      isSubscribedToNewsletter
      notificationPreferences
    }
    cart {
      id
      entityId
      currencyCode
      displayCurrencyCode
      isTaxIncluded
      baseAmount {
        currencyCode
        value
        formatted
        formattedV2
      }
      baseAmountInDisplayCurrency {
        currencyCode
        value
        formatted
        formattedV2
      }
      discountedAmount {
        currencyCode
        value
        formatted
        formattedV2
      }
      discountedAmountInDisplayCurrency {
        currencyCode
        value
        formatted
        formattedV2
      }
      amount {
        currencyCode
        value
        formatted
        formattedV2
      }
      amountInDisplayCurrency {
        currencyCode
        value
        formatted
        formattedV2
      }
      discounts {
        entityId
        displayName
      }
      lineItems {
        totalQuantity
      }
      createdAt {
        utc
      }
      updatedAt {
        utc
      }
      locale
      version
      externalSource
      source
      companyId
    }
    customerAccessToken {
      value
      expiresAt
    }
  }
}

Variables

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

jwtstringrequired

Customer Login JWT, for more information: https://developer.bigcommerce.com/docs/start/authentication/customer-login.

guestCartEntityIdstring

The guest cart entity Id which should be assigned.

json
{
  "jwt": "string",
  "guestCartEntityId": "string"
}

Response

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

redirectTostring
customerobject
entityIdnumber
companystring
customerGroupIdnumber
customerGroupNamestring
emailstring
firstNamestring
lastNamestring
notesstring
phonestring
taxExemptCategorystring
addressCountnumber
attributeCountnumber
storeCreditarray<object>
attributesobject
formFieldsarray<object>
activeCompanyobject2 fields
isSubscribedToNewsletterboolean
notificationPreferencesarray<object>
cartobject
idstring
entityIdstring
currencyCodestring
displayCurrencyCodestring
isTaxIncludedboolean
baseAmountobject4 fields
baseAmountInDisplayCurrencyobject4 fields
discountedAmountobject4 fields
discountedAmountInDisplayCurrencyobject4 fields
amountobject4 fields
amountInDisplayCurrencyobject4 fields
discountsarray<object>
lineItemsobject5 fields
createdAtobject1 fields
updatedAtobject1 fields
localestring
versionnumber
externalSourcestring
sourcestring

One ofB2BB2B_INVOICEB2B_QUOTEBUY_NOW

companyIdnumber
customerAccessTokenobject
valuestring
expiresAtstring

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

Was this page helpful?