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
@@ -0,0 +1,504 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Apps
7
+
8
+ The apps pages of the dashboard show the apps that an organization makes, and the apps that
9
+ each project installs. For apps, versions and installations, see
10
+ [About apps](/explanation/apps).
11
+
12
+ ## Pages
13
+
14
+ | Page | Address | Open it from |
15
+ | --- | --- | --- |
16
+ | Apps of an organization | `/<organization>/apps` | **Apps** in the organization switcher. |
17
+ | New app | `/<organization>/apps/new` | **New app** on the apps page of the organization. |
18
+ | App | `/<organization>/apps/<app ID>` | The row of an app on the apps page of the organization. |
19
+ | Apps of a project | `/<organization>/<project ID>/apps` | **Apps** in the project switcher. |
20
+ | Page of an app | `/<organization>/<project ID>/apps/<slug>` | **Open** next to an installed app on the apps page of the project. |
21
+ | Link to an installation | `/apps/<app ID>/open` | A link from the site of an app. See [Links](#links). |
22
+
23
+ The **Apps** item of each switcher shows only when Picked turns on apps for you, and you
24
+ have the scope `organization_apps/read`.
25
+
26
+ ## Scopes
27
+
28
+ | Scope | What it lets you do on these pages |
29
+ | -------------------------- | -------------------------------------------------------------------------------- |
30
+ | `organization_apps/read` | See each page, and open the page of an installed app. |
31
+ | `organization_apps/create` | Open the **New app** page and create an app, and install an app on a project. |
32
+ | `organization_apps/update` | Deploy a version, add or remove a public key, and upgrade an installation. |
33
+ | `organization_apps/delete` | Delete an app, and uninstall an app from a project. |
34
+ | `apps/publish` | Make an app public to each organization, or make it private. Only Picked has it. |
35
+
36
+ The pages show the button of an action also when you do not have its scope. The API then
37
+ refuses the action. Three buttons are different. **New app**, and **Install** on the page of
38
+ an app, show only when you have `organization_apps/create`. The visibility button shows only
39
+ when you have `apps/publish`. See
40
+ [Organization apps](/reference/management-api/authorization-and-scopes#organization-apps)
41
+ and [Publish an app](/reference/management-api/authorization-and-scopes#publish-an-app).
42
+
43
+ ## Apps of an organization
44
+
45
+ The page has the title **Apps** and the text
46
+ `Apps your organisation builds. Install one from its page or from a project's Apps page.`
47
+
48
+ The **New app** button at the top of the page opens the [New app](#new-app) page.
49
+
50
+ ### App list
51
+
52
+ Each app of the organization has a row. The row opens the page of the app. The list shows
53
+ the apps in name order, 50 at a time. When the organization has more apps,
54
+ **Show more apps** shows the next 50. When the organization has no apps, the list shows
55
+ `No apps yet. Create one, or deploy one with the CLI.`
56
+
57
+ | Part | Content |
58
+ | ---------------- | ------------------------------------------------------------------- |
59
+ | Name | The name of the app. |
60
+ | Handle badge | The `handle` of the app, such as `lead-insights`. |
61
+ | Source badge | **`Deployed with the CLI`**, only when the CLI deploys the app. |
62
+ | Visibility badge | **`Published to every organisation`**, only when the app is public. |
63
+ | Description line | Facts about the newest release version. See the next table. |
64
+
65
+ The description line has these parts, with `·` between them:
66
+
67
+ | Part | Shows |
68
+ | ------------------------------ | ------------------------------------------------------------------------------------- |
69
+ | `Version {{version}}` | The number of the newest release version. Not shown before the first release version. |
70
+ | `{{count}} slots` | The number of slots of that version, when it has slots. |
71
+ | `{{count}} workflow tools` | The number of workflow tools of that version, when it has workflow tools. |
72
+ | `MCP server for the assistant` | Only when that version has an `mcp` server. |
73
+
74
+ ### Build an app with code
75
+
76
+ The **Build an app with code** card has this text:
77
+
78
+ `Build an app as code with @picked/app-kit, then deploy it with the Picked CLI.`
79
+
80
+ The link **Build your first app** opens the tutorial
81
+ [Build your first app](/tutorials/first-app).
82
+
83
+ ## New app
84
+
85
+ The page has the title **New app** and deploys a manifest for you, with the source
86
+ `DASHBOARD`. For the steps, see
87
+ [How to create an app in the dashboard](/how-to/apps/create-an-app-in-the-dashboard).
88
+
89
+ The page has two views of the same manifest. **Edit as JSON** shows the manifest as JSON.
90
+ **Edit in the form** shows the form. Each view starts with the values of the other.
91
+
92
+ ### Form
93
+
94
+ The form has a card for each group of fields. Each field sets a field of the manifest. See
95
+ [App manifest](/reference/apps/manifest).
96
+
97
+ | Card | Field | Manifest field |
98
+ | --- | --- | --- |
99
+ | **Details** | **Name** | `name` |
100
+ | **Details** | **Handle** | `handle` |
101
+ | **Details** | **Description** | `description` |
102
+ | **Slots** | **Where it shows** | `location` of the slot. See [Slot locations](#slot-locations). |
103
+ | **Slots** | **Page URL** | `url` of the slot. |
104
+ | **Slots** | **Heading** | `title` of the slot. |
105
+ | **Slots** | **Height in pixels** | `height` of the slot. |
106
+ | **Server** | **Base URL** | `endpoint` |
107
+ | **Server** | **Events** | `events` |
108
+ | **Server** | **MCP server URL** | `url` of `mcp` |
109
+ | **Server** | **Works on its own** | `offlineAccess` |
110
+ | **Workflow tools** | **Tool name**, **Tool label**, **Tool description**, **Effect** | `name`, `label`, `description` and `effect` of the tool. |
111
+ | **Workflow tools** | **Arguments** | `arguments` of the tool. |
112
+ | **Workflow tools** | **Output** | `output` of the tool. |
113
+ | **Access** | The scopes | `scopes` |
114
+
115
+ **Base URL** is a full `https` URL. It can have a path. Below it, **Requests Picked
116
+ sends** shows the URL of each request that Picked sends to the server. Each URL is the
117
+ base URL without the `/` at the end, then a path:
118
+
119
+ | URL | Request |
120
+ | --- | --- |
121
+ | `POST <base URL>/lifecycle` | Install, upgrade and uninstall. |
122
+ | `POST <base URL>/events` | Each event that you choose in **Events**. |
123
+ | `POST <base URL>/tools/<name>` | Each call to a workflow tool. The list shows one URL for each **Tool name** in **Workflow tools**. |
124
+
125
+ When **Base URL** is empty, the list uses `https://app.example.com`. See
126
+ [Requests from Picked](/reference/apps/protocol#requests-from-picked).
127
+
128
+ **MCP server URL** is the full `https` URL of the MCP server. It does not need a
129
+ **Base URL**. See [MCP requests](/reference/apps/protocol#mcp-requests).
130
+
131
+ Until you enter a handle, the dashboard makes the handle from the name. It changes the name
132
+ to lower case. It keeps the letters `a` to `z` and the digits, with a hyphen between each
133
+ group. It keeps the first 63 characters.
134
+
135
+ **Add slot** and **Add workflow tool** add a slot or a workflow tool. In a workflow tool,
136
+ **Add argument** and **Add output field** add an argument or an output field. Each one has
137
+ the fields **Field name**, **Field label**, **Type** and **Field description**. An argument
138
+ also shows **Required**, and **Options** for the type `string`. An output field also shows
139
+ **Can be left out**. **Remove** removes the slot, tool, argument or output field.
140
+
141
+ **Access** shows each scope that an installation on a project can have. You can choose a scope
142
+ that you do not have. The person who installs the app must have each scope. When the manifest
143
+ has a scope that **Access** does not show, the dashboard keeps it in the manifest.
144
+
145
+ ### JSON view
146
+
147
+ **Manifest (JSON)** shows the full manifest as JSON. See
148
+ [App manifest](/reference/apps/manifest). When the text is not JSON, the field shows the
149
+ error, and **Create app** and **Edit in the form** are not available.
150
+
151
+ ### Create app
152
+
153
+ **Create app** checks the manifest, then deploys it. Each error shows below the field that
154
+ has the error, and all errors show below `The app could not be deployed`. When the API
155
+ refuses to deploy the manifest, its error shows below `The app could not be deployed`.
156
+
157
+ When the app is created, the page of the app opens.
158
+
159
+ ## App
160
+
161
+ The top of the page of an app has the name of the app and these buttons:
162
+
163
+ | Button | What it does |
164
+ | --- | --- |
165
+ | **Install** | Installs the app on a project of the organization. Only a person who has `organization_apps/create` sees it. See [Install from the app page](#install-from-the-app-page). |
166
+ | **`Publish to every organisation`** or **`Make private`** | Changes the visibility of the app. Only a person who has `apps/publish` sees it. See [Visibility](#visibility). |
167
+ | **Delete app** | Deletes the app. See [Delete an app](#delete-an-app). |
168
+
169
+ Below the buttons, the page has two columns. On a narrow screen, the second column is below
170
+ the first.
171
+
172
+ | Column | Part | Content |
173
+ | --- | --- | --- |
174
+ | First | **New version** | Deploys a new manifest. See [New version](#new-version). |
175
+ | First | **Versions** | Each version, the newest first, with its manifest as JSON. |
176
+ | Second | Details | The description, **Handle**, **Source** when the CLI deploys the app, **App ID** and the visibility badge. |
177
+ | Second | **Public keys** | The keys of the server of the app. See [Public keys](#public-keys). |
178
+
179
+ **Handle** shows the `handle` of the app. **Source** shows **`Deployed with the CLI`**. It
180
+ shows only when the CLI deploys the app. **App ID** shows the ID of the app, such as `app_…`.
181
+ **Copy the app ID** copies it. `picked app deploy` also shows the ID of the app.
182
+
183
+ In **Versions**, each version has the title `Version {{version}}`. A dev version also has the
184
+ badge **Dev**. The numbers start at 1, and release versions and dev versions share them.
185
+
186
+ ### Install from the app page
187
+
188
+ **Install** opens the window `Install {{name}} in a project`. The window shows the projects
189
+ of the organization. A project that has the app already shows the badge **Installed**, and you
190
+ cannot choose it. When the organization has no project, the window shows
191
+ `This organisation has no projects.`
192
+
193
+ Choose a project. The [consent window](#consent-window) of the project opens. **Install**
194
+ in the consent window installs the newest release version of the app. When the app has no
195
+ release version, it installs the newest dev version.
196
+
197
+ When the app is installed, the dashboard opens the app in the project. When the installed
198
+ version has an `app-home` slot, the dashboard opens the page of the app in the project.
199
+ Otherwise, it opens the apps page of the project. When the API refuses the installation, the
200
+ error shows below `The app could not be installed`. For the errors, see [Errors](#errors).
201
+
202
+ ### Visibility
203
+
204
+ | Badge | Projects that can install the app |
205
+ | --- | --- |
206
+ | **`Private to your organisation`** | The projects of the organization that owns the app. |
207
+ | **`Published to every organisation`** | The projects of each organization. |
208
+
209
+ A person who has the scope `apps/publish` also sees a button at the top of the page. The
210
+ button opens a window. **`Cancel`** closes the window and does not change the visibility.
211
+
212
+ | Button | Window | Text | Confirm button |
213
+ | --- | --- | --- | --- |
214
+ | **`Publish to every organisation`** | `Publish {{name}} to every organisation?` | `Every organisation can see {{name}} and install its released versions.` | **Publish** |
215
+ | **`Make private`** | `Make {{name}} private?` | `Only your organisation can see {{name}} and install it.` | **`Make private`** |
216
+
217
+ An app must have a release version before it can be public. If it does not, the window stays
218
+ open. It shows `Deploy a release version before publishing the app`, below
219
+ `The app's visibility could not be changed`.
220
+
221
+ ### Public keys
222
+
223
+ The section shows each key with its position and the date that it was added, such as
224
+ `Key 1, added Oct 1, 2026`. Each key has **Copy public key**. The section does not show the ID of a
225
+ key. When the app has no key, the section shows
226
+ `No keys. The app's server cannot call Picked.`
227
+
228
+ | Control | What it does |
229
+ | --- | --- |
230
+ | **Add key** | Opens the window **`Add a public key`**. It shows only when the app has fewer than two keys. |
231
+ | **Remove** | Opens the window `Remove key {{position}}, added {{date}}?`. **Remove** in the window removes the key. |
232
+
233
+ The window **`Add a public key`** has these controls:
234
+
235
+ | Control | What it does |
236
+ | --- | --- |
237
+ | **Public key** | A field for the key that `picked app keys generate` shows. |
238
+ | **Add key** | Adds the key in **Public key** to the app, and closes the window. |
239
+ | **`Generate a key pair`** | Makes a private key and a public key in the browser, and adds the public key. |
240
+ | **`Cancel`** | Closes the window. |
241
+
242
+ After **`Generate a key pair`**, the window shows **`Key pair generated`**. Below it, the
243
+ field **Public key** shows the public key and has **Copy public key**. Below that, the
244
+ `PICKED_APP_PRIVATE_KEY` field shows the private key.
245
+
246
+ The `PICKED_APP_PRIVATE_KEY` field hides the key until you choose **Show secret**, and has a
247
+ copy button. The private key is one line of `base64`. The window shows the private key until
248
+ you choose **Done**. Then the dashboard does not show it again.
249
+
250
+ When the API refuses a key, the window shows the error below
251
+ `The public key could not be added`. When the API refuses to remove a key, the section shows
252
+ the error below `The public key could not be removed`. The next action removes the error.
253
+
254
+ The window that removes a key has this text:
255
+
256
+ `App assertions signed with this key fail from now on. Move the app's server to the other key first.`
257
+
258
+ An app has two keys or fewer. When an app has two keys, **Add key** is not shown. The section
259
+ shows this text:
260
+
261
+ `An app holds two keys at most. Remove one to add another.`
262
+
263
+ For the steps, see [How to rotate an app key](/how-to/apps/rotate-an-app-key).
264
+
265
+ ### New version
266
+
267
+ For an app that you deploy with the CLI, the section shows this text:
268
+
269
+ `This app is deployed with the Picked CLI. Change the app section of picked.config.ts and run picked app deploy.`
270
+
271
+ For an app from the dashboard, **Edit the manifest** shows **Manifest (JSON)** with the
272
+ manifest of the newest version. `Deploy version {{version}}` deploys it as the next release
273
+ version. **`Cancel`** closes the field.
274
+
275
+ | Result | Message |
276
+ | ------------------------------------------- | ------------------------------------------------------------------------- |
277
+ | The manifest has errors. | Each error, below `The version could not be deployed`. |
278
+ | The text is not JSON. | The field shows the error. `Deploy version {{version}}` is not available. |
279
+ | The API refuses to deploy the manifest. | The error, below `The version could not be deployed`. |
280
+ | The manifest is the same as the newest one. | `The manifest matches version {{version}}, so nothing was deployed.` |
281
+
282
+ ### Delete an app
283
+
284
+ **Delete app** opens the window **Delete app** with this text:
285
+
286
+ `Deleting {{name}} uninstalls it from every project it is installed on. This action cannot be undone.`
287
+
288
+ **Delete app** in the window deletes the app, and opens the apps page of the organization. If
289
+ the API refuses the deletion, the window closes, the app stays, and the error shows below
290
+ `The app could not be deleted`.
291
+
292
+ ## Apps of a project
293
+
294
+ The page has the title **Apps** and two tabs. Each tab shows one list:
295
+
296
+ | Tab | Address | Content | Text when empty |
297
+ | --- | --- | --- | --- |
298
+ | **Installed** | `/<organization>/<project ID>/apps` | The apps that the project has. | `No apps are installed.` |
299
+ | **Available** | `/<organization>/<project ID>/apps?tab=available` | The other apps that the project can install: the apps of its organization, and the public apps. | `Every app this project can install is installed.` |
300
+
301
+ The page opens on **Installed**. When you install an app, the page stays on **Available**, and
302
+ the app moves to **Installed**.
303
+
304
+ An app shows in **Available** only when it has a version that the project can install. The
305
+ project gets the newest release version. When an app has no release version, the organization
306
+ that owns the app can install its newest dev version.
307
+
308
+ ### Installed apps
309
+
310
+ | Part | Content |
311
+ | ---------------- | --------------------------------------------------------------------------------------------------------- |
312
+ | Name and badges | See [Badges](#badges). |
313
+ | Description line | `Version {{version}}`, the number of slots, `Workflow tools: <names>` and `MCP server for the assistant`. |
314
+ | Access line | `Access: <scopes>`. An app that has no scopes has no access line. |
315
+ | **Open** | Opens the page of the app in the project. Only for an app with an `app-home` slot. |
316
+ | **Upgrade** | Opens the consent window for the newer version. Only when a newer version is available. |
317
+ | **`Uninstall`** | Opens the window that removes the app. |
318
+
319
+ The description line names each workflow tool as `app.<slug>.<tool>`, such as
320
+ `app.lead-insights.score_lead`. It does not show a part that the version does not have.
321
+
322
+ The access line names each scope by its label in the dashboard. For example,
323
+ `organization_leads/read` shows as **View leads**. A scope that has no label shows its API
324
+ name.
325
+
326
+ The tab shows the installed apps from the oldest installation, 200 at a time.
327
+ When the project has more installed apps, **Show more installed apps** shows the next 200.
328
+
329
+ ### Available apps
330
+
331
+ Each available app shows its name and badges, its description, the access line of its
332
+ version, and **Install**. **Install** opens the consent window.
333
+
334
+ The tab shows the apps in name order, 50 at a time. When the project can install more apps,
335
+ **Show more apps** shows the next 50.
336
+
337
+ ### Badges
338
+
339
+ | Badge | Shows when |
340
+ | ------------------------- | ------------------------------------------------------------------------- |
341
+ | **Dev** | The version is a dev version. |
342
+ | **Published by Picked** | A different organization owns the app. |
343
+ | **New version available** | A newer version is available to the installation. Only on installed apps. |
344
+
345
+ A release installation can get a newer release version. A dev installation can get a newer
346
+ dev version.
347
+
348
+ ### Button names
349
+
350
+ A screen reader reads each button with the name of the app. The buttons at the top of the
351
+ [page of an app](#page-of-an-app-in-a-project) have the same names:
352
+
353
+ | Button | Accessible name |
354
+ | --------------- | -------------------- |
355
+ | **Open** | `Open {{name}}` |
356
+ | **Install** | `Install {{name}}` |
357
+ | **Upgrade** | `Upgrade {{name}}` |
358
+ | **`Uninstall`** | `Uninstall {{name}}` |
359
+
360
+ ### Errors
361
+
362
+ When Picked cannot install, upgrade or uninstall an app, the error shows at the top of the
363
+ page, below `The app could not be updated`.
364
+
365
+ | Error | Cause |
366
+ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
367
+ | `Cannot grant scopes you do not hold: <scopes>` | You do not have each scope of the version in the project, or Picked does not know a scope. |
368
+ | `<name> is already installed on this project` | A project has one installation of each app. |
369
+ | `<name> did not accept the installation (it answered <status>)` | The app refused the installation. Picked removed the installation. |
370
+ | `<name> did not accept the installation` | Picked cannot get to the app. Picked removed the installation. |
371
+ | `<name> did not accept the upgrade (it answered <status>)` | The app refused the upgrade. The installation keeps its version. |
372
+ | `<name> did not accept the upgrade` | Picked cannot get to the app. The installation keeps its version. |
373
+ | `The app has no deployed version to install` | The app has no version that the project can install. |
374
+
375
+ ## Consent window
376
+
377
+ **Install** and **Upgrade** open a window that shows the access that the version asks for.
378
+ The installation gets that access only when you accept it.
379
+
380
+ | Part | Install | Upgrade |
381
+ | -------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
382
+ | Title | `Install {{name}}?` | `Upgrade {{name}} to version {{version}}?` |
383
+ | First line | `{{name}} asks for this access to the project's data:` | `Version {{version}} asks for this access to the project's data:` |
384
+ | Scopes | One row for each scope, with its label. | One row for each scope. A scope that the installation does not have has the badge **New**. |
385
+ | Removed scopes | None. | `It no longer asks for:`, then each scope that the new version does not ask for. |
386
+ | Button | **Install** | **Upgrade** |
387
+
388
+ For a version that asks for no scopes, the window has no first line and no scopes. It shows
389
+ this text:
390
+
391
+ `This app asks for no access to your data.`
392
+
393
+ A version with `offlineAccess` also shows this text:
394
+
395
+ `It also works on its own, outside your visits and workflows — for example to sync on a schedule — with the access above.`
396
+
397
+ These rules apply each time that you install or upgrade an app:
398
+
399
+ - You accept all the scopes of the version, or none. You cannot accept only some of them.
400
+ - You must have each scope of the version in the project.
401
+ - You accept `offlineAccess` when the version asks for it.
402
+ - An upgrade moves the installation to the newest version of the same kind.
403
+
404
+ ## Window to uninstall an app
405
+
406
+ **`Uninstall`** opens the window `Uninstall {{name}}?` with this text:
407
+
408
+ `The app's tokens and the labels it keeps for this project are removed. Its workflow tools stop working.`
409
+
410
+ The **`Uninstall`** button of the window removes the app from the project. On the page of the
411
+ app, the apps page of the project then opens.
412
+
413
+ ## Page of an app in a project
414
+
415
+ The page shows each `app-home` slot of the installed version. The title is the name of the
416
+ app. The **Apps** link above the title opens the apps page of the project. When the project
417
+ has no installation with the slug, or the version has no `app-home` slot, the page shows that
418
+ it is not found.
419
+
420
+ | Slots | Layout |
421
+ | --- | --- |
422
+ | One `app-home` slot | The `iframe` fills the page below the title, with no space around it. The page ignores the slot `height`. |
423
+ | Two or more | The `iframe` elements show one below the other, with the full width of the page and the slot `height`. |
424
+
425
+ The top of the page has these buttons:
426
+
427
+ | Button | Action |
428
+ | --- | --- |
429
+ | **Upgrade** | Opens the [consent window](#consent-window) for the newer version. Only when a newer version is available. |
430
+ | **`Uninstall`** | Opens the [window to uninstall the app](#window-to-uninstall-an-app). When you uninstall the app, the apps page of the project opens. |
431
+
432
+ The buttons need the same scopes as on the apps page of the project. When Picked cannot
433
+ upgrade or uninstall the app, the error shows at the top of the page, below
434
+ `The app could not be updated`.
435
+
436
+ ## Slot locations
437
+
438
+ | Location | Label in **Where it shows** | Where the dashboard shows it |
439
+ | ------------------------------- | -------------------------------- | ----------------------------------------------------------------------------- |
440
+ | `app-home` | **App page** | The page of the app in the project. |
441
+ | `workspace-prepublish-actions` | **Before a workspace publishes** | The window that publishes a workspace, below the changes, before you publish. |
442
+ | `workspace-postpublish-actions` | **After a workspace publishes** | The window that publishes a workspace, after the workspace is published. |
443
+
444
+ In the window that publishes a workspace, each slot of each installed app shows in a card.
445
+ The card has the `title` of the slot, or the name of the app.
446
+
447
+ ## Slot content
448
+
449
+ The dashboard shows each slot in an `iframe`. For the messages between the page and the
450
+ dashboard, and for the `sandbox` value, see
451
+ [App protocol](/reference/apps/protocol#messages-between-the-page-and-the-dashboard).
452
+
453
+ The dashboard shows one of these messages in place of the page, or above it:
454
+
455
+ | Message | Cause |
456
+ | -------------------------------------------------------------------------------- | ------------------------------------------------------- |
457
+ | The error from the API, or `Could not start the app` | The dashboard did not get a session token for the slot. |
458
+ | `This app's page can't be shown: it is served from the dashboard's own address.` | The `url` has the same origin as the dashboard. |
459
+ | `This app's page can't be shown: its address is not a valid URL.` | The `url` is not a valid address. |
460
+
461
+ ## Links
462
+
463
+ This link opens the installation of the app that has the label with the value:
464
+
465
+ `/apps/<app ID>/open?label=<namespace>.<key>&value=<value>`
466
+
467
+ The site of an app makes these links. For the steps, refer to
468
+ [Links from your site](/how-to/apps/link-to-an-installation-from-your-site).
469
+
470
+ | Matches | Result |
471
+ | ----------- | ------------------------------------------------------------------------------------------------------------------- |
472
+ | One | The dashboard opens the page of the app in that project. |
473
+ | Two or more | The page shows `Choose where to open {{name}}`, and one button for each match, as `{{organization}} / {{project}}`. |
474
+ | None | The page shows `No installation of this app that you can open matches this link`, and **Go to the dashboard**. |
475
+
476
+ Only the projects where you have `organization_apps/read` match. A secret label never
477
+ matches. A link without `value`, or with a `label` that is not `<namespace>.<key>`, matches
478
+ nothing. The list shows 50 matches or fewer. When more projects match, the page shows this text:
479
+
480
+ `More projects match this link than this list shows. Open the project from the dashboard to find the rest.`
481
+
482
+ ## API and MCP
483
+
484
+ You can also do this task with the [Management API](/reference/management-api/schema), the [MCP server](/reference/tools/mcp), or code that you send to [`picked_run`](/reference/tools/mcp-run).
485
+
486
+ | Task | GraphQL | MCP tool | Run |
487
+ | --- | --- | --- | --- |
488
+ | List the apps of an organization | [`apps`](/reference/management-api/schema/app#apps) | None | None |
489
+ | Read an app | [`app`](/reference/management-api/schema/app#app) | None | None |
490
+ | List the apps installed on a project | [`appInstallations`](/reference/management-api/schema/app#appinstallations) | None | None |
491
+ | List the apps that a project can install | [`installableApps`](/reference/management-api/schema/app#installableapps) | None | None |
492
+ | Read an installation | [`appInstallation`](/reference/management-api/schema/app#appinstallation) | None | None |
493
+
494
+ `apps`, `appInstallations` and `installableApps` are connections. Use `first` and `after` to
495
+ read one page at a time. A page has a maximum of 200 items. Refer to
496
+ [Pagination](/reference/management-api/pagination).
497
+
498
+ ## Related
499
+
500
+ - [How to install an app](/how-to/apps/install-an-app) — put an app on a project.
501
+ - [How to upgrade or uninstall an app](/how-to/apps/upgrade-or-uninstall-an-app) — move an
502
+ installation to a new version, or remove it.
503
+ - [App manifest](/reference/apps/manifest) — the fields that these pages show.
504
+ - [About apps](/explanation/apps) — apps, versions and installations.
@@ -184,3 +184,8 @@ You can also do this task with the [Management API](/reference/management-api/sc
184
184
  | Set the arguments of an External API node | [`workflowGraphUpdate`](/reference/management-api/schema/workflow#workflowgraphupdate) | [`update_workflow_graph`](/reference/tools/mcp#update_workflow_graph) | `tools.update_workflow_graph({ workflow_id, update_nodes })` |
185
185
 
186
186
  The external API mutations refuse an API key. Use the access token of a user.
187
+
188
+ ## Related
189
+
190
+ - [About apps](/explanation/apps#apps-external-apis-and-mcp-connections) — when to use an
191
+ app in place of an external API.
@@ -41,14 +41,14 @@ Set the allocation from the detail page of the feature flag:
41
41
  | Control | What it does |
42
42
  | --- | --- |
43
43
  | **Enabled** | Whether Picked allocates a visitor to the feature flag. A disabled feature flag allocates nobody, and it records nothing. See [Disable a feature flag](#disable-a-feature-flag). |
44
- | **Weight** | The percentage of visitors that Picked allocates to a Boolean feature flag, from 0 to 100. |
44
+ | **Traffic** | The weight of a Boolean feature flag. It is the percentage of visitors that get `true`, from 0 to 100. The other visitors are the control group, and they get `false`. |
45
45
  | **Variants** | The groups of a Text feature flag, and the traffic that each one receives. See [Variants](#variants). |
46
46
  | **Description** | An internal note about what the feature flag tests. |
47
47
 
48
- A Boolean feature flag has one weight. For each visitor it gives one of two outcomes:
49
- allocated, or not allocated. A weight of 30 allocates 30% of your visitors. The other
50
- 70% stay unallocated. A weight of 0 allocates nobody. A weight of 100 allocates
51
- everybody.
48
+ A Boolean feature flag has one weight. For each visitor it gives one of two buckets:
49
+ `true`, or `false`. A weight of 30 gives `true` to 30% of your visitors. The other 70% are
50
+ the control group, and they get `false`. A weight of 0 puts every visitor in the control
51
+ group. A weight of 100 gives `true` to every visitor.
52
52
 
53
53
  ## Variants
54
54
 
@@ -5,8 +5,8 @@ layout: docs
5
5
 
6
6
  # Labels
7
7
 
8
- A label is a name and a value on a lead, a project or a workflow run. A workflow sets and
9
- removes labels with tool nodes. A label can expire, a write can be conditional, and a node
8
+ A label is a name and a value on a lead, a project, a workflow run or an app installation. A
9
+ workflow sets and removes labels with tool nodes. A label can expire, a write can be conditional, and a node
10
10
  can increment a `number` label.
11
11
 
12
12
  ## Name, type and value
@@ -23,13 +23,28 @@ one label for each namespace and key.
23
23
 
24
24
  ## Owners
25
25
 
26
- | Owner | Where the labels stay | Scope to read the labels | Scope to set and remove the labels |
27
- | ------------ | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------- |
28
- | Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead. | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
29
- | Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
30
- | Workflow run | With the run. Picked does not delete a run. | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
26
+ | Owner | Where the labels stay | Scope to read the labels | Scope to set and remove the labels |
27
+ | ---------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------- |
28
+ | Lead | Until you delete the lead. Picked deletes the labels of a lead with the lead. | `ORGANIZATION_LEADS_READ` | `ORGANIZATION_LEADS_UPDATE` |
29
+ | Project | Picked keeps the labels when you delete the project. These labels hold data for all the runs of the project. | `ORGANIZATION_PROJECTS_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
30
+ | Workflow run | With the run. Picked does not delete a run. | `ORGANIZATION_WORKSPACE_READ` | `ORGANIZATION_PROJECTS_UPDATE` |
31
+ | App installation | Until you uninstall the app. Picked deletes the labels of an installation with the installation. | `ORGANIZATION_APPS_READ` | `ORGANIZATION_APPS_UPDATE` |
31
32
 
32
- A run reads, sets and removes its own labels without a scope.
33
+ A run reads, sets and removes its own labels without a scope. An app installation reads, sets
34
+ and removes its own labels with its own token, without a scope. The owner type of an app
35
+ installation in the API is `APP_INSTALLATION`.
36
+
37
+ ## Secret labels
38
+
39
+ Only the labels of an app installation can be secret. A secret label has `secret: true`.
40
+
41
+ - Only a `text` or a `json` label can be secret.
42
+ - A row that sets a secret label cannot have `increment` or `onlyIfAbsent`.
43
+ - The value of a secret label is empty. Only the installation reads the value, with its own
44
+ token.
45
+
46
+ An installation has a limit on the number of its labels and on the size of each value. Refer
47
+ to [How to store data for an installation](/how-to/apps/store-data-for-an-installation#6-handle-a-refused-write).
33
48
 
34
49
  ## Labels in the dashboard
35
50
 
@@ -319,3 +334,5 @@ label only while the run holds it:
319
334
  `run.id` variable.
320
335
  - [Lead search](/reference/dashboard/lead-search) — clauses on labels.
321
336
  - [Glossary](/reference/glossary) — label, namespace and label type.
337
+ - [How to store data for an installation](/how-to/apps/store-data-for-an-installation) — the
338
+ labels of an app installation.
@@ -18,7 +18,7 @@ so you can share the link.
18
18
  | One label | `namespace.key` | `acme.status:sent` |
19
19
  | One answer | the key of the field | `suburb:Sydney` |
20
20
  | The capture date | `createdAt` | `createdAt>2026-08-01` |
21
- | The visitor | `userId` | `userId:sess_7x2k9q3m1n4a` |
21
+ | The visitor | `userId` | `userId:3f2b9c1e-8d4a-4b6f-9e2d-7a1c5b8e0f34` |
22
22
  | The visit that captured the lead | `session.field` | `session.utm_source:google` |
23
23
 
24
24
  A path of two parts is a label, unless it starts with `session.`: that path reads the visit. A `session.` path needs `ORGANIZATION_SESSIONS_READ`.
@@ -61,10 +61,10 @@ no way to show which one comes first. A query that mixes them gives an error.
61
61
 
62
62
  ## The visit that captured the lead
63
63
 
64
- A visit is the set of events that one visitor made, from the first page to the last page. The visit
65
- that captured a lead is the visit that holds its capture. A clause on the visit matches the
66
- lead when one event of the visit has the value. The event can come before the capture or
67
- after it.
64
+ A visit is the set of events that one visitor made on a site, from the first event until 30
65
+ minutes pass without another event. The visit that captured a lead is the visit that holds
66
+ its capture. A clause on the visit matches the lead when one event of the visit has the
67
+ value. The event can come before the capture or after it.
68
68
 
69
69
  | Field | What it holds |
70
70
  | --- | --- |
@@ -169,7 +169,7 @@ Two plain words both must match.
169
169
  | `email-address~rocketrides` | Leads whose `email-address` answer holds `rocketrides` |
170
170
  | `quote-preferences:*` | Leads that answered `quote-preferences` |
171
171
  | `createdAt>2026-08-01` | Leads captured after that date |
172
- | `userId:sess_7x2k9q3m1n4a` | Leads captured for that visitor |
172
+ | `userId:3f2b9c1e-8d4a-4b6f-9e2d-7a1c5b8e0f34` | Leads captured for that visitor |
173
173
 
174
174
  **The visit that captured the lead**
175
175