Need to create rules based on bundles?
Learn more
LogoLogo
APIsChangelog
  • Getting started
  • Rules
  • Conditions
    • Scope
    • Aggregations
    • Nested
    • Dynamic values
  • Actions
    • Types
      • Percentage
      • Fixed amount
      • Fixed price
      • Buy X pay Y
      • Every X discount Y
    • Bundle
      • Balanced
      • Every
    • Aggregation
    • Limit
  • Matchers
  • Operators
  • Check and validation
  • Core API integration
    • Order rules
    • Price rules
    • Virtual relationships
  • Resources
    • Promotions
    • Price lists
  • Use cases
    • Promotions
      • Discount line items based on item's price
      • Get a discount when paying by credit card
      • Discount an order based on promo item and total number of items
      • Offer a specific shipping method for free in a specific country
      • Discount items with large stock availability
      • Discount all the SKU in an order based on the shipping country
      • Discount all the SKU in an order based on the customer email domain
    • Price lists
      • Discount all prices greater than or equal to a specific value
      • Discount specific SKUs for new clients
      • Change strike-through price based on customer email domain
On this page
  1. Core API integration

Virtual relationships

How to leverage the JSON Web Token info to create rules

PreviousPrice rulesNextPromotions

Last updated 3 months ago

The current Core API integration enables you create rules' conditions based on some information contained in the currently issued JWT token, such as:

JWT field
Description

jwt_customer

The customer associated to the current JWT.

jwt_user

The user associated to the current JWT.

jwt_markets

The list of markets associated to the current JWT.

jwt_stock_locations

The list of stock locations associated to the current JWT.

jwt_custom_claim

The custom claim attached to the current JWT (if any).

These relationships are virtual, meaning that, behind the scenes, the integration calls the related , , object or the array of or objects to fetch the data keeping the jwt_* prefix in the outcome payload and API interaction.

At the moment this relationships are available for the and resources only (more to come, keep and eye on the for any update).

custom claim
Core API reference
user
customer
market
stock location
price
SKU