Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 3.61 KB

File metadata and controls

64 lines (48 loc) · 3.61 KB

PromotionBlock

Describes a part of the logic of the rule.

Properties

Name Type Description Notes
id String Unique identifier for this block.
type String Identifies the block variant and determines which additional properties are present in it.
tags List<String> Semantic labels attached to this block. [optional]
operator OperatorEnum The update operation applied to the attribute.
blocks List<PromotionBlock> Child blocks evaluated according to the operator.
onFailure List<PromotionBlock> Promotion blocks evaluated when this block fails or returns false. [optional]
onError Map<String, List<PromotionBlock>> Named error handlers evaluated when a specific error occurs. [optional]
expression List<Object> The raw Talang expression as an array. For a function call, the first element is the function name and subsequent elements are its arguments. For any other expression (for example a bare attribute path or a literal value), this is a single-element array containing that value.
notificationType String The type of notification to display.
title String The notification heading shown to the customer.
body String The notification body text. Supports template placeholders (e.g. &quot;{{$Session.Total}}&quot;) evaluated at rule execution time. [optional]
sku String The stock keeping unit of the item to award.
name String The display name of the item to award.
quantity String The number of items to award. Supports template placeholders (e.g. &quot;{{$Session.Total / 2}}&quot;) for dynamic quantities.
partial Boolean When set to `true`, applies a partial item reward if the remaining budget is insufficient to award the full reward. [optional]
giveawayPool AwardGiveawayBlock1GiveawayPool
profile ProfileEnum The customer profile to add or remove from the audience. `Current` targets the customer in the current session; `Advocate` targets the person who invited their friend via referral program.
attribute UpdateAttributeValueBlock1Attribute
value Object
min Object [optional]
max Object [optional]
values Object [optional]
count Object [optional]
audience UpdateAudienceMembershipBlock1Audience
redeem Boolean When `true`, the referral code is redeemed.
achievement UpdateAchievementProgressBlock1Achievement
target UpdateAttributeValueBlock1Target

Enum: OperatorEnum

Name Value
SET_TO "setTo"
INCREASE_BY "increaseBy"
DECREASE_BY "decreaseBy"
MULTIPLY_BY "multiplyBy"
DIVIDE_BY "divideBy"
TOGGLE "toggle"
LATER_BY "laterBy"
EARLIER_BY "earlierBy"

Enum: ProfileEnum

Name Value
CURRENT "Current"
ADVOCATE "Advocate"