Skip to main content

OrderIncentiveInput

An incentive rule that applied to the order.

What the rule did and the parameters it ran with, as recorded when the order was calculated. Item discounts the rule gave are also stored as separate order lines of class incentive.

input OrderIncentiveInput {
businessRuleId: String
name: String
action: String!
affectedOrderItemUuids: [String!]
params: OrderIncentiveParamsInput!
}

Fields​

OrderIncentiveInput.businessRuleId ● String scalar​

Identifier of the incentive business rule that applied.

Null when the rule's identifier was not recorded. A rule whose decision table matched more than one row can appear more than once.

OrderIncentiveInput.name ● String scalar​

Name of the incentive, as configured in the rule.

OrderIncentiveInput.action ● String! non-null scalar​

What the incentive did, for example GIVE_DISCOUNT_TO_ORDER_ITEM or ADD_PRODUCT_TO_BONUS_ITEMS.

A plain string rather than an enum, because an order keeps the action it was placed with even after that action is retired.

OrderIncentiveInput.affectedOrderItemUuids ● [String!] list scalar​

UUIDs of the order lines the rule's conditions matched.

Null when the rule has no item conditions, so the whole order qualified. An empty list when the rule's item conditions matched no lines. For GIVE_DISCOUNT_TO_CHEAPEST_ITEM only one of the listed lines carries the discount.

OrderIncentiveInput.params ● OrderIncentiveParamsInput! non-null input​

The parameters the incentive ran with.

Member Of​

OrderCreateInput input ● OrderUpdateInput input