Menu
validateSessionSyncJwt
Validate a session-sync JWT and restore the customer, cart and analytics session it carries.
Use it in a workflow
- Add a step and choose the BigCommerce Storefront connector.
- Pick the validateSessionSyncJwt action (under Validate).
- Fill in the fields below, then reference the result from later steps as
{{validatesessionsyncjwt.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.
mutation ValidateSessionSyncJwt($jwt: String!) {
validateSessionSyncJwt(jwt: $jwt) {
content {
customer {
entityId
company
customerGroupId
customerGroupName
email
firstName
lastName
notes
phone
taxExemptCategory
addressCount
attributeCount
isSubscribedToNewsletter
notificationPreferences
}
customerAccessToken {
value
expiresAt
}
cart {
id
entityId
currencyCode
displayCurrencyCode
isTaxIncluded
locale
version
externalSource
source
companyId
}
analytics {
visitorId
visitId
}
redirectTo
}
errors {
__typename
... on InvalidSessionSyncJwtError {
errorType
message
}
... on JwtTokenExpiredError {
message
}
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"jwt": "string"
}
Response
Read the result with {{validatesessionsyncjwt.response.data.data.validateSessionSyncJwt}}. If the API returns errors, the step fails and they are at {{validatesessionsyncjwt.response.data.errors}}.
Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?