Loyalty API

Source2

Describes a tier defined by the shop.

Properties

  • bhidbubbleflakerequired

    Internal Bubblehouse ID of the point source.

  • slugsarray of stringrequired

    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"]

  • titlestringrequired

    The title of the source.

  • can_completebooleanrequired

    Indicates whether the source can be acted upon in order to make it completed. I.e. it is available, visible, and has not been completed so far.

  • is_completedbooleanrequired

    Indicates whether the source should be displayed as completed.

  • is_rewardedbooleanrequired

    Indicates whether the source has been rewarded.

    Normally, ways to earn are rewarded upon completion. However, there are cases where a given way to earn might be deemed completed, but ineligible for rewards; examples include “create an account” way to earn with pre-existing accounts, and “provide your birthday” way to earn in case the customer has already provided their birthday before the launch of the loyalty program.

Previous
UpdateResult1