Loyalty API

Type

Change2

Represents a change in the loyalty data.

Kind Type
Used in CustomerHistory2

Properties

  • id bubbleflake required

    Unique ID of the change in the Bubblehouse system.

  • area ChangeArea1 required

    An enum defining the shape of the change object (ie which other fields are relevant)

    You MUST ignore the changes with area values that you do not know how to handle. New areas can be introduced without notice, and undocumented areas may be returned.

  • type ChangeType1 required

    Determines the exact change that has occurred

    You MUST handle types that you do not know how to handle. Either ignore them, or fallback to the generic properties defined by the area.

  • desc string required

    A user-visible description of the change, suitable for a history page

  • customer_bhid bubbleflake required

    A Bubblehouse ID of the customer this change is for.

  • customer_shopid string required but can be empty

    An online shop ID of the customer this change is for, an empty string if unknown.

    Note that in some edge cases involving imports and integrations, the customer in Bubblehouse database might not have an associated account in the online shop, so this field might be empty. You can fall back to a Bubblehouse ID when identifying these customers, or simply ignore the corresponding changes.

  • customer_email string required but can be empty

    The email address of the customer this change is for, an empty string if unknown.

  • order_shopid string optional

    Shop ID of the order that has caused this change.

  • order_short string optional

    Short name of the order (typically assigned by the online shop) that has caused this change.

  • hidden boolean optional

    Whether this change should be hidden from the user-visible change history.

  • pts_delta integer required when area = points, ignore otherwise

    The change in loyalty points (positive values correspond to earned points, negative values correspond to spent or lost points).

    Note that some changes (like redemptions) will always have negative values here.

  • amount monetary optional when area = points, ignore otherwise

    The monetary amount corresponding to the loyalty points. A non-negative number.

    This field is only filled in for some redemption changes.

  • discount_code string optional when area = points, ignore otherwise

    An online shop discount code that corresponds to this change.

  • redemption_status RedemptionStatus1 optional when area = points, ignore otherwise

    Whether the discount code (or another benefit requiring multiple steps to redeem) has been successfully redeemed.

  • old_tier string required when area = tier, ignore otherwise

    The name of the customer's old tier, may be an empty string.

  • new_tier string required when area = tier, ignore otherwise

    The name of the customer's new tier, may be an empty string.

  • old_cycle_count integer required when area = milestone, ignore otherwise

    The previous number of active subscription cycles the customer has been considered to have. 0 means not subscribed.

  • new_cycle_count integer required when area = milestone, ignore otherwise

    The new number of active subscription cycles the customer is considered to have. 0 means not subscribed.

Previous
AvailableReward1