Facts
A fact is one named value a decision may read, such as user.state or grants.product_ids. A rule, a canvas
entry, a segment and an experiment’s targeting all test facts by their dotted path. The fact registry is the
list of facts your organization’s rules may name. Revenue › Decision Engine › Facts shows it. It is read-only.
Most of the fact registry is EdgeKit’s own, the same for every organization. The rest comes from what your organization declares elsewhere:
| Namespace | Comes from | Trust tier |
|---|---|---|
external.<name> |
The claims your identity provider declares | Attested |
streaming.<pipeline>.<name> |
The streaming inputs your organization declares | EdgeKit |
profile.<name> |
Your profile fields, one fact per field | The weakest fact the field derives |
A rule that names a fact the fact registry does not hold makes staging fail: such a fact would never have a value.
Trust tiers
Section titled “Trust tiers”Every fact has a trust tier, shown as Source on the screen. It says who decides the value, and so how far a rule that opens your content on it can be trusted.
| Tier | Who sets the value | When the value is missing |
|---|---|---|
| EdgeKit | EdgeKit computes it. Nothing a caller sends can move it. | Depends on the fact; see the tables below |
| Signed | Your organization sends it, signed for your site. EdgeKit verifies the signature and never stores the value. | Missing content does not force a deny; a bad supplied signature refuses the request |
| Attested | Your identity provider claims it, in a credential EdgeKit verified. True while the credential is. | Read as absent, never an error |
| Unverified | The caller sends it, and EdgeKit passes it through as it arrived. Anyone can set it. | Read as absent |
Signed facts are the content facts your organization declares. Only a product’s coverage condition names them, so the Facts screen does not list them, and today no decision reads them (see Narrow it with a condition). Open a site from Delivery › Delivery › Sites to see them, in the Configuration section of its screen. See Site settings.
Unverified facts are the context.<name> values a decide request carries in context. They are not in the fact
registry: a rule may name any context.<name>, and staging reports a warning for each one. The browser client’s
context option is the only way a page names the article it is asking about, and anyone who can load the page can
change it. A rule that opens your content on an unverified fact is a way around your own access rules.
When a fact is read
Section titled “When a fact is read”The When column says when EdgeKit reads the value:
- Always loaded: read for every request, before any rule runs.
- Only when asked: fetched only when a rule the request evaluates names it. These are
db_user_org.*,db_user_traits.*,streaming.*andprofile.*. A segment that names one makes every feature naming that segment fetch it.
A fact with no value is handled by its namespace:
streaming.*andprofile.*with no value for this user, or for an anonymous request, are a miss: the condition that reads them does not hold, and nothing errors. A late or lost value never changes an outcome on its own.- A namespace that has no value at all for this request is an error, for example
bot.*on a site with no bot verdict, oritem.*anywhere but a decision about one content item. In the entered canvas, an error answers the canvas’s error outcome when no rule holds.
Who may read what
Section titled “Who may read what”- A feature with the operational purpose may read only facts that EdgeKit computes and always loads. It runs where there is no request to read the rest from.
db_user_org.*may be read only by a feature with the journey purpose.- A feature that reads a
bot.*fact cannot be deployed onto a site that has no bot verdict.
EdgeKit’s facts
Section titled “EdgeKit’s facts”EdgeKit computes every fact below: their trust tier is EdgeKit.
The user, the device and the site
Section titled “The user, the device and the site”| Fact | Type | Value |
|---|---|---|
site.id |
string | The site the request selected. |
user.id |
string | The user the decision is for. Absent when nobody is signed in. |
user.state |
enum | anonymous with nobody signed in, paid for a user with at least one live grant, registered otherwise. |
user.membership_level |
string | The slug of the highest-ranked product among the user’s live grants. Empty with none. |
user.membership_type |
string | How that same grant was sold, as its offer declares. _comped when the grant names no offer. |
device.token |
string | The device cookie EdgeKit Analytics sets on your domain. Empty when the request carries none. |
user_site.source |
string | How the user arrived on this site: signup, import, api, invitation or newsletter. |
user_site.status |
string | The user’s standing on this site: active or blocked. |
grants.site_ids |
list of strings | The sites the user’s live grants reach. |
grants.product_ids |
list of strings | The products of the user’s live grants. |
grants.expires_in_days |
number | Whole days left on the user’s longest live grant. 36500 for a grant with no end, 0 with none. |
paid means a live grant, not a payment: a comped, gifted or group grant counts the same as a purchase.
When the user is not attached to the site, or nobody is signed in, user_site.source is organic and
user_site.status is active.
The request
Section titled “The request”| Fact | Type | Value |
|---|---|---|
request.geo |
string | The country of the connection that reached EdgeKit. Behind your own server or proxy, that is its country. |
request.new_device |
boolean | true when the request carries no device cookie. |
request.preview |
boolean | true only on a request that carries a valid preview token. |
Gift links
Section titled “Gift links”gift_link.present, gift_link.valid, gift_link.id, gift_link.source and gift_link.covers_content describe
the gift link the request carries. An invalid, forged or expired gift link reads as no gift link, never an error. See
EdgeKit Paywall.
Group membership and traits, fetched when asked
Section titled “Group membership and traits, fetched when asked”| Fact | Type | Value |
|---|---|---|
db_user_org.source |
enum | How the user joined their user organization: invitation, domain_auto_join, billing_sync or api. |
db_user_org.joined_hours_ago |
number | Hours since they joined. |
db_user_traits.complete |
boolean | true when the user has a value for every enabled, required trait, or none is required. |
Only a feature with the journey purpose may read db_user_org.*.
db_user_traits.complete is read on requests from your server with an API key and on journey redirects. A browser
decide request does not fetch it, so a rule that reads it there answers an error. It follows your current trait
settings, not the deployed document. See The one exception: traits.
Bot verdict
Section titled “Bot verdict”bot.verified (boolean), bot.category (enum) and bot.score (number, 1 to 99) describe the request, never the
requester, who is a device like any other. They exist only on a site with a bot verdict; reading one anywhere else is
an error. A request with no score reads bot.score as absent, and a test that bot.score is under 30 also holds
for it. Pair that test with one that bot.score is present, in the same rule.
Content items
Section titled “Content items”item.* facts describe one content item: its source id, sections, tags, content type and subtype, authors,
publication time and language. They have a value only when EdgeKit decides about one content item, and are an error
everywhere else.
The Facts screen
Section titled “The Facts screen”Revenue › Decision Engine › Facts has one row per fact:
- Fact: the path, and what it means.
- Type:
string,number,boolean,date,string[]orenum. - Source: the trust tier: EdgeKit, Signed, Attested or Unverified.
- When: always loaded or only when asked.
- Values: the legal values of an
enum, or any value of the type. - Read by: the features that name the fact, or no feature asks.
Narrow the list by Source, Type, When and Read, search by path, meaning or value, and sort by path, type or read by. The list follows the draft, so a fact you declare appears here before you deploy it.