picked 0.0.111-next.2 → 0.0.111-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/docs/explanation/app-authentication.md +178 -0
  3. package/docs/explanation/apps.md +169 -0
  4. package/docs/explanation/conditions-and-the-logic-engine.md +12 -2
  5. package/docs/explanation/feature-flag-allocation.md +5 -3
  6. package/docs/how-to/apps/add-a-page-to-the-dashboard.md +257 -0
  7. package/docs/how-to/apps/add-a-workflow-tool.md +199 -0
  8. package/docs/how-to/apps/add-an-mcp-server-to-an-app.md +210 -0
  9. package/docs/how-to/apps/connect-a-third-party-service-with-oauth.md +307 -0
  10. package/docs/how-to/apps/create-an-app-in-the-dashboard.md +162 -0
  11. package/docs/how-to/apps/deploy-an-app.md +201 -0
  12. package/docs/how-to/apps/develop-an-app-locally.md +152 -0
  13. package/docs/how-to/apps/host-an-app-on-vercel.md +226 -0
  14. package/docs/how-to/apps/install-an-app.md +116 -0
  15. package/docs/how-to/apps/link-to-an-installation-from-your-site.md +134 -0
  16. package/docs/how-to/apps/read-project-data-from-an-app.md +225 -0
  17. package/docs/how-to/apps/rotate-an-app-key.md +130 -0
  18. package/docs/how-to/apps/run-code-when-a-workspace-publishes.md +148 -0
  19. package/docs/how-to/apps/store-data-for-an-installation.md +230 -0
  20. package/docs/how-to/apps/test-an-app.md +359 -0
  21. package/docs/how-to/apps/upgrade-or-uninstall-an-app.md +97 -0
  22. package/docs/how-to/apps/use-an-app-tool-in-a-workflow.md +112 -0
  23. package/docs/index.md +6 -3
  24. package/docs/reference/apps/app-kit.md +811 -0
  25. package/docs/reference/apps/environment.md +116 -0
  26. package/docs/reference/apps/manifest.md +311 -0
  27. package/docs/reference/apps/protocol.md +497 -0
  28. package/docs/reference/dashboard/apps.md +504 -0
  29. package/docs/reference/dashboard/external-apis.md +5 -0
  30. package/docs/reference/dashboard/features.mdx +5 -5
  31. package/docs/reference/dashboard/labels.md +25 -8
  32. package/docs/reference/dashboard/lead-search.md +6 -6
  33. package/docs/reference/dashboard/reports.mdx +13 -5
  34. package/docs/reference/dashboard/workflow-tools.md +14 -0
  35. package/docs/reference/glossary.md +153 -140
  36. package/docs/reference/management-api/authentication.md +36 -27
  37. package/docs/reference/management-api/authorization-and-scopes.md +73 -21
  38. package/docs/reference/management-api/schema/api-key.md +10 -10
  39. package/docs/reference/management-api/schema/app.md +726 -0
  40. package/docs/reference/management-api/schema/auth.md +7 -7
  41. package/docs/reference/management-api/schema/common.md +54 -35
  42. package/docs/reference/management-api/schema/feature.md +1 -1
  43. package/docs/reference/management-api/schema/feedback.md +1 -1
  44. package/docs/reference/management-api/schema/index.md +35 -20
  45. package/docs/reference/management-api/schema/label.md +31 -8
  46. package/docs/reference/management-api/schema/organization.md +66 -66
  47. package/docs/reference/management-api/schema/project.md +5 -5
  48. package/docs/reference/management-api/schema/report.md +1 -1
  49. package/docs/reference/management-api/schema/shopify.md +19 -19
  50. package/docs/reference/management-api/schema/tenant-branding.md +16 -0
  51. package/docs/reference/management-api/schema/workflow.md +6 -1
  52. package/docs/reference/management-api/schema/workspace.md +2 -2
  53. package/docs/reference/sdk/analytics-events.md +42 -36
  54. package/docs/reference/sdk/conditions.md +3 -3
  55. package/docs/reference/sdk/fields.md +5 -4
  56. package/docs/reference/sdk/index.md +4 -4
  57. package/docs/reference/sdk/plugins/create-experience.md +11 -9
  58. package/docs/reference/sdk/plugins/hotjar.md +2 -2
  59. package/docs/reference/sdk/plugins/sentry.md +2 -2
  60. package/docs/reference/sdk/plugins/shopify.md +2 -2
  61. package/docs/reference/sdk/predicates.md +5 -5
  62. package/docs/reference/sdk/ssr/index.md +4 -3
  63. package/docs/reference/sdk/ssr/rendering-and-hydration.md +30 -0
  64. package/docs/reference/sdk/type-generation.md +24 -19
  65. package/docs/reference/tools/admin-api-client.md +15 -0
  66. package/docs/reference/tools/cli.md +192 -41
  67. package/docs/reference/tools/mcp.md +30 -9
  68. package/docs/tutorials/first-app.md +308 -0
  69. package/package.json +4 -4
  70. package/docs/explanation/how-pickedql-works.md +0 -76
  71. package/docs/how-to/analytics/index.md +0 -324
  72. package/docs/reference/management-api/schema/analytics.md +0 -75
  73. package/docs/reference/pickedql/data-sources.md +0 -174
  74. package/docs/reference/pickedql/dimensions.md +0 -103
  75. package/docs/reference/pickedql/filtering.md +0 -64
  76. package/docs/reference/pickedql/index.md +0 -18
  77. package/docs/reference/pickedql/schema.md +0 -172
  78. package/docs/reference/pickedql/virtual-functions.md +0 -248
@@ -7,8 +7,10 @@ import { Screenshot } from '../../../../components/Screenshot'
7
7
 
8
8
  # Reports
9
9
 
10
- A report is an embedded Metabase dashboard or question, attached to a Picked project. Use
11
- a report to see how your visitors move through your experiences and your feature flags.
10
+ A report is a dashboard or a question from Picked Analytics that the Picked dashboard shows in
11
+ a project. Picked Analytics runs on Metabase, so two report options have Metabase in their
12
+ names. Use a report to see how your visitors move through your experiences and your feature
13
+ flags.
12
14
 
13
15
  <Screenshot
14
16
  route="/{orgSlug}/{projectId}/reports"
@@ -22,9 +24,15 @@ a report to see how your visitors move through your experiences and your feature
22
24
  | **Report name** | The name that the reports list shows. |
23
25
  | **Description** | An optional note about what the report shows. |
24
26
  | **Metabase report type** | `Dashboard` or `Question`. |
25
- | **Metabase report ID** | The numeric ID from the Metabase URL. |
27
+ | **Metabase Report ID** | The numeric ID in the URL of the dashboard or question in Picked Analytics. |
26
28
  | **Display order** | Optional. It controls the position of the report in the list. |
27
29
 
30
+ The form gives no parameter a value. To show only the data of the project, set
31
+ `lockedParameters` with [`reportCreate`](/reference/management-api/schema/report#reportcreate)
32
+ or [`reportUpdate`](/reference/management-api/schema/report#reportupdate). Give the name of
33
+ each parameter and its value, for example the `project_id` parameter and the ID of the
34
+ project.
35
+
28
36
  The create form has a link that opens the report, so you can check that the ID is
29
37
  correct before you save.
30
38
 
@@ -49,5 +57,5 @@ You can also do this task with the [Management API](/reference/management-api/sc
49
57
 
50
58
  ## Related
51
59
 
52
- - [Analytics queries](/how-to/analytics) — query the same data with SQL.
53
- - [About PickedQL](/explanation/how-pickedql-works) — what the query layer expands.
60
+ - [`list_analytics_reports`](/reference/tools/mcp#list_analytics_reports) — read the reports of a project from an AI tool.
61
+ - [Analytics events](/reference/sdk/analytics-events) — the events that the reports show.
@@ -79,6 +79,20 @@ the [labels reference](/reference/dashboard/labels#tools).
79
79
  For the arguments of **External API** and how to register an API, refer to
80
80
  [Call an external API from a workflow](/how-to/call-an-external-api-from-a-workflow).
81
81
 
82
+ ## App tools
83
+
84
+ An [app](/explanation/apps) that is installed on the project adds its own tools. Each tool has
85
+ the name `app.<installation slug>.<tool>`, for example `app.zoho-crm.create_lead`. The
86
+ manifest of the app gives the arguments, the output and the effect of each tool. Refer to
87
+ [Workflow tools in the manifest](/reference/apps/manifest#workflow-tools).
88
+
89
+ A tool with the effect `write` is a tool that writes. In a test run, it runs only when
90
+ **Execute writes** is on. Refer to
91
+ [Execute writes](/reference/dashboard/workflow-test-runs#execute-writes).
92
+
93
+ To add a tool of an app to a workflow, refer to
94
+ [How to use an app tool in a workflow](/how-to/apps/use-an-app-tool-in-a-workflow).
95
+
82
96
  ## Action responses
83
97
 
84
98
  For **Action response**, refer to
@@ -11,144 +11,155 @@ documentation uses, and it names the others.
11
11
 
12
12
  ## Accounts and access
13
13
 
14
- | Term | What it is |
15
- | --- | --- |
16
- | **Organization** | The top level. It holds your projects, your members, and your settings. You can belong to more than one. |
17
- | **Member** | A person in an organization. Each member holds one role. |
18
- | **Role** | What a member can reach. It decides whether a member can create a project, edit an experience, or read a report. |
19
- | **API key** | A credential for a server-to-server integration. It belongs to an organization, it can belong to one project, and it carries scopes. |
20
- | **Scope** | One permission, written `resource/action`, such as `organization/read`. A scope decides which operations a caller can do. |
21
- | **Session** | The result of a sign-in. It holds an access token, a refresh token, and the time at which the access token expires. |
22
- | **User** | A person who signs in to the Picked dashboard. A user is not a visitor. |
23
- | **Invitation** | An offer to join an organization, sent to an email address. It waits until the person accepts it. |
24
- | **MFA factor** | A second credential on an account, such as a telephone number. |
14
+ | Term | What it is |
15
+ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | **Organization** | The top level. It holds your projects, your members, and your settings. You can belong to more than one. |
17
+ | **Member** | A person in an organization. Each member holds one role. |
18
+ | **Role** | What a member can reach. It decides whether a member can create a project, edit an experience, or read a report. |
19
+ | **API key** | A credential for a server-to-server integration. It belongs to an organization, it can belong to one project, and it carries scopes. |
20
+ | **Scope** | One permission, written `resource/action`, such as `organization/read`. A scope decides which operations a caller can do. |
21
+ | **Session** | The result of a sign-in. It holds an access token, a refresh token, and the time at which the access token expires. |
22
+ | **User** | A person who signs in to the Picked dashboard. A user is not a visitor. |
23
+ | **Invitation** | An offer to join an organization, sent to an email address. It waits until the person accepts it. |
24
+ | **MFA factor** | A second credential on an account: an authenticator app that makes a new one-time code at a fixed interval. The only `MfaFactorType` in the API is `TOTP`. |
25
25
 
26
26
  ## Projects and versions
27
27
 
28
- | Term | What it is |
29
- | --- | --- |
30
- | **Project** | One site or one application. Each project has its own experiences, content, and configuration. |
28
+ | Term | What it is |
29
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
30
+ | **Project** | One site or one application. Each project has its own experiences, content, and configuration. |
31
31
  | **Project configuration** | The published settings of a project: its experiences and steps, and the content link on each step. The Delivery API serves it, and the SDK reads it. The SDK parameter is `projectConfig`. |
32
- | **Workspace** | One version of the configuration of a project. You hold a change in a workspace, see a preview of it, and publish it. |
33
- | **Draft** | A workspace that no visitor sees. |
34
- | **Live** | The workspace whose snapshot the SDK serves. Each project has exactly one. |
35
- | **Archived** | A draft that you put to one side. It is still editable, and it is out of the default list. |
36
- | **Version** | An immutable snapshot of a workspace, made when you publish. The **Publish history** page lists them. |
37
- | **Preview** | A view of an unpublished workspace on your own site. It reaches your browser only. |
38
- | **Preview environment** | A named target that a preview opens against. |
39
- | **Project settings** | The settings of one project, which you edit in the dashboard. These are not the project configuration that the Delivery API serves. |
32
+ | **Workspace** | One version of the configuration of a project. You hold a change in a workspace, see a preview of it, and publish it. |
33
+ | **Draft** | A workspace that no visitor sees. |
34
+ | **Live** | The workspace whose snapshot the SDK serves. Each project has exactly one. |
35
+ | **Archived** | A draft that you put to one side. It is still editable, and it is out of the default list. |
36
+ | **Workspace version** | An immutable snapshot of a workspace, made when you publish. The API type is `WorkspaceVersion`. The **Publish history** page lists them. |
37
+ | **Preview** | A view of an unpublished workspace on your own site. It reaches your browser only. |
38
+ | **Preview environment** | A named target that a preview opens against. |
39
+ | **Project settings** | The settings of one project, which you edit in the dashboard. These are not the project configuration that the Delivery API serves. |
40
40
 
41
41
  ## Experiences
42
42
 
43
- | Term | What it is |
44
- | --- | --- |
45
- | **Experience** | Personalized content that Picked serves to a visitor. It is a Flow or a Page. |
46
- | **Flow** | An interactive experience of more than one step, which the browser renders. |
47
- | **Page** | A standalone experience that your server renders from a content entry, for content that a search engine must read. |
48
- | **Step** | One screen that a visitor sees. It holds fields. |
49
- | **Field** | A data input inside a step. It collects a name, an email address, a preference, or a choice. |
50
- | **Field option** | One choice in a field that has a fixed set of choices. Each option carries a value, and it can carry a condition. |
51
- | **Action** | A side effect that starts when the flow reaches it. Your application registers a handler for it. |
52
- | **Condition** | A rule that decides whether a visitor sees something, or which branch a flow takes. |
53
- | **Predicate** | A function that you register on the client, so a condition can read data that only your application holds. |
54
- | **Response** | A value that a visitor sends through a field. |
55
- | **Origin** | The node where every flow starts. |
56
- | **Node** | One part of a flow on the canvas: an origin, a step, an action, or a condition. |
57
- | **Handle** | A connection point on a node. An input handle is on the left, an output handle on the right. |
58
- | **Key** | The stable identifier of a step, a field, an action, or a condition. Your application and your API calls both use it. You set it one time, and you cannot change it. |
59
- | **Layout name** | The name of the component that renders a step, such as `card` or `modal`. |
60
- | **Target** | The element that an experience renders against, found by its target selector. |
43
+ | Term | What it is |
44
+ | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
45
+ | **Experience** | Personalized content that Picked serves to a visitor. It is a Flow or a Page. |
46
+ | **Flow** | An interactive experience of more than one step, which the browser renders. |
47
+ | **Page** | A standalone experience that your server renders from a content entry, for content that a search engine must read. |
48
+ | **Step** | One screen that a visitor sees. It holds fields. |
49
+ | **Field** | A data input inside a step. It collects a name, an email address, a preference, or a choice. |
50
+ | **Field option** | One choice in a field that has a fixed set of choices. Each option carries a value, and it can carry a condition. |
51
+ | **Action** | A side effect that starts when the flow reaches it. Your application registers a handler for it. |
52
+ | **Condition** | A rule that decides whether a visitor sees something, or which branch a flow takes. |
53
+ | **Predicate** | A function that you register on the client, so a condition can read data that only your application holds. |
54
+ | **Response** | A value that a visitor gives in a field, held under the key of the field. A lead holds the responses that a visitor gave to a flow. The API type is `LeadResponse`. |
55
+ | **Origin** | The node where every flow starts. |
56
+ | **Node** | One part of a flow on the canvas: an origin, a step, an action, or a condition. |
57
+ | **Handle** | A connection point on a node. An input handle is on the left, an output handle on the right. |
58
+ | **Key** | The stable identifier of a step, a field, an action, or a condition. Your application and your API calls both use it. You set it one time, and you cannot change it. |
59
+ | **Layout name** | The name of the component that renders a step, such as `card` or `modal`. |
60
+ | **Target** | The element that an experience renders against, found by its target selector. |
61
61
 
62
62
  ## Feature flags
63
63
 
64
- | Term | What it is |
65
- | --- | --- |
66
- | **Feature flag** | A control that decides which visitors see a change, so you can run an A/B test or release in stages. The API type is `Feature`. |
67
- | **Weight** | The percentage of visitors that Picked allocates to a feature flag, from 0 to 100. |
68
- | **Allocation** | The act that puts a visitor in a feature flag. It happens when something first reads the bucket. |
69
- | **Bucket** | The value a feature flag resolves to for one visitor. |
70
- | **Exposure** | The moment a visitor enters a test. It is the same moment as the allocation. |
71
- | **Version** | A number on a feature flag that forms part of the cache key. It is not part of the allocation. |
64
+ | Term | What it is |
65
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
66
+ | **Feature flag** | A control that decides which visitors see a change, so you can run an A/B test or release in stages. The API type is `Feature`. |
67
+ | **Weight** | The percentage of visitors that a feature flag puts outside its control group, from 0 to 100. A Text feature flag gets it from the weights of its variants. |
68
+ | **Allocation** | The act that puts a visitor in a feature flag. It happens when something first reads the bucket. |
69
+ | **Bucket** | The value a feature flag resolves to for one visitor. |
70
+ | **Exposure** | The moment a visitor enters a test. It is the same moment as the allocation. |
71
+ | **Feature flag version** | A number on a feature flag that forms part of the cache key. It is not part of the allocation. The API field is `Feature.version`. Analytics events send it in `ab_key` as `v` and the number, such as `v4`. |
72
72
 
73
73
  ## Content
74
74
 
75
- | Term | What it is |
76
- | --- | --- |
77
- | **Model** | A reusable schema that sets which fields a piece of content can hold. The API type is `ContentModel`. The dashboard lists them under **CMS**, at **Models**. |
78
- | **Block** | A reusable schema fragment that you put inside one or more Models. The API type is `ContentBlock`. The dashboard lists them under **CMS**, at **Blocks**. |
79
- | **Content entry** | One instance of a Model, filled with real values. The dashboard lists them under **CMS**, at **Content entries**. |
80
- | **Category** | The role of a Model or a Block. It is fixed when you create the record. |
81
- | **Page layout** | A Model with the Page layout category. It sets which fields a Page can hold. |
82
- | **Step layout** | A Model with the Step layout category. It sets which fields one Step inside a Flow can hold. |
83
- | **Section** | A Block with the Section category. A **Page Sections** field accepts it. |
84
- | **General content** | A Model or a Block with no category. It has no layout role, and nothing renders its entries directly. |
85
- | **Reference** | A field that points one content entry at another. The pointer holds the id of the target, and not a copy of it. |
86
- | **Target Model** | The Model whose entries a Reference field accepts. It holds a Key. **Any Model** sets no limit. |
87
- | **Entry title** | The name that the entries list shows. It is the first single-line text field of the entry, and it falls back to the entry id. |
88
- | **Asset** | A file that your content points at: an image, a video, a document, or HTML. |
89
- | **Asset library** | The project-level store that holds your assets. |
90
- | **Design system** | A set of shared design decisions for a project. |
91
- | **Content schema** | The set of fields that a Model or a Block defines. |
92
- | **Asset version** | One file that somebody uploaded for an asset. The library keeps the earlier versions. |
93
- | **Validation error** | A report that one field in a content entry does not match its schema. It carries the path to the exact field. |
75
+ | Term | What it is |
76
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
77
+ | **Model** | A reusable schema that sets which fields a piece of content can hold. The API type is `ContentModel`. The dashboard lists them under **CMS**, at **Models**. |
78
+ | **Block** | A reusable schema fragment that you put inside one or more Models. The API type is `ContentBlock`. The dashboard lists them under **CMS**, at **Blocks**. |
79
+ | **Content entry** | One instance of a Model, filled with real values. The dashboard lists them under **CMS**, at **Content entries**. |
80
+ | **Category** | The role of a Model or a Block. It is fixed when you create the record. |
81
+ | **Page layout** | A Model with the Page layout category. It sets which fields a Page can hold. |
82
+ | **Step layout** | A Model with the Step layout category. It sets which fields one Step inside a Flow can hold. |
83
+ | **Section** | A Block with the Section category. A **Page Sections** field accepts it. |
84
+ | **General content** | A Model or a Block with no category. It has no layout role, and nothing renders its entries directly. |
85
+ | **Reference** | A field that points one content entry at another. The pointer holds the id of the target, and not a copy of it. |
86
+ | **Target Model** | The Model whose entries a Reference field accepts. It holds a Key. **Any Model** sets no limit. |
87
+ | **Entry title** | The name that the entries list shows. It is the first single-line text field of the entry, and it falls back to the entry id. |
88
+ | **Asset** | A file that your content points at: an image, a video, a document, or HTML. |
89
+ | **Asset library** | The project-level store that holds your assets. |
90
+ | **Design system** | A set of shared design decisions for a project. |
91
+ | **Content schema** | The set of fields that a Model or a Block defines. |
92
+ | **Asset version** | One file that somebody uploaded for an asset. The library keeps the earlier versions. |
93
+ | **Validation error** | A report that one field in a content entry does not match its schema. It carries the path to the exact field. |
94
94
 
95
95
  ## Leads
96
96
 
97
- | Term | What it is |
98
- | --- | --- |
99
- | **Lead** | One set of answers that a visitor gave to a flow. It belongs to the project, and it stays after you publish a new version. Refer to [Leads](/reference/dashboard/leads). |
100
- | **Response** | One answer in a lead, held under the key of the field that asked for it. |
101
- | **Label** | A name and a value that you or a workflow puts on a lead, a project or a workflow run. A label on a lead sits outside the answers, and it stays when you change your fields. A label can expire. Refer to [Labels](/reference/dashboard/labels). |
102
- | **Label owner** | The lead, the project or the workflow run that has a label. The owner sets the scopes that read and write the label. |
103
- | **Namespace** | The first part of the name of a label, which groups related keys, such as `details` in `details.phone`. |
104
- | **Label type** | How to read the value of a label: text, number, boolean, or JSON. |
105
- | **Visit** | The events one visitor made in one session. The API calls it `session`. |
106
- | **Capture event** | The analytics event that recorded the capture of a lead. |
97
+ | Term | What it is |
98
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
99
+ | **Lead** | One set of answers that a visitor gave to a flow. It belongs to the project, and it stays after you publish a new version. Refer to [Leads](/reference/dashboard/leads). |
100
+ | **Label** | A name and a value that you or a workflow puts on a lead, a project or a workflow run. A label on a lead sits outside the answers, and it stays when you change your fields. A label can expire. Refer to [Labels](/reference/dashboard/labels). |
101
+ | **Label owner** | The lead, the project or the workflow run that has a label. The owner sets the scopes that read and write the label. |
102
+ | **Namespace** | The first part of the name of a label, which groups related keys, such as `details` in `details.phone`. |
103
+ | **Label type** | How to read the value of a label: text, number, boolean, or JSON. |
104
+ | **Visit** | The analytics events of one visitor on a site, from the first event until 30 minutes pass without another event. The API type is `AnalyticsSession`. `Lead.session` gives the visit in which the visitor gave a lead. |
105
+ | **Capture event** | The analytics event that records the capture of a lead. For a lead that Picked captures, it is a `lead_created` event, which the Picked API sends. |
107
106
 
108
107
  ## Workflows
109
108
 
110
- | Term | What it is |
111
- | --- | --- |
109
+ | Term | What it is |
110
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
112
111
  | **Workflow template** | Text with `{{ … }}` in a node of a workflow. Picked fills it with data from the run. Refer to [Workflow templates](/reference/dashboard/workflow-templates). |
113
- | **Run variable** | A value that each node of a run can read, such as `run.startedAt` or `current.visit`. |
112
+ | **Run variable** | A value that each node of a run can read, such as `run.startedAt` or `current.visit`. |
114
113
 
115
114
  ## The SDK
116
115
 
117
- | Term | What it is |
118
- | --- | --- |
119
- | **Client** | The object that `createClient()` returns. It holds your configuration and runs the experiences. |
120
- | **Plugin** | A piece of behaviour that you pass to the `plugins` array of the client. |
121
- | **Component name** | The identifier that points an experience at a component in your application. |
122
- | **Adapter** | The function that lets the client render a framework component: `adaptReactComponent` or `adaptSvelteComponent`. |
123
- | **Slot** | A named mount point, rendered by `<ExperienceSlot name="…" />`. It maps to the `.picked-slot-<name>` selector. |
124
- | **Placement** | Where an experience renders against its target: `replace`, `before`, `prepend`, `append`, or `after`. |
125
- | **Target selector** | The selector that an experience renders into. |
126
- | **Content index** | The store of every content record that the client holds, keyed by id. `useContent(id)` and `useReference()` read it. |
127
- | **Snapshot** | The plain JSON that `serialize()` returns on your server, and that seeds the client in the browser. |
128
- | **Precondition** | A gate that decides whether Picked starts at all. |
129
- | **Visitor** | The person on your site. Picked gives each one a stable ID. A visitor is not a user. |
130
- | **Framework plugin** | The plugin that lets the client render a React or a Svelte component. |
116
+ | Term | What it is |
117
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
118
+ | **Client** | The object that `createClient()` returns. It holds your configuration and runs the experiences. |
119
+ | **Plugin** | A piece of behaviour that you pass to the `plugins` array of the client. |
120
+ | **Component name** | The identifier that points an experience at a component in your application. |
121
+ | **Adapter** | The function that lets the client render a framework component: `adaptReactComponent` or `adaptSvelteComponent`. |
122
+ | **Slot** | A named mount point, rendered by `<ExperienceSlot name="…" />`. It maps to the `.picked-slot-<name>` selector. |
123
+ | **Placement** | Where an experience renders against its target: `replace`, `before`, `prepend`, `append`, or `after`. |
124
+ | **Target selector** | The selector that an experience renders into. |
125
+ | **Content index** | The store of every content record that the client holds, keyed by id. `useContent(id)` and `useReference()` read it. |
126
+ | **Snapshot** | The plain JSON that `serialize()` returns on your server, and that seeds the client in the browser. |
127
+ | **Precondition** | A gate that decides whether Picked starts at all. |
128
+ | **Visitor** | The person on your site. The SDK gives each browser a visitor ID, and keeps it in browser storage across visits. The API field is `Lead.userId`. A visitor is not a user. |
129
+ | **Framework plugin** | The plugin that lets the client render a React or a Svelte component. |
131
130
 
132
131
  ## APIs and analytics
133
132
 
134
- | Term | What it is |
135
- | --- | --- |
136
- | **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
137
- | **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
138
- | **Preview token** | A token that lets a Delivery API request read unpublished content. |
139
- | **PickedQL** | The SQL query language for your Picked analytics data. |
140
- | **Virtual table** | A table name in PickedQL, such as `metrics`, that maps to the real tables below it. |
141
- | **Virtual function** | A short function in PickedQL, such as `control_users()`, that expands to a full aggregate expression. |
142
- | **Dimension** | A column that PickedQL joins for you, such as `device_category`. |
143
- | **Report** | An embedded analytics dashboard or question, attached to a project. |
133
+ | Term | What it is |
134
+ | ------------------ | ----------------------------------------------------------------------------------------------- |
135
+ | **Delivery API** | The public, anonymous, read-only REST API that serves your published configuration and content. |
136
+ | **Management API** | The authenticated GraphQL API that controls your projects, experiences, and content. |
137
+ | **Preview token** | A token that lets a Delivery API request read unpublished content. |
138
+ | **Report** | An embedded analytics dashboard or question, attached to a project. |
144
139
 
145
140
  ## Tools
146
141
 
147
- | Term | What it is |
148
- | --- | --- |
149
- | **MCP connection** | A link between a Picked project and an AI tool, over the Model Context Protocol. The dashboard calls this **MCP connections**. |
150
- | **Integration** | A connection between Picked and another service. |
151
- | **Tag ID** | The identifier of a project, which the template for Google Tag Manager uses. |
142
+ | Term | What it is |
143
+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
144
+ | **MCP connection** | A link between a Picked project and an AI tool, over the Model Context Protocol. The dashboard calls this **MCP connections**. |
145
+ | **Integration** | A connection between Picked and another service. An app and an external API are two kinds of integration. |
146
+ | **External API** | An origin and a credential that one project registers for the **External API** workflow node. It is not an app. Refer to [External APIs](/reference/dashboard/external-apis). |
147
+ | **Tag ID** | The identifier of a project, which the template for Google Tag Manager uses. |
148
+
149
+ ## Apps
150
+
151
+ | Term | What it is |
152
+ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
153
+ | **App** | An integration that one organization builds and deploys as versions. Many projects can install it. Refer to [About apps](/explanation/apps). |
154
+ | **App version** | One manifest that the organization deployed. You cannot change it. It is not a workspace version. |
155
+ | **Channel** | The kind of an app version: `RELEASE` or `DEV`. Only the organization that owns the app can install a `DEV` version. |
156
+ | **Manifest** | The description of an app version: its endpoint, its scopes, its slots, its workflow tools, its MCP server and its events. Refer to [App manifest](/reference/apps/manifest). |
157
+ | **Installation** | One app on one project, at one app version. It has its own slug, its own scopes and its own labels. |
158
+ | **Slot** (app) | A page of an app that the dashboard shows in an `iframe`, at a location that the manifest gives. It is not an SDK slot. |
159
+ | **Session token** | A short-lived token that tells the server of an app which dashboard user opened its page. |
160
+ | **App assertion** | A token that the server of an app signs with its private key, to get an installation token. It goes in the `picked-app-assertion` header. |
161
+ | **Installation token** | A one-hour credential for the Management API. It carries the scopes of one installation. |
162
+ | **Offline access** | A grant that lets an app get an installation token at any time, and not only when a dashboard user uses the app. |
152
163
 
153
164
  ## Verbs
154
165
 
@@ -157,43 +168,45 @@ word exactly, the table says so.
157
168
 
158
169
  ### You act on the dashboard
159
170
 
160
- | Verb | What it does |
161
- | --- | --- |
162
- | **Create** | Makes a new record. |
163
- | **Update** | Changes a record that exists. |
164
- | **Delete** | Removes a record permanently. You cannot reverse it. |
165
- | **Publish** | Makes an immutable snapshot of a workspace and serves it to your visitors. |
166
- | **Archive** | Moves a draft workspace out of the default list. It stays editable. |
167
- | **Unarchive** | Returns an archived workspace to the default list. |
168
- | **Duplicate** | Copies a workspace, and everything in it, into a new draft. |
169
- | **Restore** | Moves the live pointer of a project to an earlier version. It changes no data. |
170
- | **Preview** | Opens your site with an unpublished workspace applied, for your browser only. |
171
- | **Invite** | Sends an invitation to join an organization. |
172
- | **Revoke** | Invalidates an API key or an invitation immediately. |
173
- | **Install** | Connects an integration to your project. |
171
+ | Verb | What it does |
172
+ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
173
+ | **Create** | Makes a new record. |
174
+ | **Update** | Changes a record that exists. |
175
+ | **Delete** | Removes a record permanently. You cannot reverse it. |
176
+ | **Publish** | Makes an immutable snapshot of a workspace and serves it to your visitors. |
177
+ | **Archive** | Moves a draft workspace out of the default list. It stays editable. |
178
+ | **Unarchive** | Returns an archived workspace to the default list. |
179
+ | **Duplicate** | Copies a workspace, and everything in it, into a new draft. |
180
+ | **Restore** | Moves the live pointer of a project to an earlier version. It changes no data. |
181
+ | **Preview** | Opens your site with an unpublished workspace applied, for your browser only. |
182
+ | **Invite** | Sends an invitation to join an organization. |
183
+ | **Revoke** | Invalidates an API key or an invitation immediately. |
184
+ | **Install** | Connects an integration to your project. For an app, it adds an installation to the project. The `appInstall` mutation uses this word. |
185
+ | **Uninstall** | Removes an app from a project, with its installation tokens and labels. The `appUninstall` mutation uses this word. |
186
+ | **Deploy** | Adds a version to an app from a manifest. The `appDeploy` mutation uses this word. |
174
187
 
175
188
  ### Picked acts on a visitor
176
189
 
177
- | Verb | What it does |
178
- | --- | --- |
179
- | **Allocate** | Puts a visitor in a feature flag. |
180
- | **Resolve** | Gives a feature flag its bucket for one visitor. The first read resolves it. |
181
- | **Decide** | Runs the `decide` function of a feature flag. |
182
- | **Evaluate** | Runs a condition against the current state. |
183
- | **Invoke** | Calls a predicate from inside a condition. |
184
- | **Serve** | Sends published content to a visitor. |
190
+ | Verb | What it does |
191
+ | ------------ | ---------------------------------------------------------------------------- |
192
+ | **Allocate** | Puts a visitor in a feature flag. |
193
+ | **Resolve** | Gives a feature flag its bucket for one visitor. The first read resolves it. |
194
+ | **Decide** | Runs the `decide` function of a feature flag. |
195
+ | **Evaluate** | Runs a condition against the current state. |
196
+ | **Invoke** | Calls a predicate from inside a condition. |
197
+ | **Serve** | Sends published content to a visitor. |
185
198
 
186
199
  ### Your code acts on the SDK
187
200
 
188
- | Verb | What it does |
189
- | --- | --- |
190
- | **Register** | Adds a component, an action, a predicate, or a feature flag to the client. |
191
- | **Start** | Runs the client. `start()` is idempotent. |
192
- | **Adapt** | Wraps a framework component so the client can render it. |
193
- | **Serialize** | Builds a snapshot on your server, with `serialize()`. |
194
- | **Seed** | Gives the client a snapshot, so the first render matches the server. |
195
- | **Hydrate** | Takes over the server markup in the browser. |
196
- | **Render** | Puts a component into the page. |
201
+ | Verb | What it does |
202
+ | ------------- | -------------------------------------------------------------------------- |
203
+ | **Register** | Adds a component, an action, a predicate, or a feature flag to the client. |
204
+ | **Start** | Runs the client. `start()` is idempotent. |
205
+ | **Adapt** | Wraps a framework component so the client can render it. |
206
+ | **Serialize** | Builds a snapshot on your server, with `serialize()`. |
207
+ | **Seed** | Gives the client a snapshot, so the first render matches the server. |
208
+ | **Hydrate** | Takes over the server markup in the browser. |
209
+ | **Render** | Puts a component into the page. |
197
210
 
198
211
  ## Related
199
212
 
@@ -26,10 +26,10 @@ expires. The caller must refresh the session before that time.
26
26
 
27
27
  The session holds an `aal` field, and it gives the strength of the authentication:
28
28
 
29
- | Level | Meaning |
30
- |-------|---------|
29
+ | Level | Meaning |
30
+ | ------ | ------------------------------------------------------------------- |
31
31
  | `AAL1` | One factor: an email address and a password, OAuth, or a magic link |
32
- | `AAL2` | Two factors: the user verified a code from an authenticator app |
32
+ | `AAL2` | Two factors: the user verified a code from an authenticator app |
33
33
 
34
34
  Picked staff, and every member of an organization that requires MFA, must use `AAL2`.
35
35
  For these users, an `AAL1` session can only do these operations:
@@ -49,33 +49,41 @@ until it is revoked.
49
49
 
50
50
  ## The mutations
51
51
 
52
- | Mutation | What it does |
53
- | --- | --- |
54
- | `sessionStart` | Starts a sign-in from an email address alone. Returns `PASSWORD` when the account has a password, and `sessionCreate` completes the sign-in. Otherwise sends an email with a six-digit code and a sign-in link, and returns `EMAIL_CODE`, and `magicLinkVerify` completes the sign-in. An address with no account also gets `EMAIL_CODE`, but no email. Too many requests from one client return `RATE_LIMITED`. |
55
- | `sessionCreate` | Authenticates an email address and a password. Returns a session at `AAL1`. `session.user.mfa` says whether the user must verify. |
56
- | `sessionRefresh` | Exchanges a refresh token for a new session. Needs no `Authorization` header. |
57
- | `accountCreate` | Creates an account. `metadata` takes any JSON. |
58
- | `accountVerifyEmail` | Completes email verification with the token from the email. |
59
- | `accountResendVerification` | Sends the verification email again. |
60
- | `oauthAuthorize` | Returns the authorization URL for a provider. Google is supported. |
61
- | `oauthCallback` | Exchanges an OAuth code for a session. |
62
- | `magicLinkSend` | Sends an email with a six-digit code and a sign-in link to an account. Does not create an account. Returns `success: true` also for an address with no account, and sends no email to it. |
63
- | `magicLinkVerify` | Exchanges the six-digit code from the email for a session. |
64
- | `passwordResetSend` | Sends a password reset email. |
65
- | `passwordUpdate` | Sets or changes the password. Needs authentication. Needs `AAL2` when the user has a verified authenticator, also when the user does not have to use MFA. |
66
- | `mfaFactorEnroll` | Adds an authenticator app. A new factor is `UNVERIFIED`. Returns the QR code and the key one time. |
67
- | `mfaChallengeCreate` | Opens a challenge against a factor. |
68
- | `mfaChallengeVerify` | Verifies the code from the authenticator app. Moves the session to `AAL2`. |
69
- | `mfaFactorUnenroll` | Removes an authenticator. Needs `AAL2` for a verified factor. |
70
- | `apiKeyCreate` | Creates an API key. Only a user with a session can call it. |
71
- | `apiKeyRevoke` | Invalidates a key immediately. |
52
+ | Mutation | What it does |
53
+ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | `sessionStart` | Starts a sign-in from an email address alone. Returns `PASSWORD` when the account has a password, and `sessionCreate` completes the sign-in. Otherwise sends an email with a six-digit code and a sign-in link, and returns `EMAIL_CODE`, and `magicLinkVerify` completes the sign-in. An address with no account also gets `EMAIL_CODE`, but no email. Too many requests from one client return `RATE_LIMITED`. |
55
+ | `sessionCreate` | Authenticates an email address and a password. Returns a session at `AAL1`. `session.user.mfa` says whether the user must verify. |
56
+ | `sessionRefresh` | Exchanges a refresh token for a new session. Needs no `Authorization` header. |
57
+ | `accountCreate` | Creates an account. `metadata` takes any JSON. |
58
+ | `accountVerifyEmail` | Completes email verification with the token from the email. |
59
+ | `accountResendVerification` | Sends the verification email again. |
60
+ | `oauthAuthorize` | Returns the authorization URL for a provider. Google is supported. |
61
+ | `oauthCallback` | Exchanges an OAuth code for a session. |
62
+ | `magicLinkSend` | Sends an email with a six-digit code and a sign-in link to an account. Does not create an account. Returns `success: true` also for an address with no account, and sends no email to it. |
63
+ | `magicLinkVerify` | Exchanges the six-digit code from the email for a session. |
64
+ | `passwordResetSend` | Sends a password reset email. |
65
+ | `passwordUpdate` | Sets or changes the password. Needs authentication. Needs `AAL2` when the user has a verified authenticator, also when the user does not have to use MFA. |
66
+ | `mfaFactorEnroll` | Adds an authenticator app. A new factor is `UNVERIFIED`. Returns the QR code and the key one time. |
67
+ | `mfaChallengeCreate` | Opens a challenge against a factor. |
68
+ | `mfaChallengeVerify` | Verifies the code from the authenticator app. Moves the session to `AAL2`. |
69
+ | `mfaFactorUnenroll` | Removes an authenticator. Needs `AAL2` for a verified factor. |
70
+ | `apiKeyCreate` | Creates an API key. Only a user with a session can call it. |
71
+ | `apiKeyRevoke` | Invalidates a key immediately. |
72
72
 
73
73
  ## Credentials
74
74
 
75
- | Credential | Header |
76
- | --- | --- |
77
- | Session access token | `Authorization: Bearer <accessToken>` |
78
- | API key | `x-api-key: pk_live_abc123...` |
75
+ | Credential | Header |
76
+ | ---------------------- | ------------------------------------- |
77
+ | Session access token | `Authorization: Bearer <accessToken>` |
78
+ | API key | `x-api-key: pk_live_abc123...` |
79
+ | App installation token | `x-api-key: <token>` |
80
+
81
+ ### App installations
82
+
83
+ An [app](/explanation/apps) calls the API for one installation with an installation token.
84
+ It sends the token in the `X-API-Key` header. The app gets a token from the
85
+ `appInstallationTokenCreate` mutation, with a signed token in the `picked-app-assertion`
86
+ header. See [Installation tokens](/reference/apps/protocol#installation-tokens).
79
87
 
80
88
  ## Related
81
89
 
@@ -85,3 +93,4 @@ until it is revoked.
85
93
  - [How to set up MFA](/how-to/set-up-mfa)
86
94
  - [How to authenticate with an API key](/how-to/authenticate-with-an-api-key)
87
95
  - [Authorization and scopes](/reference/management-api/authorization-and-scopes)
96
+ - [About app authentication](/explanation/app-authentication)