Loyalty API

Type

Asset2

Describes an asset in the loyalty program that customers can unlock.

Kind Type
Used in CustomerBalance3, EstimateAccrual1, LoggedOutBalance1, QueryOrderDetails1

Assets represent rewards or achievements that customers can obtain by meeting certain conditions. Once unlocked, an asset may provide rewards such as points or coupons. Each asset can be obtained multiple times if configured as recurring, and each instance of ownership can have its own expiration and usage limits.

Properties

  • bhid bubbleflake required

    Internal Bubblehouse ID of the asset.

  • apiname string optional

    API name for programmatic identification of the asset.

  • slugs array of string required

    Stable, URL-friendly identifier(s)

    You can identify Bubblehouse objects by Bubblehouse ID (20b31881b3010001) or by slug (best-savings). BH ID is stable, but cryptic, and also varies across dev/production environments. Slugs are human-readable and derived from customer-visible titles, but are stable (do not get invalidated as the title changes) and use a restricted URL-friendly character set.

    Bubblehouse generates a slug based on an object's name/title, e.g. an object named "Oh My, Great Milestone!" gets a slug of oh-my-great-milestone. Slugs only contain lowercase latin letters, numbers and dashes. You can see an object's slug in the admin panel.

    Slugs are always unique for a given type of object across their entire history. A numeric suffix like -2 is appended when necessary to make it unique (e.g. great-milestone-2). Bubblehouse keeps a history of slugs that have ever been associated with a given object, and allows using any of them to identify it. So when you rename "Great Milestone" to "Best Savings Month", it gets multiple slugs: ["best-savings-month", "great-milestone"]. The current slug always comes first, followed by older slugs.

    This means that you can manually get a slug from the admin console, put it into your system's configuration, and have your system pass it into Bubblehouse and/or match it against the list of slugs returned by Bubblehouse. This will continue to operate correctly going forward, regardless of any future renames, and across multiple environments.

    Example: ["best-savings-month","great-milestone"]

  • section string optional

    Section name for grouping assets in the UI.

  • title string optional

    Display title of the asset.

  • benefits_desc string optional

    Description of the benefits provided when this asset is unlocked.

  • conditions_desc string optional

    Description of the conditions required to unlock this asset.

  • cta_title string optional

    Call-to-action button title.

  • image Image1 optional

    Image associated with the asset.

  • active integer optional

    Number of currently active ownerships the customer has for this asset.

  • can_obtain boolean optional

    Whether the customer can currently obtain this asset.

  • ownerships array of Ownership2 optional

    List of the customer's ownerships of this asset.

  • available_uses integer optional

    Total number of uses available across all active ownerships.

  • is_available boolean required

    Whether the asset is available to the customer based on visibility and availability rules.

  • can_complete boolean required

    Whether the customer can currently complete (unlock) this asset.

  • is_completed boolean required

    Whether the customer has completed (unlocked) this asset.

  • is_rewarded boolean required

    Whether the customer has been rewarded for this asset.

  • pts integer optional

    Points awarded when unlocking this asset.

  • use_limit integer optional

    Maximum number of times each ownership can be used.

  • validity duration optional

    How long each ownership remains valid after being obtained.

  • max_active_quantity integer optional

    Maximum number of active ownerships allowed at once.

Previous
UseAchievementDiscount1