@picked/client 0.0.101-next.2 → 0.0.101-next.3
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.
- package/README.md +34 -158
- package/dist/{api-AaQeg3Ij.cjs → api-9o_emCM5.cjs} +1 -1
- package/dist/{api-BlRFU0Fi.js → api-BbQt8aW3.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/server/index.js +2 -2
- package/dist/{plugin-CVD2TnRC.cjs → plugin-I8_6ncy_.cjs} +1 -1
- package/dist/{plugin-DhznDG-h.js → plugin-uZJ45vK6.js} +2 -2
- package/dist/{preview-unavailable-xWLCr93y.cjs → preview-unavailable-BUNxTYLe.cjs} +1 -1
- package/dist/{preview-unavailable-mW4Pj3Ph.js → preview-unavailable-BYFD2a58.js} +1 -1
- package/dist/{provider-zag5m5GH.cjs → provider-Bzi_Kb-n.cjs} +1 -1
- package/dist/{provider-COb_V-yq.js → provider-CQKp0iUJ.js} +1 -1
- package/package.json +5 -5
- package/dist/docs/_root.css +0 -101
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
- package/dist/docs/explanation/content-references.md +0 -99
- package/dist/docs/explanation/feature-flag-allocation.md +0 -218
- package/dist/docs/explanation/how-picked-works.md +0 -124
- package/dist/docs/explanation/how-pickedql-works.md +0 -76
- package/dist/docs/explanation/pages-and-flows.md +0 -64
- package/dist/docs/explanation/the-content-model.md +0 -87
- package/dist/docs/explanation/the-two-apis.md +0 -68
- package/dist/docs/explanation/why-server-side-rendering.md +0 -76
- package/dist/docs/explanation/workspaces-and-versions.md +0 -71
- package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
- package/dist/docs/how-to/analytics/index.md +0 -316
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
- package/dist/docs/how-to/authenticate-the-cli.md +0 -101
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -47
- package/dist/docs/how-to/authenticate-with-a-password.md +0 -59
- package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
- package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
- package/dist/docs/how-to/build-a-flow.md +0 -93
- package/dist/docs/how-to/call-an-external-api-from-a-workflow.md +0 -102
- package/dist/docs/how-to/connect-the-mcp-server.md +0 -46
- package/dist/docs/how-to/create-a-content-entry.md +0 -48
- package/dist/docs/how-to/create-a-project.md +0 -29
- package/dist/docs/how-to/create-an-experience.md +0 -42
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
- package/dist/docs/how-to/define-a-page-layout.md +0 -46
- package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
- package/dist/docs/how-to/install-the-gtm-template.md +0 -84
- package/dist/docs/how-to/install-the-sdk.md +0 -93
- package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
- package/dist/docs/how-to/invite-and-remove-members.md +0 -35
- package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
- package/dist/docs/how-to/preview-a-workspace.md +0 -28
- package/dist/docs/how-to/publish-a-workspace.md +0 -30
- package/dist/docs/how-to/read-a-feature-flag.md +0 -113
- package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
- package/dist/docs/how-to/register-a-component.md +0 -55
- package/dist/docs/how-to/register-an-action-handler.md +0 -85
- package/dist/docs/how-to/register-an-api-that-uses-oauth2.md +0 -107
- package/dist/docs/how-to/render-a-step-form.md +0 -131
- package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
- package/dist/docs/how-to/retry-a-failed-call-with-a-loop.md +0 -81
- package/dist/docs/how-to/reuse-a-section.md +0 -53
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
- package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
- package/dist/docs/how-to/run-an-ab-test.md +0 -49
- package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
- package/dist/docs/how-to/server-render-a-page.md +0 -81
- package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
- package/dist/docs/how-to/set-up-mfa.md +0 -113
- package/dist/docs/how-to/switch-workspaces.md +0 -122
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
- package/dist/docs/how-to/validate-a-field.md +0 -52
- package/dist/docs/how-to/wait-for-an-action-response.md +0 -182
- package/dist/docs/how-to/write-a-condition.md +0 -45
- package/dist/docs/how-to/write-a-predicate.md +0 -60
- package/dist/docs/index.md +0 -59
- package/dist/docs/reference/dashboard/actions.mdx +0 -56
- package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
- package/dist/docs/reference/dashboard/conditions.mdx +0 -42
- package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
- package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
- package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
- package/dist/docs/reference/dashboard/content/models.mdx +0 -108
- package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
- package/dist/docs/reference/dashboard/experiences.mdx +0 -51
- package/dist/docs/reference/dashboard/external-apis.md +0 -169
- package/dist/docs/reference/dashboard/features.mdx +0 -154
- package/dist/docs/reference/dashboard/fields.mdx +0 -106
- package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
- package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
- package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
- package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
- package/dist/docs/reference/dashboard/labels.md +0 -321
- package/dist/docs/reference/dashboard/lead-search.md +0 -224
- package/dist/docs/reference/dashboard/projects.mdx +0 -44
- package/dist/docs/reference/dashboard/reports.mdx +0 -43
- package/dist/docs/reference/dashboard/steps.mdx +0 -37
- package/dist/docs/reference/dashboard/team-management.md +0 -29
- package/dist/docs/reference/dashboard/workflow-runs.md +0 -142
- package/dist/docs/reference/dashboard/workflow-templates.md +0 -182
- package/dist/docs/reference/dashboard/workflow-test-runs.md +0 -77
- package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
- package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
- package/dist/docs/reference/delivery-api/experience-content.md +0 -152
- package/dist/docs/reference/delivery-api/index.md +0 -45
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
- package/dist/docs/reference/delivery-api/project-config.md +0 -65
- package/dist/docs/reference/delivery-api/workspace-schema.md +0 -107
- package/dist/docs/reference/glossary.md +0 -201
- package/dist/docs/reference/management-api/authentication.md +0 -87
- package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -291
- package/dist/docs/reference/management-api/error-handling.md +0 -232
- package/dist/docs/reference/management-api/pagination.md +0 -192
- package/dist/docs/reference/pickedql/data-sources.md +0 -174
- package/dist/docs/reference/pickedql/dimensions.md +0 -103
- package/dist/docs/reference/pickedql/filtering.md +0 -64
- package/dist/docs/reference/pickedql/index.md +0 -18
- package/dist/docs/reference/pickedql/schema.md +0 -172
- package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
- package/dist/docs/reference/sdk/actions.md +0 -154
- package/dist/docs/reference/sdk/analytics-events.md +0 -453
- package/dist/docs/reference/sdk/conditions.md +0 -147
- package/dist/docs/reference/sdk/content-security-policy.md +0 -21
- package/dist/docs/reference/sdk/content.md +0 -253
- package/dist/docs/reference/sdk/experiences.md +0 -51
- package/dist/docs/reference/sdk/features.md +0 -256
- package/dist/docs/reference/sdk/fields.md +0 -255
- package/dist/docs/reference/sdk/index.md +0 -68
- package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
- package/dist/docs/reference/sdk/plugins/index.md +0 -29
- package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
- package/dist/docs/reference/sdk/predicates.md +0 -43
- package/dist/docs/reference/sdk/ssr/index.md +0 -33
- package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
- package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
- package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -113
- package/dist/docs/reference/sdk/steps.md +0 -86
- package/dist/docs/reference/sdk/type-generation.md +0 -265
- package/dist/docs/reference/tools/chrome-extension.md +0 -16
- package/dist/docs/reference/tools/cli.md +0 -292
- package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
- package/dist/docs/reference/tools/mcp.md +0 -136
- package/dist/docs/reference/tools/vite-plugin.md +0 -163
- package/dist/docs/tutorials/first-api-call.md +0 -235
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
- package/dist/docs/tutorials/first-experience.mdx +0 -254
- package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Screenshot } from '../../../../components/Screenshot'
|
|
7
|
-
|
|
8
|
-
# Experiences
|
|
9
|
-
|
|
10
|
-
An experience is personalized content that Picked serves to the visitors on your
|
|
11
|
-
site. Each experience points at a component that you register in your application.
|
|
12
|
-
|
|
13
|
-
An experience is either a **Flow** or a **Page**. A **Flow** is an interactive
|
|
14
|
-
experience of more than one step, and the browser renders it. This page covers the
|
|
15
|
-
flow. A **Page** is a standalone experience that the server renders from CMS content,
|
|
16
|
-
for a landing page where the search rank matters. See [Pages](/reference/dashboard/content/pages) for
|
|
17
|
-
that kind.
|
|
18
|
-
|
|
19
|
-
<Screenshot
|
|
20
|
-
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/experiences"
|
|
21
|
-
alt="The experiences list for a workspace on the Picked dashboard"
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
## Experience settings
|
|
25
|
-
|
|
26
|
-
Choose no node on the canvas, or click the canvas background, to open the experience
|
|
27
|
-
inspector in the right panel.
|
|
28
|
-
|
|
29
|
-
**Name**: The name that the dashboard shows. Your visitors do not see it.
|
|
30
|
-
|
|
31
|
-
**Component Name**: The identifier that points this experience at a component in your
|
|
32
|
-
application.
|
|
33
|
-
|
|
34
|
-
**Condition**: An optional condition. When you set it, the experience starts only for
|
|
35
|
-
a visitor who matches the condition. See
|
|
36
|
-
[Condition Builder](/reference/dashboard/flow-builder/condition-builder) for how to write one. Keep it
|
|
37
|
-
blank to start the experience for every visitor.
|
|
38
|
-
|
|
39
|
-
**Initialize Open**: An optional condition that controls whether the experience opens
|
|
40
|
-
by itself when the page loads. When it is blank, the experience loads but stays
|
|
41
|
-
closed until something opens it.
|
|
42
|
-
|
|
43
|
-
## Experience list
|
|
44
|
-
|
|
45
|
-
The experiences list shows every experience in the current project. Click an
|
|
46
|
-
experience to open it in the flow builder.
|
|
47
|
-
|
|
48
|
-
## Related
|
|
49
|
-
|
|
50
|
-
- [About pages and flows](/explanation/pages-and-flows) — Page or Flow.
|
|
51
|
-
- [How to create an experience](/how-to/create-an-experience)
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# External APIs
|
|
7
|
-
|
|
8
|
-
An external API is an origin that this project's workflows are allowed to call with the
|
|
9
|
-
**External API** node. For the steps to register an API that uses OAuth2, refer to
|
|
10
|
-
[How to register an API that uses OAuth2](/how-to/register-an-api-that-uses-oauth2).
|
|
11
|
-
|
|
12
|
-
## Registration
|
|
13
|
-
|
|
14
|
-
| Field | Rule |
|
|
15
|
-
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
-
| Display name | Required. 1 to 120 characters. For you only; it does not go out with the request. |
|
|
17
|
-
| Origin | Required. The scheme, the host and the optional port, with no path, query, fragment or sign-in details. `http` or `https` only, on port 80 or 443. Must not point at a private, loopback or link-local address. One live registration per origin per project. |
|
|
18
|
-
| Credential | None, an authorization header, or an OAuth2 credential. Each secret is encrypted and is never returned. |
|
|
19
|
-
|
|
20
|
-
An authorization header is a header name and a value. The dashboard shows the header name
|
|
21
|
-
and a mask. An OAuth2 credential gets an access token for each call. Refer to
|
|
22
|
-
[OAuth2 credential](#oauth2-credential). When you set one kind of credential, Picked removes
|
|
23
|
-
the other kind.
|
|
24
|
-
|
|
25
|
-
On a registration with an OAuth2 credential, the dashboard does not show the authorization
|
|
26
|
-
header. Remove the OAuth2 credential before you set a header.
|
|
27
|
-
|
|
28
|
-
To change an origin, delete the registration and register the new origin. The origin is
|
|
29
|
-
the registration's identity.
|
|
30
|
-
|
|
31
|
-
A preset sets the display name, the origin and an OAuth2 credential for a provider. Refer to
|
|
32
|
-
[OAuth2 credential](#oauth2-credential).
|
|
33
|
-
|
|
34
|
-
## OAuth2 credential
|
|
35
|
-
|
|
36
|
-
An OAuth2 credential gets an access token from the provider's token URL. Picked sends the
|
|
37
|
-
header scheme, a space and the access token in the header with each request.
|
|
38
|
-
|
|
39
|
-
| Setting | Default | Rule |
|
|
40
|
-
| --------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
-
| Grant | Refresh token | `Refresh token` or `Client credentials`. |
|
|
42
|
-
| Token URL | — | Required. An `https` URL with no fragment. The query must not contain `grant_type`, `client_id`, `client_secret`, `refresh_token` or `code`. Picked checks the URL as it checks an origin. Picked does not register its origin. |
|
|
43
|
-
| Client ID | — | Required. 1 to 512 characters. |
|
|
44
|
-
| Client secret | — | Required. Encrypted, and never returned. When you edit the credential, an empty field keeps the stored client secret. If you change the token URL, the client ID or the client authentication, enter the client secret again. |
|
|
45
|
-
| Refresh token | — | Required for the refresh token grant. The client credentials grant does not use one. Encrypted, and never returned. When you edit the credential, an empty field keeps the stored refresh token. If you change the token URL, the client ID or the client authentication, enter the refresh token again. |
|
|
46
|
-
| Client authentication | Form body | The client ID and the client secret go in the form body, or in an `Authorization: Basic` header. |
|
|
47
|
-
| Token parameters | None | Up to 20 more form parameters, such as `scope`. `grant_type`, `client_id`, `client_secret`, `refresh_token` and `code` are not permitted. |
|
|
48
|
-
| Header name | `Authorization` | The header that holds the access token. |
|
|
49
|
-
| Header scheme | `Bearer` | The word before the access token, such as `Zoho-oauthtoken`. No spaces. |
|
|
50
|
-
| 401 rule | None | A path in the JSON body of a 401 answer, and 1 to 20 values at that path that show an expired token. Put a dot between the parts of the path, for example `code` or `data.0.code`. A part that is a number identifies an item in a list. With no rule, each 401 shows an expired token. |
|
|
51
|
-
|
|
52
|
-
The Zoho CRM preset sets the display name `Zoho CRM` and the origin of the API for the
|
|
53
|
-
region, such as `https://www.zohoapis.com.au`. It also sets an OAuth2 credential. The
|
|
54
|
-
credential has the token URL for the region, `Form body`, `Zoho-oauthtoken`, and a 401 rule
|
|
55
|
-
of `code` with the value `INVALID_TOKEN`. On the page of a registered external API, the preset sets only the
|
|
56
|
-
OAuth2 credential.
|
|
57
|
-
|
|
58
|
-
### Access tokens
|
|
59
|
-
|
|
60
|
-
- Picked sends the token request as a `POST` with a form body, so no secret is in a URL.
|
|
61
|
-
- Picked uses an access token until 60 seconds before it expires.
|
|
62
|
-
- Picked reads the lifetime from `expires_in_sec`, or else from `expires_in`. Picked keeps
|
|
63
|
-
a token with no lifetime for one hour.
|
|
64
|
-
- Picked counts an answer as a success when its JSON body has an `access_token`, for all
|
|
65
|
-
statuses.
|
|
66
|
-
- A `refresh_token` in the answer replaces the stored refresh token.
|
|
67
|
-
- One token request at a time runs for each credential. Other calls use the token that it
|
|
68
|
-
gets.
|
|
69
|
-
- After a token request fails with `credential_refresh_failed`, Picked sends no token
|
|
70
|
-
request for 60 seconds. Calls in that time fail with `credential_refresh_failed`.
|
|
71
|
-
- Picked uses a stored access token for all values of `timeoutMs`.
|
|
72
|
-
- The token request, and the wait for a token request of another call, use time from the
|
|
73
|
-
node's `timeoutMs`. Each stops while 5 seconds remain. Picked starts a token request only
|
|
74
|
-
when 6 seconds or more remain. A token request stops after 10 seconds.
|
|
75
|
-
- When the node's time stops a token request, other calls can send a token request
|
|
76
|
-
immediately.
|
|
77
|
-
|
|
78
|
-
### A 401 answer
|
|
79
|
-
|
|
80
|
-
Picked gets a new token and sends the request again when these are all true:
|
|
81
|
-
|
|
82
|
-
- The API answered 401.
|
|
83
|
-
- The token is older than 60 seconds.
|
|
84
|
-
- The credential has no 401 rule, or the rule applies to the body of the answer.
|
|
85
|
-
|
|
86
|
-
The second request has the same `Idempotency-Key`. Its answer is the result of the node.
|
|
87
|
-
|
|
88
|
-
If Picked cannot get a new token, the node fails with `credential_rejected` or
|
|
89
|
-
`credential_refresh_failed`. Then `nodes.<node-id>.status`, `ok` and `body` keep the 401
|
|
90
|
-
answer.
|
|
91
|
-
|
|
92
|
-
## Node arguments
|
|
93
|
-
|
|
94
|
-
| Argument | Default | Rule |
|
|
95
|
-
| ------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
-
| `method` | — | Required. `GET`, `HEAD`, `POST`, `PUT`, `PATCH` or `DELETE`. |
|
|
97
|
-
| `url` | — | Required. The full address. Its origin must be registered to this project. |
|
|
98
|
-
| `headers` | none | A JSON object of headers to send. Picked refuses a credential here when you save. |
|
|
99
|
-
| `body` | none | The JSON body. Used by `POST`, `PUT` and `PATCH`. |
|
|
100
|
-
| `timeoutMs` | 10000 | 1000 to 30000. The time that the whole call has, with every retry. |
|
|
101
|
-
| `retry` | on for `GET`, `HEAD`, `PUT` and `DELETE`; off for `POST` and `PATCH` | Whether to send the request again after a failed connection, an unknown host, or a status of 408, 429 or 500 to 599. |
|
|
102
|
-
| `failOnErrorStatus` | on | Whether a status outside 200 to 299 fails the node. |
|
|
103
|
-
| `recordBody` | on | Whether to record the answer's body. |
|
|
104
|
-
|
|
105
|
-
## Output
|
|
106
|
-
|
|
107
|
-
| Name | Value |
|
|
108
|
-
| --------------- | ------------------------------------------------------------------------ |
|
|
109
|
-
| `status` | The HTTP status. |
|
|
110
|
-
| `ok` | True for a status from 200 to 299. |
|
|
111
|
-
| `body` | The parsed JSON answer, or null when it is not JSON or was not recorded. |
|
|
112
|
-
| `bodyTruncated` | True when the answer was too large to record in full. |
|
|
113
|
-
| `durationMs` | The time the call took. |
|
|
114
|
-
|
|
115
|
-
## Limits
|
|
116
|
-
|
|
117
|
-
- The request body is limited to 1 MiB.
|
|
118
|
-
- The recorded answer is limited to 256 KiB. A larger answer sets `bodyTruncated`.
|
|
119
|
-
- Picked records the status that asks the caller to redirect. Picked does not go to the
|
|
120
|
-
new address.
|
|
121
|
-
- Picked sends a request three times at most. Picked waits longer before each retry, and
|
|
122
|
-
waits for the time that a `Retry-After` header gives.
|
|
123
|
-
- A timeout uses all of `timeoutMs`, so Picked does not send the request again after a
|
|
124
|
-
timeout.
|
|
125
|
-
|
|
126
|
-
## Errors
|
|
127
|
-
|
|
128
|
-
When the node fails, the run stops at the node. If the call fails and an edge leaves the
|
|
129
|
-
node's error exit, the run continues on that edge. These failures stop the run at the
|
|
130
|
-
node, with or without that edge:
|
|
131
|
-
|
|
132
|
-
- A required argument has no value.
|
|
133
|
-
- An argument has a value that the tool does not accept. For example, the value has the
|
|
134
|
-
wrong type, `method` is not one of the six methods, or `timeoutMs` is not from
|
|
135
|
-
1000 to 30000.
|
|
136
|
-
- A template cannot be rendered.
|
|
137
|
-
- The workflow does not have a scope that the tool needs.
|
|
138
|
-
- An error occurs in Picked.
|
|
139
|
-
|
|
140
|
-
A later node reads why the call failed from `nodes.<node-id>.error`:
|
|
141
|
-
|
|
142
|
-
| Field | Value |
|
|
143
|
-
| ----------- | ------------------------------------------------------------------------------------------------ |
|
|
144
|
-
| `code` | `http_failed`. |
|
|
145
|
-
| `message` | The node, the tool and the message from the table below. |
|
|
146
|
-
| `reason` | The reason from the table below. |
|
|
147
|
-
| `retryable` | True when the same request can pass at a later time. |
|
|
148
|
-
| `status` | The HTTP status, for the reason `error_status`. Also for a credential reason after a 401 answer. |
|
|
149
|
-
|
|
150
|
-
After an error status, `nodes.<node-id>.status`, `ok` and `body` also keep the answer.
|
|
151
|
-
|
|
152
|
-
| Reason | Message ends with | Retryable | When |
|
|
153
|
-
| --------------------------- | ----------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
154
|
-
| `error_status` | `the API answered <status>` | For 408, 429 and 500 to 599 | The status was outside 200 to 299, and `failOnErrorStatus` is on. |
|
|
155
|
-
| `timeout` | `no answer within the node's timeout` | Yes | Nothing answered within `timeoutMs`. |
|
|
156
|
-
| `transport` | `the request could not be delivered` | Yes | The connection failed. |
|
|
157
|
-
| `unresolvable` | `the destination hostname did not resolve` | Yes | No address was found for the host. |
|
|
158
|
-
| `refused` | `the destination was refused` | No | The URL points at a private, loopback or link-local address. |
|
|
159
|
-
| `refused` | `no external API is registered for <origin>` | No | The URL's origin has no live registration in this project. |
|
|
160
|
-
| `request_too_large` | `the request body is over 1 MiB` | No | The body is larger than the limit. |
|
|
161
|
-
| `invalid_request` | `the request is not one the tool can send` | No | The arguments do not make a valid request. |
|
|
162
|
-
| `invalid_request` | `the URL is not one the tool can send` | No | The tool cannot send to the URL. |
|
|
163
|
-
| `invalid_headers` | The header that Picked refused | No | A header name or value is not valid for HTTP. |
|
|
164
|
-
| `credential_unavailable` | `the credential for this external API is unavailable` | No | Picked cannot read a secret of the registration's credential. |
|
|
165
|
-
| `credential_rejected` | `the token endpoint refused this external API's credential` | No | The token endpoint answered `invalid_client`, `invalid_grant`, `invalid_code`, `invalid_client_secret` or `unauthorized_client`. |
|
|
166
|
-
| `credential_refresh_failed` | `no access token could be fetched for this external API` | Yes | The token endpoint did not answer in time, or Picked cannot reach it. Or the token endpoint answered with no token, or a token request failed less than 60 seconds before. Or the node's time ran out. |
|
|
167
|
-
|
|
168
|
-
Picked also refuses a workflow when you save it if a node holds a credential in
|
|
169
|
-
`headers`. Register the external API, and put the credential on the registration.
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Screenshot } from '../../../../components/Screenshot'
|
|
7
|
-
|
|
8
|
-
# Feature flags
|
|
9
|
-
|
|
10
|
-
A feature flag lets you run an A/B test and roll a change out in stages. It controls
|
|
11
|
-
which visitors see a change to your site, and you deploy no code.
|
|
12
|
-
|
|
13
|
-
<Screenshot
|
|
14
|
-
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/features"
|
|
15
|
-
alt="The feature flags list for a workspace on the Picked dashboard"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
## Keys
|
|
19
|
-
|
|
20
|
-
Each feature flag has a unique key. Your application uses this key to check whether
|
|
21
|
-
Picked allocates a visitor to the feature flag. You set the key when you create the
|
|
22
|
-
feature flag, and you cannot change it later.
|
|
23
|
-
|
|
24
|
-
## Types
|
|
25
|
-
|
|
26
|
-
Each feature flag has a type. You set the type when you create the feature flag, and you
|
|
27
|
-
cannot change it later.
|
|
28
|
-
|
|
29
|
-
| Type | What your site receives | Groups |
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| **Boolean** | `true` or `false` | Two |
|
|
32
|
-
| **Text** | A string that you write, or `false` for the control group | Two or more |
|
|
33
|
-
|
|
34
|
-
Choose **Boolean** for one change against no change. Choose **Text** when you must test
|
|
35
|
-
several changes at the same time, and each change needs its own group.
|
|
36
|
-
|
|
37
|
-
## Set the allocation
|
|
38
|
-
|
|
39
|
-
Set the allocation from the detail page of the feature flag:
|
|
40
|
-
|
|
41
|
-
| Control | What it does |
|
|
42
|
-
| --- | --- |
|
|
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. |
|
|
45
|
-
| **Variants** | The groups of a Text feature flag, and the traffic that each one receives. See [Variants](#variants). |
|
|
46
|
-
| **Description** | An internal note about what the feature flag tests. |
|
|
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.
|
|
52
|
-
|
|
53
|
-
## Variants
|
|
54
|
-
|
|
55
|
-
A Text feature flag has a table of variants. Each row is one group of visitors:
|
|
56
|
-
|
|
57
|
-
| Column | What it does |
|
|
58
|
-
| --- | --- |
|
|
59
|
-
| **Name** | A label for the variant. It appears in your reports. You can change it at any time. |
|
|
60
|
-
| **Value** | The string that your site receives for a visitor in this variant. |
|
|
61
|
-
| **Weight** | The share of traffic for this variant, against the other rows. |
|
|
62
|
-
|
|
63
|
-
The first row is **Control**. Picked always sends `false` to a visitor in the control
|
|
64
|
-
group, and you cannot remove the row, move it, or change its value. It takes a weight like
|
|
65
|
-
any other row.
|
|
66
|
-
|
|
67
|
-
The weights are shares, and not percentages. Picked reduces them to their smallest whole
|
|
68
|
-
numbers, so `10 : 10 : 20` and `1 : 1 : 2` are the same split. The percentage beside each
|
|
69
|
-
row shows the traffic that the variant receives.
|
|
70
|
-
|
|
71
|
-
Choose **Even split** to give every variant the same weight.
|
|
72
|
-
|
|
73
|
-
:::info
|
|
74
|
-
The order of the rows is the order that you read them in. It has no effect on the
|
|
75
|
-
allocation, so you can move a row and no visitor changes group.
|
|
76
|
-
:::
|
|
77
|
-
|
|
78
|
-
## How Picked allocates a visitor
|
|
79
|
-
|
|
80
|
-
The allocation is deterministic. It derives from the visitor ID and from the ID of the
|
|
81
|
-
feature flag. A Boolean feature flag then compares that value against the weight, and a
|
|
82
|
-
Text feature flag compares it against the range of each variant. Each feature flag gets its
|
|
83
|
-
own value, so tests that run at the same time are independent. See
|
|
84
|
-
[About feature flag allocation](/explanation/feature-flag-allocation).
|
|
85
|
-
|
|
86
|
-
## Disable a feature flag
|
|
87
|
-
|
|
88
|
-
A disabled feature flag allocates nobody, and it records nothing. The difference
|
|
89
|
-
from a weight of 0 matters for your reports. The visitor is **not in the test at
|
|
90
|
-
all**, and the visitor is not in the control group.
|
|
91
|
-
|
|
92
|
-
The SDK does not evaluate a disabled feature flag. It stores no decision in the
|
|
93
|
-
browser of the visitor, and it reports no decision to your analytics. Such a feature
|
|
94
|
-
flag is absent from the feature list on every analytics event.
|
|
95
|
-
|
|
96
|
-
An experience whose condition points at a disabled feature flag behaves as though
|
|
97
|
-
the visitor is not in the test. The condition reads as not allocated, and Picked
|
|
98
|
-
records no assignment.
|
|
99
|
-
|
|
100
|
-
This state is temporary, and it discards no decision that Picked made already. A
|
|
101
|
-
visitor who was allocated before keeps that decision in the browser. When you enable the
|
|
102
|
-
feature flag again, Picked continues from that decision, and the visitor stays in the
|
|
103
|
-
group they were already in.
|
|
104
|
-
|
|
105
|
-
:::note
|
|
106
|
-
Expect a step change in your reports when you disable a feature flag: fewer feature
|
|
107
|
-
flags for each visitor, and fewer decision events. That is the feature flag that drops
|
|
108
|
-
out, and you lose no data.
|
|
109
|
-
:::
|
|
110
|
-
|
|
111
|
-
A disabled feature flag stays visible in the developer tools, and a
|
|
112
|
-
[URL override](/reference/sdk/features#overrides-in-the-url) still turns one on for QA.
|
|
113
|
-
|
|
114
|
-
## Feature flag versions
|
|
115
|
-
|
|
116
|
-
Each feature flag has a version number, and it starts at 1. The SDK caches an
|
|
117
|
-
allocation decision in the browser of the visitor under a key, and the version is part
|
|
118
|
-
of that key. The version does nothing else, and it is not an input to the allocation
|
|
119
|
-
value. When you increment the version, the SDK discards those cached decisions. It
|
|
120
|
-
then evaluates every visitor again on the next page load.
|
|
121
|
-
|
|
122
|
-
### What happens when you increment the version
|
|
123
|
-
|
|
124
|
-
- **The SDK invalidates the cached decisions.** The cache key holds the version, so the
|
|
125
|
-
old entry no longer matches and the feature flag counts as undecided.
|
|
126
|
-
- **Picked evaluates each visitor against the current weight.** The allocation is
|
|
127
|
-
deterministic and the version is not one of its inputs, so the same visitor against
|
|
128
|
-
an unchanged weight gives the same result.
|
|
129
|
-
- **You cannot reverse this.** There is no way to decrement a version.
|
|
130
|
-
|
|
131
|
-
:::note
|
|
132
|
-
The new version does not move your visitors between groups. It clears the cached
|
|
133
|
-
decisions and runs the allocation again. With an unchanged weight, everybody lands
|
|
134
|
-
where they were before. Change the weight to move your visitors.
|
|
135
|
-
:::
|
|
136
|
-
|
|
137
|
-
### When to increment
|
|
138
|
-
|
|
139
|
-
Increment the version after you change the weight. Do this when you want Picked to
|
|
140
|
-
evaluate an allocated visitor again against the new weight, and not to use the cached
|
|
141
|
-
decision.
|
|
142
|
-
|
|
143
|
-
### When not to increment
|
|
144
|
-
|
|
145
|
-
To apply a weight change only to a visitor that Picked does not allocate yet, change
|
|
146
|
-
the weight and leave the version as it is. An allocated visitor keeps the current
|
|
147
|
-
allocation.
|
|
148
|
-
|
|
149
|
-
## Related
|
|
150
|
-
|
|
151
|
-
- [About feature flag allocation](/explanation/feature-flag-allocation)
|
|
152
|
-
- [How to run an A/B test](/how-to/run-an-ab-test)
|
|
153
|
-
- [How to read a feature flag](/how-to/read-a-feature-flag)
|
|
154
|
-
- [How to add a step, a field, an action, or a condition](/how-to/add-a-step-field-or-action)
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Screenshot } from '../../../../components/Screenshot'
|
|
7
|
-
|
|
8
|
-
# Fields
|
|
9
|
-
|
|
10
|
-
A field is a data input that a visitor sees inside a step. A field collects
|
|
11
|
-
information such as a name, an email address, a preference, or a choice.
|
|
12
|
-
|
|
13
|
-
This page covers the experience field, which collects visitor input. An experience
|
|
14
|
-
field is not the same as a content field. A content field is part of the schema of a
|
|
15
|
-
CMS layout. See [Models](/reference/dashboard/content/models) for those.
|
|
16
|
-
|
|
17
|
-
<Screenshot
|
|
18
|
-
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/fields"
|
|
19
|
-
alt="The fields list for a workspace on the Picked dashboard"
|
|
20
|
-
/>
|
|
21
|
-
|
|
22
|
-
## Field types
|
|
23
|
-
|
|
24
|
-
A field has one of many types. These are the common ones:
|
|
25
|
-
|
|
26
|
-
`TEXT`: A string input. Use it for a name, an email address, or free text.
|
|
27
|
-
|
|
28
|
-
`NUMBER`: A numeric input. Use it for a quantity, a rating, or an age.
|
|
29
|
-
|
|
30
|
-
`BOOLEAN`: A true or false toggle. Use it for a checkbox or for consent.
|
|
31
|
-
|
|
32
|
-
`OBJECT`: A structured data input. Use it for data that holds other data.
|
|
33
|
-
|
|
34
|
-
## Options
|
|
35
|
-
|
|
36
|
-
**Name**: The name that the dashboard shows. Your visitors do not see it.
|
|
37
|
-
|
|
38
|
-
**Key**: The identifier for your application. You set it once and you cannot change
|
|
39
|
-
it. Your visitors do not see it.
|
|
40
|
-
|
|
41
|
-
**Label**: The label that a visitor sees next to the field.
|
|
42
|
-
|
|
43
|
-
**Placeholder**: The hint text that the input shows while it is empty.
|
|
44
|
-
|
|
45
|
-
**Description**: A longer description of what the field is for. The dashboard shows
|
|
46
|
-
it. Your visitors do not see it.
|
|
47
|
-
|
|
48
|
-
**Help Text**: Text below the field that helps your visitors.
|
|
49
|
-
|
|
50
|
-
**Default Value**: The value that the field holds when it loads.
|
|
51
|
-
|
|
52
|
-
## Validation
|
|
53
|
-
|
|
54
|
-
**Required**: When this is on, a visitor must fill in the field before the flow can
|
|
55
|
-
continue.
|
|
56
|
-
|
|
57
|
-
**Validation rules**: Conditions for a constraint such as a smallest value, a largest
|
|
58
|
-
value, or a pattern. See [Condition Builder](/reference/dashboard/flow-builder/condition-builder) for how
|
|
59
|
-
to build a validation rule.
|
|
60
|
-
|
|
61
|
-
## More than one value
|
|
62
|
-
|
|
63
|
-
Turn on **Multiple** to let a visitor send more than one value for the field. This is
|
|
64
|
-
useful for an input that takes several choices, or for a field of tags.
|
|
65
|
-
|
|
66
|
-
## Choices
|
|
67
|
-
|
|
68
|
-
For a field with a fixed set of choices, such as a dropdown or a set of radio
|
|
69
|
-
buttons, add options. Each option has a value, and the response carries that value.
|
|
70
|
-
|
|
71
|
-
Each option can also carry a condition. When you set one, the option appears only to
|
|
72
|
-
a visitor who matches the condition. See
|
|
73
|
-
[Condition Builder](/reference/dashboard/flow-builder/condition-builder) for more detail.
|
|
74
|
-
|
|
75
|
-
## Privacy
|
|
76
|
-
|
|
77
|
-
A field captures nothing until you permit it. Two checkboxes control where the value of
|
|
78
|
-
a field can go. Both start off.
|
|
79
|
-
|
|
80
|
-
| Checkbox | What it does when you turn it on |
|
|
81
|
-
| --- | --- |
|
|
82
|
-
| **Remember in the browser** | The SDK keeps the value on the device of the visitor. The value is available after a page load. |
|
|
83
|
-
| **Send to analytics** | Picked puts the value in your analytics events. |
|
|
84
|
-
|
|
85
|
-
Each checkbox is independent of the other.
|
|
86
|
-
|
|
87
|
-
A new field that you leave alone sends no value to your analytics. It writes no value to
|
|
88
|
-
the browser. Keep both checkboxes off for sensitive data such as a password, a tax
|
|
89
|
-
number, or a payment detail.
|
|
90
|
-
|
|
91
|
-
Never turn on **Send to analytics** for personal data. A name, an email address, a phone
|
|
92
|
-
number, a home address, or an identity number must not reach your analytics.
|
|
93
|
-
|
|
94
|
-
Neither checkbox stops the flow from the use of the value inside the page. A field that
|
|
95
|
-
captures nothing still holds its value there. The flow validates the step with it, and it
|
|
96
|
-
evaluates the conditions after the step with it. The checkboxes control what leaves the
|
|
97
|
-
page.
|
|
98
|
-
|
|
99
|
-
## Related
|
|
100
|
-
|
|
101
|
-
- [How to add a step, a field, an action, or a condition](/how-to/add-a-step-field-or-action)
|
|
102
|
-
|
|
103
|
-
- [How to validate a field](/how-to/validate-a-field)
|
|
104
|
-
- [How to write a condition](/how-to/write-a-condition) — for a validation rule or an
|
|
105
|
-
option condition.
|
|
106
|
-
- [SDK fields](/reference/sdk/fields) — the `policies` object.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
import { Screenshot } from '../../../../../components/Screenshot'
|
|
7
|
-
|
|
8
|
-
# Flow builder
|
|
9
|
-
|
|
10
|
-
The flow builder is a visual editor for an experience flow. You drag a block onto a
|
|
11
|
-
canvas, connect the blocks with arrows, and set the options of each node in an
|
|
12
|
-
inspector panel.
|
|
13
|
-
|
|
14
|
-
<Screenshot
|
|
15
|
-
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/experiences/{experienceId}"
|
|
16
|
-
alt="The flow builder with the library, canvas, and inspector panels"
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
## Layout
|
|
20
|
-
|
|
21
|
-
The flow builder has three panels, from left to right.
|
|
22
|
-
|
|
23
|
-
**Library**, on the left: it lists every step, action, condition, and field in
|
|
24
|
-
your project. Drag an item from here onto the canvas.
|
|
25
|
-
|
|
26
|
-
**Canvas**, in the middle: the area where you build your flow. A node stands for a
|
|
27
|
-
block. An arrow stands for a connection between two blocks.
|
|
28
|
-
|
|
29
|
-
**Inspector**, on the right: it shows the options of the node that you choose. When
|
|
30
|
-
you choose no node, it shows the settings of the experience.
|
|
31
|
-
|
|
32
|
-
## Panel controls
|
|
33
|
-
|
|
34
|
-
Drag a divider between two panels to change their size. Press `Cmd/Ctrl+\` to turn
|
|
35
|
-
both side panels on and off. Press `Cmd/Ctrl+Shift+\` to turn the inspector on and
|
|
36
|
-
off.
|
|
37
|
-
|
|
38
|
-
## Move around the canvas
|
|
39
|
-
|
|
40
|
-
**Zoom**: scroll to make the view larger or smaller.
|
|
41
|
-
|
|
42
|
-
**Pan**: choose the hand tool with `H`, then drag. You can also hold `Space` and
|
|
43
|
-
drag. A drag with the middle mouse button also pans.
|
|
44
|
-
|
|
45
|
-
**Choose tool**: press `V` to go back to the default tool.
|
|
46
|
-
Click to choose a node. Drag on empty space to choose every node inside a rectangle.
|
|
47
|
-
|
|
48
|
-
## Auto-layout
|
|
49
|
-
|
|
50
|
-
Click the auto-layout button in the toolbar. The flow builder then arranges every
|
|
51
|
-
node into a clean hierarchy. This is useful after you add many nodes, and when the
|
|
52
|
-
canvas becomes messy.
|
|
53
|
-
|
|
54
|
-
## Related
|
|
55
|
-
|
|
56
|
-
- [How to build a flow](/how-to/build-a-flow) — add, connect, and branch.
|
|
57
|
-
- [Keyboard shortcuts](/reference/dashboard/flow-builder/keyboard-shortcuts)
|
|
58
|
-
- [Nodes](/reference/dashboard/flow-builder/nodes)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Condition builder
|
|
7
|
-
|
|
8
|
-
The condition builder is a visual rule editor, and the dashboard uses it in several
|
|
9
|
-
places. With it you define a rule and you write no code.
|
|
10
|
-
|
|
11
|
-
## Where it appears
|
|
12
|
-
|
|
13
|
-
The dashboard uses the condition builder here:
|
|
14
|
-
|
|
15
|
-
- **Condition nodes** — they set which branch the flow takes in the
|
|
16
|
-
[flow builder](/reference/dashboard/flow-builder/canvas).
|
|
17
|
-
- **Experience conditions** — they control when an experience starts for a visitor.
|
|
18
|
-
- **Initialize open conditions** — they control when an experience opens by itself as
|
|
19
|
-
the page loads.
|
|
20
|
-
- **Field option conditions** — they show or hide one option, and the state of the
|
|
21
|
-
visitor decides which.
|
|
22
|
-
|
|
23
|
-
## Rule structure
|
|
24
|
-
|
|
25
|
-
The builder holds your rules in groups. Each group uses **AND** or **OR**. With
|
|
26
|
-
**AND**, every rule must match. With **OR**, one rule must match.
|
|
27
|
-
|
|
28
|
-
A single rule has three parts:
|
|
29
|
-
|
|
30
|
-
1. **Field** — the data source to evaluate.
|
|
31
|
-
2. **Operator** — how to compare. Examples are equals, not equals, greater than, and
|
|
32
|
-
contains.
|
|
33
|
-
3. **Value** — the value to compare against.
|
|
34
|
-
|
|
35
|
-
You can put a group inside another group to build a larger rule. An example is an AND
|
|
36
|
-
group that holds two OR groups.
|
|
37
|
-
|
|
38
|
-
## Data sources
|
|
39
|
-
|
|
40
|
-
A rule can point at these data sources:
|
|
41
|
-
|
|
42
|
-
**Responses** — the values that your visitors send through the form fields of the
|
|
43
|
-
current experience. Each field that you create in your project appears here under its
|
|
44
|
-
name.
|
|
45
|
-
|
|
46
|
-
**Actions** — the actions that ran during the flow.
|
|
47
|
-
|
|
48
|
-
**Feature flags** — the state of each feature flag in your project. Use it to take a
|
|
49
|
-
branch on whether Picked allocates a visitor to a flag.
|
|
50
|
-
|
|
51
|
-
**Location** — the parts of the current page URL of the visitor. These are the
|
|
52
|
-
pathname, the search parameters, the hostname, and the hash.
|
|
53
|
-
|
|
54
|
-
## Related
|
|
55
|
-
|
|
56
|
-
- [How to write a condition](/how-to/write-a-condition) — a worked example.
|
|
57
|
-
- [About conditions and the logic engine](/explanation/conditions-and-the-logic-engine)
|