Core concepts
Screen, placement, package, publish and screen types, and how the SDK decides which screen a visitor gets.
For short definitions, see the glossary.
The big picture
Your team designs a screen in the dashboard editor and publishes it. A placement is a named slot (upgrade_button) that points at a screen. Your code asks the SDK for the placement by key, and the SDK shows whatever the placement says. You change the screen, test another one or run a promotion without changing your code.
Screen (draft) --publish--> Screen (published version)
|
Placement "upgrade_button" --------+ display, audience, A/B test, schedule
^
| asks for the key
Your website or app + SDKScreen
A screen is one thing a visitor sees. It is stored as JSON in the PaywallData format and rendered by the SDK. You never write that JSON by hand. The API and some pages still call a screen a paywall; they are the same thing.
Screen types
The type only groups templates in the dashboard. All types use the same editor, the same JSON and the same SDK calls.
| Type | Use it for | How your code takes part |
|---|---|---|
| Paywall | Selling plans | Pass products by package ID and run checkout in onPurchase. |
| Upgrade or promotion | Banners, sales, announcements | A Run your code button calls onAction with its action ID. |
| Onboarding | Welcome, goals, setup steps | A flow of linked screens; answers arrive in onAnswer and answers. |
| Survey and feedback | Ratings, NPS, cancel reasons | Same as onboarding. |
| Permission prompt | Explain a request before the system asks | The main button runs your code, which then asks the system. |
| Account moment | Trial ending, payment failed, win-back | onAction or onPurchase. |
A screen that sells nothing needs no purchase button. Every screen needs a way out, so it has a button with the action Close the screen; the SDK adds no close button.
Draft, version and publish
Every screen has a draft (edited, never shown to visitors) and, once published, a published version. Publish runs the editor's checks on the server too, so a broken screen cannot reach your site. Visitors get a new version within about a minute. An earlier version can be made live again. See Publish and versions.
Package
A package is a plan card on a screen. Each has a package ID you choose, such as monthly. Your code passes a price for every package ID, and the SDK fills in the price text. When a visitor taps buy, your onPurchase gets the package ID. See Packages and pricing.
Placement
A placement decides which screen shows in a slot, how it displays, when it shows by itself, and to whom. Its display, trigger, audiences, frequency limit, holdout, A/B test and schedule are explained in Placements. They are not part of the screen's JSON.
Which screen a visitor gets
- A schedule in force replaces the placement's screen and pauses the A/B test.
- If the frequency limit is reached, nothing shows.
- Audiences in order: the first match shows its screen, or nothing.
- Otherwise the placement's screen shows, split between A and B if a test runs.
- A visitor in the holdout sees nothing.
- Otherwise the screen opens and a view is counted.
Flow
A flow is a chain of screens linked by Go to another screen buttons. The placement returns the first screen, so its audience, test and schedule apply to the whole flow. Questions in a flow send answers to your code. See Flows and questions.