Loyalty API
MilestoneStatus3
Describes a milestone defined by the shop.
Properties
Internal Bubblehouse ID of the milestone.
slugs
array of stringrequiredStable, 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"]
name
stringrequiredThe name of the milestone.
cycle
integerrequired for cycle-based milestonesThe number of subscription cycle orders the customer needs to be active for to get the benefits associated with this milestone.