Properties

The schema is defined by properties and their parent relations. These determine the shape of the data to pass to the Processor API and the expressions that can be used to evaluate the provided data.

Default Properties

When you create a project, a default set of properties are created:

  • Context
    • CurrencyCode
  • Customer
    • Email - this is required to use coupon codes tied to specific users
  • Basket
    • OriginalTotal - this is the total of the line items before discounts have applied (populated by the engine)
    • Total - this is the current discounted total of the line items (populated by the engine)
    • LineItemQuantity - total quantity of line items (populated by the engine)
  • Evaluator (populated by the engine)
    • OriginalTotal - this is the total before discounts have applied. This includes basket and costs.
    • Total - this is the current discounted total including basket and costs.
  • LineItem
    • UsedAsMoneyOffCondition (populated by the engine)
    • ListPrice (populated by the engine)
    • DiscountedPrice (populated by the engine)
  • DateTimeContext (populated by the engine)
    • Date
    • Time
    • DateTime
    • DayOfWeek
    • DayOfMonth
    • Month
    • Year
    • DayOfYear

Property Details

Below is a description of each of the fields available on a property:

  • Name - this is used by the engine when evaluating expressions. It needs to match the name passed into the Processor API evaluation endpoint
  • Display Name - just used for display in the tooling
  • Parent - the parent object (if any). This determines where in the hierarchy the property sits. The hierarchy determines the structure of the JSON to pass to the Processor API evaluation endpoint
  • Data Type - the type of the property. This determines the format the value needs to be provided to the Processor API evaluation endpoint (see below for the data types supported).
  • Multivalued - if the property is an array or not

The following data types are supported:

  • String
  • Number
  • Boolean
  • Object
  • DateTime
  • Time
  • Date

Object properties are used to build the property hierarchy. Only Object properties are allowed at the top level (i.e. they have no parent).

Properties can be managed using the Properties Management Tooling as well as the Builder API. See the Properties API Definitions for more details.