Skip to content

Set up a product

A product is an access set: what a grant lets someone read or do. It carries no price. Offers sell it, so create the product first.

You need the catalog write permission (the Owner, Admin and Developer roles). Every change here edits the draft and reaches requests after the next deploy, except a product’s sites, slug and rank, which decisions read as soon as you save them.

  1. Open Revenue › Catalog › Products and select New product.
  2. Fill in the form:
    • Name: what staff call it, up to 200 characters.
    • Slug: lowercase letters, digits and hyphens, up to 128 characters. The product’s id is made from it when you create the product: prd_, then the slug with each run of hyphens replaced by _ and trailing hyphens dropped. professional-membership becomes prd_professional_membership. The id never changes. Two products cannot share an id.
    • Description: optional, up to 2,000 characters. Staff-facing.
    • Kind: content for access to content, or capability for a product that only confers rights such as job posts. The catalog lists and filters by kind.
    • Rank: a whole number from -1,000,000 to 1,000,000. When a user holds grants for several products, the one with the highest rank is the user’s membership: decisions read its slug as user.membership_level. Rank decides nothing about access.
    • Status: active or archived.
    • Sites: the sites the product covers. You may leave it empty, but a product with no site covers nothing.
  3. Select Create. The product opens for editing.

The product’s screen has three sections: Product, Coverage and Capabilities.

In Coverage — sites, tick the sites the product reaches and save. A grant for the product gives access on every site ticked here. Changing the list changes it for everyone who already holds the product; no grant is rewritten.

The sites apply without a deploy: grants.site_ids in decisions and GET /v1/grants read them as saved, and so do user.membership_level for the slug and rank. A browser sees the change the next time its access cookie is refreshed. See Grants are as fresh as the access cookie.

By default a product covers the whole of each of its sites. Coverage — condition narrows that to the pages whose content facts match. Leave it empty to cover the whole site.

A condition reads content facts only: the content.* facts in the signed content descriptor your server sends for the page. It cannot read user facts, meters, segments or experiments; those belong in a feature’s rules.

Today no decision reads a product’s condition. A grant for the product reads the same on every page of its sites, whatever the condition says, and no rule can test a content fact (see What a rule can read). The console checks and deploys a condition, and it changes no answer.

The condition is JSON. The fact names below are examples; use the ones your organization declares. A field condition compares one content fact:

{
"type": "field",
"field": "content.section",
"op": "in",
"value": ["news", "opinion"]
}

A group combines conditions with all, any or none:

{
"type": "group",
"op": "all",
"conditions": [
{
"type": "field",
"field": "content.section",
"op": "eq",
"value": "news"
},
{
"type": "field",
"field": "content.subscriber_only",
"op": "eq",
"value": true
}
]
}
Operator Value
eq, ne, lt, lte, gt, gte One value
has, not_has, contains One value
in, nin A list of 1 to 200 values
exists None

Saving refuses a condition that:

  • names a field outside content.*, or a content fact your organization does not declare;
  • has more than 64 conditions in total, or nests more than 5 levels deep;
  • uses an operator not in the table, or gives an operator the wrong kind of value.

Your organization’s declared content facts are listed under Configuration › Schemas › Content facts on each site’s screen in Delivery › Delivery › Sites. If it declares none, every product’s condition must stay empty.

In Capabilities, tick each capability the product confers and save. A capability must exist in Revenue › Catalog › Capabilities before you can tick it. See Register a capability.

Set Status to archived in the Product section and save. Archiving revokes nothing: every grant for the product keeps working, on the same sites. Checkout does not read a product’s status, so archiving a product does not stop its offers selling. To stop sales, archive each offer or clear its Purchasable box. See Create and sell an offer.

The console cannot delete a product.

The list shows each product’s Product, Kind, Rank, Sites, Coverage, Capabilities and Offers. Filter by kind, by whether it covers a site, by whether it has offers and by whether it confers a capability. Search by name or slug, and sort by name, rank, sites or offers.

Nobody can buy a product that covers no site or has no offer.

Deploy from Delivery › Deployments › Versions. See Stage and deploy a change.