picked 0.0.101-next.2 → 0.0.101

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 (175) hide show
  1. package/README.md +27 -12
  2. package/docs/explanation/conditions-and-the-logic-engine.md +94 -0
  3. package/docs/explanation/content-references.md +99 -0
  4. package/docs/explanation/feature-flag-allocation.md +218 -0
  5. package/docs/explanation/how-picked-works.md +124 -0
  6. package/docs/explanation/how-pickedql-works.md +76 -0
  7. package/docs/explanation/pages-and-flows.md +64 -0
  8. package/docs/explanation/the-content-model.md +87 -0
  9. package/docs/explanation/the-two-apis.md +68 -0
  10. package/docs/explanation/why-server-side-rendering.md +76 -0
  11. package/docs/explanation/workspaces-and-versions.md +71 -0
  12. package/docs/how-to/add-a-step-field-or-action.md +56 -0
  13. package/docs/how-to/analytics/index.md +324 -0
  14. package/docs/how-to/archive-or-delete-a-workspace.md +59 -0
  15. package/docs/how-to/authenticate-the-cli.md +101 -0
  16. package/docs/how-to/authenticate-with-a-magic-link.md +56 -0
  17. package/docs/how-to/authenticate-with-a-password.md +68 -0
  18. package/docs/how-to/authenticate-with-an-api-key.md +60 -0
  19. package/docs/how-to/authenticate-with-oauth.md +49 -0
  20. package/docs/how-to/build-a-flow.md +106 -0
  21. package/docs/how-to/call-an-external-api-from-a-workflow.md +116 -0
  22. package/docs/how-to/connect-the-mcp-server.md +46 -0
  23. package/docs/how-to/create-a-content-entry.md +58 -0
  24. package/docs/how-to/create-a-project.md +40 -0
  25. package/docs/how-to/create-an-experience.md +51 -0
  26. package/docs/how-to/create-and-revoke-an-api-key.md +54 -0
  27. package/docs/how-to/debug-with-the-chrome-extension.md +57 -0
  28. package/docs/how-to/define-a-page-layout.md +54 -0
  29. package/docs/how-to/fill-and-publish-a-page.md +82 -0
  30. package/docs/how-to/install-the-gtm-template.md +84 -0
  31. package/docs/how-to/install-the-sdk.md +93 -0
  32. package/docs/how-to/install-the-vite-plugin.md +69 -0
  33. package/docs/how-to/invite-and-remove-members.md +45 -0
  34. package/docs/how-to/point-one-entry-at-another.md +75 -0
  35. package/docs/how-to/preview-a-workspace.md +39 -0
  36. package/docs/how-to/publish-a-workspace.md +42 -0
  37. package/docs/how-to/read-a-feature-flag.md +113 -0
  38. package/docs/how-to/read-a-referenced-entry.md +109 -0
  39. package/docs/how-to/register-a-component.md +55 -0
  40. package/docs/how-to/register-an-action-handler.md +85 -0
  41. package/docs/how-to/register-an-api-that-uses-oauth2.md +107 -0
  42. package/docs/how-to/render-a-step-form.md +131 -0
  43. package/docs/how-to/render-an-unpublished-preview.md +41 -0
  44. package/docs/how-to/retry-a-failed-call-with-a-loop.md +81 -0
  45. package/docs/how-to/reuse-a-section.md +64 -0
  46. package/docs/how-to/reuse-a-step-field-or-action.md +39 -0
  47. package/docs/how-to/roll-back-a-published-version.md +39 -0
  48. package/docs/how-to/run-an-ab-test.md +59 -0
  49. package/docs/how-to/run-code-on-a-form-submission.md +125 -0
  50. package/docs/how-to/server-render-a-page.md +81 -0
  51. package/docs/how-to/set-a-content-security-policy.md +32 -0
  52. package/docs/how-to/set-up-mfa.md +126 -0
  53. package/docs/how-to/switch-workspaces.md +122 -0
  54. package/docs/how-to/upload-and-use-an-asset.mdx +87 -0
  55. package/docs/how-to/validate-a-field.md +52 -0
  56. package/docs/how-to/wait-for-an-action-response.md +182 -0
  57. package/docs/how-to/write-a-condition.md +57 -0
  58. package/docs/how-to/write-a-predicate.md +60 -0
  59. package/docs/index.md +59 -0
  60. package/docs/reference/dashboard/actions.mdx +65 -0
  61. package/docs/reference/dashboard/api-keys.mdx +47 -0
  62. package/docs/reference/dashboard/conditions.mdx +51 -0
  63. package/docs/reference/dashboard/content/asset-library.mdx +74 -0
  64. package/docs/reference/dashboard/content/blocks.mdx +66 -0
  65. package/docs/reference/dashboard/content/content-entries.mdx +109 -0
  66. package/docs/reference/dashboard/content/models.mdx +119 -0
  67. package/docs/reference/dashboard/content/pages.mdx +72 -0
  68. package/docs/reference/dashboard/experiences.mdx +61 -0
  69. package/docs/reference/dashboard/external-apis.md +182 -0
  70. package/docs/reference/dashboard/features.mdx +165 -0
  71. package/docs/reference/dashboard/fields.mdx +120 -0
  72. package/docs/reference/dashboard/flow-builder/canvas.mdx +58 -0
  73. package/docs/reference/dashboard/flow-builder/condition-builder.md +69 -0
  74. package/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +72 -0
  75. package/docs/reference/dashboard/flow-builder/nodes.md +74 -0
  76. package/docs/reference/dashboard/labels.md +321 -0
  77. package/docs/reference/dashboard/lead-search.md +235 -0
  78. package/docs/reference/dashboard/projects.mdx +53 -0
  79. package/docs/reference/dashboard/reports.mdx +53 -0
  80. package/docs/reference/dashboard/steps.mdx +47 -0
  81. package/docs/reference/dashboard/team-management.md +38 -0
  82. package/docs/reference/dashboard/workflow-runs.md +157 -0
  83. package/docs/reference/dashboard/workflow-templates.md +182 -0
  84. package/docs/reference/dashboard/workflow-test-runs.md +85 -0
  85. package/docs/reference/dashboard/workspace-versioning.mdx +42 -0
  86. package/docs/reference/dashboard/workspaces.mdx +91 -0
  87. package/docs/reference/delivery-api/experience-content.md +152 -0
  88. package/docs/reference/delivery-api/index.md +45 -0
  89. package/docs/reference/delivery-api/preview-caching-crawling.md +79 -0
  90. package/docs/reference/delivery-api/project-config.md +65 -0
  91. package/docs/reference/delivery-api/workspace-schema.md +107 -0
  92. package/docs/reference/glossary.md +201 -0
  93. package/docs/reference/management-api/authentication.md +87 -0
  94. package/docs/reference/management-api/authorization-and-scopes.md +291 -0
  95. package/docs/reference/management-api/error-handling.md +232 -0
  96. package/docs/reference/management-api/pagination.md +192 -0
  97. package/docs/reference/management-api/schema/action.md +261 -0
  98. package/docs/reference/management-api/schema/analytics-session.md +363 -0
  99. package/docs/reference/management-api/schema/analytics.md +73 -0
  100. package/docs/reference/management-api/schema/api-key.md +170 -0
  101. package/docs/reference/management-api/schema/auth.md +1177 -0
  102. package/docs/reference/management-api/schema/cms-fields.md +954 -0
  103. package/docs/reference/management-api/schema/cms-models.md +1155 -0
  104. package/docs/reference/management-api/schema/common.md +362 -0
  105. package/docs/reference/management-api/schema/condition.md +254 -0
  106. package/docs/reference/management-api/schema/design-system.md +199 -0
  107. package/docs/reference/management-api/schema/experience.md +1098 -0
  108. package/docs/reference/management-api/schema/external-api.md +637 -0
  109. package/docs/reference/management-api/schema/feature.md +350 -0
  110. package/docs/reference/management-api/schema/feedback.md +103 -0
  111. package/docs/reference/management-api/schema/field.md +400 -0
  112. package/docs/reference/management-api/schema/index.md +243 -0
  113. package/docs/reference/management-api/schema/integration.md +272 -0
  114. package/docs/reference/management-api/schema/label.md +349 -0
  115. package/docs/reference/management-api/schema/lead.md +340 -0
  116. package/docs/reference/management-api/schema/mcp-server.md +299 -0
  117. package/docs/reference/management-api/schema/metric.md +223 -0
  118. package/docs/reference/management-api/schema/operation.md +96 -0
  119. package/docs/reference/management-api/schema/organization.md +749 -0
  120. package/docs/reference/management-api/schema/project.md +607 -0
  121. package/docs/reference/management-api/schema/report.md +243 -0
  122. package/docs/reference/management-api/schema/saved-view.md +288 -0
  123. package/docs/reference/management-api/schema/shopify.md +795 -0
  124. package/docs/reference/management-api/schema/step.md +273 -0
  125. package/docs/reference/management-api/schema/tenant-branding.md +185 -0
  126. package/docs/reference/management-api/schema/workbench.md +246 -0
  127. package/docs/reference/management-api/schema/workflow-run.md +263 -0
  128. package/docs/reference/management-api/schema/workflow.md +1110 -0
  129. package/docs/reference/management-api/schema/workspace-version.md +823 -0
  130. package/docs/reference/management-api/schema/workspace.md +917 -0
  131. package/docs/reference/pickedql/data-sources.md +174 -0
  132. package/docs/reference/pickedql/dimensions.md +103 -0
  133. package/docs/reference/pickedql/filtering.md +64 -0
  134. package/docs/reference/pickedql/index.md +18 -0
  135. package/docs/reference/pickedql/schema.md +172 -0
  136. package/docs/reference/pickedql/virtual-functions.md +248 -0
  137. package/docs/reference/sdk/actions.md +154 -0
  138. package/docs/reference/sdk/analytics-events.md +453 -0
  139. package/docs/reference/sdk/conditions.md +147 -0
  140. package/docs/reference/sdk/content-security-policy.md +21 -0
  141. package/docs/reference/sdk/content.md +253 -0
  142. package/docs/reference/sdk/experiences.md +51 -0
  143. package/docs/reference/sdk/features.md +256 -0
  144. package/docs/reference/sdk/fields.md +255 -0
  145. package/docs/reference/sdk/index.md +68 -0
  146. package/docs/reference/sdk/plugins/create-experience.md +123 -0
  147. package/docs/reference/sdk/plugins/dynamic-experiences.md +74 -0
  148. package/docs/reference/sdk/plugins/fingerprintjs.md +39 -0
  149. package/docs/reference/sdk/plugins/hotjar.md +60 -0
  150. package/docs/reference/sdk/plugins/index.md +33 -0
  151. package/docs/reference/sdk/plugins/sentry.md +51 -0
  152. package/docs/reference/sdk/plugins/shopify.md +109 -0
  153. package/docs/reference/sdk/plugins/window-object.md +25 -0
  154. package/docs/reference/sdk/predicates.md +43 -0
  155. package/docs/reference/sdk/react.md +61 -0
  156. package/docs/reference/sdk/ssr/index.md +33 -0
  157. package/docs/reference/sdk/ssr/rendering-and-hydration.md +103 -0
  158. package/docs/reference/sdk/ssr/serialize.md +80 -0
  159. package/docs/reference/sdk/ssr/slots-and-placements.md +113 -0
  160. package/docs/reference/sdk/steps.md +86 -0
  161. package/docs/reference/sdk/svelte.md +74 -0
  162. package/docs/reference/sdk/type-generation.md +265 -0
  163. package/docs/reference/tools/admin-api-client.md +89 -0
  164. package/docs/reference/tools/chrome-extension.md +16 -0
  165. package/docs/reference/tools/cli.md +319 -0
  166. package/docs/reference/tools/delivery-api-client.md +60 -0
  167. package/docs/reference/tools/image-optimisation-service.md +104 -0
  168. package/docs/reference/tools/mcp-run.md +121 -0
  169. package/docs/reference/tools/mcp.md +391 -0
  170. package/docs/reference/tools/vite-plugin.md +163 -0
  171. package/docs/tutorials/first-api-call.md +253 -0
  172. package/docs/tutorials/first-experience-in-the-dashboard.mdx +160 -0
  173. package/docs/tutorials/first-experience.mdx +254 -0
  174. package/docs/tutorials/first-server-rendered-page.mdx +186 -0
  175. package/package.json +8 -7
@@ -0,0 +1,182 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Workflow templates
7
+
8
+ A template is text with `{{ … }}` in it. Picked fills it with data from the run before the
9
+ node uses it. A tool node can have a template in each of its fields. A condition node can
10
+ have a template in a text value of its rule.
11
+
12
+ ## Data that a template reads
13
+
14
+ | Root | Data | Example |
15
+ | ----------------- | ---------------------------------------------------------------------- | -------------------------------- |
16
+ | `trigger` | The event or the action that started the run. | `trigger.action.responses.email` |
17
+ | `nodes.<node-id>` | The output of the last visit to a tool node. Refer to [Loops](#loops). | `nodes.n2.leads[0].id` |
18
+ | `run` | The run. Refer to [Variables](#variables). | `run.startedAt` |
19
+ | `workflow` | The workflow. Refer to [Variables](#variables). | `workflow.name` |
20
+ | `current` | The node that reads the data. Refer to [Variables](#variables). | `current.visit` |
21
+
22
+ A template writes an index as `[0]`, such as `leads[0].id`. The `var` operator of a rule
23
+ reads the same paths, and writes an index as a segment, such as `leads.0.id`.
24
+
25
+ In the editor, the **Insert reference** button of a field shows the data that the node can
26
+ read. The **Previous steps** tab shows `trigger` and `nodes`. The **Variables** tab shows
27
+ `run`, `workflow` and `current`.
28
+
29
+ ## Variables
30
+
31
+ | Path | Type | Value |
32
+ | ------------------- | ------------- | ----------------------------------------------------------------------------------------- |
33
+ | `run.id` | Text | The ID of the run, such as `wkrun_…`. In a test run, the ID of the test run. |
34
+ | `run.startedAt` | Text | The time that Picked recorded the run. In a test run, the time that the test run started. |
35
+ | `run.preview` | True or false | True for a run of the draft from a preview of the workspace, and for a test run. |
36
+ | `workflow.id` | Text | The ID of the workflow. |
37
+ | `workflow.name` | Text | The name of the workflow. |
38
+ | `current.id` | Text | The ID of the node that reads the variable. |
39
+ | `current.startedAt` | Text | The time that the node started. If the node starts again, the time of the last start. |
40
+ | `current.visit` | Number | The number of the visit to the node, from 1. On a loop, each visit adds 1. |
41
+
42
+ A time is ISO 8601 in UTC, such as `2026-10-12T21:30:00.000Z`. The `date` filter changes the
43
+ format and the timezone.
44
+
45
+ Picked sets `run.startedAt` and `run.preview` one time, when it records the run. All the
46
+ nodes of the run read the same values.
47
+
48
+ Picked gets the `current` values when the node starts, and records the result of the node:
49
+
50
+ - When a run continues after a stop, Picked uses the recorded results of the nodes that ran.
51
+ It does not run these nodes again.
52
+ - If a node stops before Picked records its result, Picked starts the node again. The node
53
+ gets a new `current.startedAt`.
54
+ - Picked does not start a failed node again. The run continues on the error exit of the node,
55
+ or stops at the node. Refer to the
56
+ [Workflow runs reference](/reference/dashboard/workflow-runs#run-status).
57
+ - When the `retry` argument of an **External API** node is on, the node can send its request
58
+ more than one time. Each request uses the values that the node got when it started.
59
+
60
+ When you save a workflow, Picked refuses a path below `run`, `workflow` or `current` that is
61
+ not in this table. It also refuses `run`, `workflow` or `current` without a path below it.
62
+ The error shows the path.
63
+
64
+ ## Loops
65
+
66
+ A run can visit a node more than one time, on a loop. The path `nodes.<node-id>` gives the output of
67
+ the last visit to that node that has a result. This is a visit that succeeded, or a visit
68
+ that failed with an error.
69
+
70
+ A node can read a node that comes after it on the loop. On the first visit, that node did
71
+ not run, so the path has no value. In a condition, the value is `null`. In the editor,
72
+ **Insert reference** shows these nodes with `(from the previous pass)`.
73
+
74
+ ## Templates in a condition
75
+
76
+ A text value in a rule can have a template. Picked fills the template before it checks the
77
+ rule.
78
+
79
+ | Value | Result |
80
+ | -------------------------------------------------------- | ------------------------------------------------- |
81
+ | Only one `{{ … }}`, such as `"{{ nodes.n2.count }}"` | The value with its type. A number stays a number. |
82
+ | Text with a `{{ … }}` in it, such as `"id-{{ run.id }}"` | Text. |
83
+ | Only one `{{ … }}`, with no value | `null`. |
84
+
85
+ A value that is only one `{{ … }}` must give text, a number, `true`, `false` or `null`. If it
86
+ gives a list or an object, the condition stops with the code `condition_failed`. Text with a
87
+ `{{ … }}` in it always gives text, also when the `{{ … }}` gives a list.
88
+
89
+ Picked fills all the templates of a rule before it checks the rule. This includes a template
90
+ in a part of `if`, `and` or `or` that the rule does not use. A template that gives a list or
91
+ an object stops the condition, also when the rule does not use that part.
92
+
93
+ A template in the rule of `map`, `filter`, `reduce`, `all`, `some` or `none` reads the data of
94
+ the run. Picked fills it one time, before it checks the rule. It does not read the item.
95
+
96
+ In a rule, only `{{` starts a template. A text value with only `{% … %}` in it stays as you
97
+ write it. In a field of a tool node, `{% … %}` also starts a template.
98
+
99
+ These values cannot have a template. Picked refuses the workflow when you save it:
100
+
101
+ - The path of `var`.
102
+ - The pattern and the flags of `regexp_matches`.
103
+ - The message of `throw`.
104
+
105
+ When you save a workflow, Picked checks each path in a template of a rule. It checks them as
106
+ it checks a template in a tool node.
107
+
108
+ ## The `sha256` filter
109
+
110
+ The `sha256` filter changes a value to its SHA-256 hash. The hash has 64 characters. Each
111
+ character is a digit or a lowercase letter from `a` to `f`. You can use the filter in a tool
112
+ node and in a rule.
113
+
114
+ | Value | Result |
115
+ | ------------------------------ | ------------------------------------------------------------------------- |
116
+ | Text | The hash of the text in UTF-8. Picked does not remove spaces in the text. |
117
+ | A number, `true` or `false` | The hash of the value as text. The number `42` gives the hash of `"42"`. |
118
+ | No value, `null` or empty text | Empty text. |
119
+ | A list or an object | The template stops. |
120
+
121
+ The filter does not take an argument. A template that gives an argument to the filter stops.
122
+
123
+ When a template stops, its node stops:
124
+
125
+ - A tool node stops with a message that ends in `a template could not be rendered`. The node
126
+ does not use its error exit.
127
+ - A condition stops with the code `condition_failed`.
128
+
129
+ Picked does not have the `hmac_sha256` filter. When you save a workflow, Picked refuses a
130
+ template that uses it.
131
+
132
+ ### A hash as a label key
133
+
134
+ The namespace and the key of a label row can have a template. A hash fits the format of a
135
+ label key. A namespace or a key has 1 to 64 characters, and a hash has 64 characters. A key
136
+ that has a hash cannot have other text. Put other text in the namespace, for example
137
+ `cms-lock-email`.
138
+
139
+ When you save a workflow, Picked does not check the format of a namespace or a key that has a
140
+ template. Picked checks the result when the node runs. If the result is not a correct namespace
141
+ or key, the node stops. The node does not use its error exit.
142
+
143
+ An empty key is not correct. Put the `default` filter before `sha256` when the template can
144
+ give no value:
145
+
146
+ ```
147
+ {{ trigger.action.responses.email | default: run.id | sha256 }}
148
+ ```
149
+
150
+ ## Example: a rule for a time of day
151
+
152
+ This rule is true on days 1 to 5 of the week, from 08:00 to 16:59, in the timezone
153
+ `Australia/Sydney`:
154
+
155
+ ```json
156
+ {
157
+ "and": [
158
+ { "<=": ["{{ current.startedAt | date: '%u', 'Australia/Sydney' | plus: 0 }}", 5] },
159
+ { ">=": ["{{ current.startedAt | date: '%H', 'Australia/Sydney' | plus: 0 }}", 8] },
160
+ { "<": ["{{ current.startedAt | date: '%H', 'Australia/Sydney' | plus: 0 }}", 17] }
161
+ ]
162
+ }
163
+ ```
164
+
165
+ - `%u` gives the ISO day of the week, from 1 to 7.
166
+ - `%H` gives the hour, from `00` to `23`.
167
+ - `plus: 0` changes the text to a number.
168
+
169
+ The offset of `Australia/Sydney` from UTC changes two times each year. The `date` filter
170
+ follows the offset that applies on the date of the time.
171
+
172
+ | Node started at, in UTC | Time in `Australia/Sydney` | Branch |
173
+ | ----------------------- | ----------------------------- | ------- |
174
+ | `2026-10-12T21:30:00Z` | Day 2, 08:30, offset `+11:00` | `true` |
175
+ | `2026-06-12T21:30:00Z` | Day 6, 07:30, offset `+10:00` | `false` |
176
+
177
+ ## Related
178
+
179
+ - [Workflow test runs](/reference/dashboard/workflow-test-runs) — run the draft of a
180
+ workflow one time, and see the values that each node read.
181
+ - [How to call an external API from a workflow](/how-to/call-an-external-api-from-a-workflow)
182
+ — read the answer of a call in a later node.
@@ -0,0 +1,85 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Workflow test runs
7
+
8
+ A test run runs the draft of a workflow one time, with the trigger input that you give.
9
+ It shows what each node did. It saves nothing, so you can test a change before you
10
+ publish it.
11
+
12
+ ## Where to start a test run
13
+
14
+ | Page | Address | Content |
15
+ | -------- | ----------------------------- | ------------------------------------------------------------------------------- |
16
+ | Test run | `…/workflows/<workflow>/test` | The trigger form and the result. Open it with the **Test** tab of the workflow. |
17
+
18
+ You must have the scope `ORGANIZATION_WORKSPACE_UPDATE` and each scope that the workflow
19
+ uses. The page names each scope that you do not have.
20
+
21
+ ## Trigger input
22
+
23
+ | Trigger | Input | Meaning |
24
+ | ------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | Action | One input for each action field | The answer to that field. Nodes read it as `trigger.action.responses.<key>`. If a field is empty and not required, the run sends no answer for it. |
26
+ | Event | **Entity ID** | The entity that the event is about. Nodes read it as `trigger.entityId`. An empty field uses the workspace. |
27
+
28
+ Each action field gets the input for its type:
29
+
30
+ | Field | Input |
31
+ | ---------------------- | -------------------------------------------------- |
32
+ | Text | A text box. |
33
+ | Number | A number box. The value must be a number. |
34
+ | True or false | A checkbox. |
35
+ | Record | A box for JSON. The value must be valid JSON. |
36
+ | Field with options | A list to choose one option. |
37
+ | Field with many values | Checkboxes for options, or one value on each line. |
38
+
39
+ A required field must have a value before the test run starts.
40
+
41
+ ## What runs
42
+
43
+ | Node | In a test run |
44
+ | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
45
+ | Tool that reads, such as **Search leads** or an **External API** `GET` or `HEAD` | Runs. |
46
+ | Tool that writes, such as **Create lead**, **Set lead labels** or an **External API** `POST` | Does not run. The result shows the input that it would send. |
47
+ | **Set run labels** and **Remove run labels** | Do not run, because Picked does not keep a test run. The result shows the input that they would send. |
48
+ | **Get run** | Runs, and gives the ID of the test run, which starts with `test_`, and no labels. |
49
+ | Condition | Runs, and shows the branch that it took. |
50
+ | Wait | Does not wait. |
51
+
52
+ A later node that reads the output of a skipped node gets no value.
53
+
54
+ A test run does not wait on a loop. It goes around the loop until a condition takes the
55
+ exit, or until a node gets to the visit cap. Each visit shows as a node of the result, and
56
+ a later visit shows its number, such as `visit 2`. Refer to the
57
+ [workflow runs reference](/reference/dashboard/workflow-runs#visit-cap).
58
+
59
+ ## Result
60
+
61
+ | Status | Meaning |
62
+ | ----------- | ------------------------------------------------ |
63
+ | `Succeeded` | The node did its work. |
64
+ | `Skipped` | The tool writes, so the test run did not run it. |
65
+ | `Failed` | The node failed, and shows the reason. |
66
+
67
+ When a node fails, the test run stops at that node and shows `Failed`. If an edge leaves
68
+ the error exit of the node, the test run continues on that edge as a run does, and can
69
+ show `Completed`. Refer to the [workflow runs reference](/reference/dashboard/workflow-runs#run-status).
70
+
71
+ Each node shows its input and its output. A test run does not show in **Runs**, and it
72
+ does not create or change leads or labels.
73
+
74
+ ## Run variables
75
+
76
+ A test run gives its own values to `run.id`, `run.startedAt` and `run.preview`. Refer to
77
+ [Workflow templates](/reference/dashboard/workflow-templates#variables).
78
+
79
+ ## API and MCP
80
+
81
+ 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).
82
+
83
+ | Task | GraphQL | MCP tool | Run |
84
+ | --- | --- | --- | --- |
85
+ | Start a test run | [`workflowTestRun`](/reference/management-api/schema/workflow#workflowtestrun) | [`test_run_workflow`](/reference/tools/mcp#test_run_workflow) | `tools.test_run_workflow({ workflow_id })` |
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ import { Screenshot } from '../../../../components/Screenshot'
7
+
8
+ # Workspace versioning
9
+
10
+ When you publish, Picked makes an immutable snapshot of your workspace. A project
11
+ always serves exactly one version, the *live* version. A roll-back moves the live
12
+ pointer of the project to an earlier snapshot. It changes no data.
13
+
14
+ <Screenshot
15
+ route="/{orgSlug}/{projectId}/publish-history"
16
+ alt="The Publish history page with published workspace versions and the Live and Restore actions"
17
+ hide={['[data-testid="version-row-relative-time"]']}
18
+ />
19
+
20
+ ## Publish history
21
+
22
+ The **Publish history** page lists each published version of every workspace in the
23
+ project, the newest first. The version that Picked serves now carries a **Live**
24
+ badge.
25
+
26
+ ## API and MCP
27
+
28
+ 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).
29
+
30
+ | Task | GraphQL | MCP tool | Run |
31
+ | --- | --- | --- | --- |
32
+ | List the published versions | [`project`](/reference/management-api/schema/project#project) | [`list_workspace_versions`](/reference/tools/mcp#list_workspace_versions) | `tools.list_workspace_versions({ project_id })` |
33
+ | Restore a version | [`workspaceVersionPublish`](/reference/management-api/schema/workspace#workspaceversionpublish) | [`guide_workspace_version_publish`](/reference/tools/mcp#guide_workspace_version_publish) | `tools.guide_workspace_version_publish({ workspace_version_id })` |
34
+
35
+ The MCP server does not restore a version. `guide_workspace_version_publish` gives the
36
+ link to the **Publish history** page in the dashboard.
37
+
38
+ ## Related
39
+
40
+ - [About workspaces and versions](/explanation/workspaces-and-versions) — why a roll-back
41
+ changes no data.
42
+ - [How to roll back a published version](/how-to/roll-back-a-published-version)
@@ -0,0 +1,91 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ import { Screenshot } from '../../../../components/Screenshot'
7
+
8
+ # Workspaces
9
+
10
+ A workspace is one version of the configuration of your project. Use a workspace to hold
11
+ a change, to see a preview of it, and to publish it when it is ready.
12
+
13
+ <Screenshot
14
+ route="/{orgSlug}/{projectId}/workspaces"
15
+ alt="The workspaces list inside a project on the Picked dashboard"
16
+ hide={['[data-testid="workspace-row-relative-time"]']}
17
+ />
18
+
19
+ ## How workspaces work
20
+
21
+ Each project has a workspace that holds your experiences, feature flags, steps, fields,
22
+ actions, and conditions. When you make a change in the dashboard, that change stays in
23
+ the workspace until you publish it. A change to a flow, to a feature flag, or to a step
24
+ all behave the same way.
25
+
26
+ A workspace is in one of three states:
27
+
28
+ - **Live** — the workspace that the SDK serves to your visitors. Each project has
29
+ exactly one live workspace.
30
+ - **Draft** — a workspace that no visitor sees. You can edit a draft, see a preview
31
+ of it, and publish it to make it live.
32
+ - **Archived** — a draft that you put to one side. An archived workspace is still
33
+ editable, but it does not appear in the default workspaces list.
34
+
35
+ ## Change previews
36
+
37
+ The publish modal shows a side-by-side change preview. It compares the current
38
+ workspace against the last published snapshot. Use it to see exactly what your
39
+ visitors get after you publish.
40
+
41
+ <Screenshot
42
+ route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/experiences?action=publish"
43
+ alt="The publish modal with a change preview of added experiences, steps, and conditions"
44
+ selector='[role="dialog"]'
45
+ wait='[role="dialog"]'
46
+ hide={['[data-testid="publish-diff-replaces-version"]']}
47
+ renderWidth={720}
48
+ renderHeight={579}
49
+ />
50
+
51
+ The preview puts the changes into groups: experiences, feature flags, steps, fields,
52
+ actions, and conditions. Each row shows whether the record was **added**, **removed**,
53
+ or **modified**. For a modified record, expand the row to see which properties changed.
54
+
55
+ Some changes break other records. An example is a field that you remove while other
56
+ steps still point at it. The change preview shows a banner above the diff for these
57
+ entries, so that you can look at them again before you publish.
58
+
59
+ The first publish of a workspace has no earlier snapshot to compare against. The
60
+ publish modal shows the contents of the workspace as the first publish, with no diff.
61
+
62
+ ## Unpublished changes
63
+
64
+ The workspace records whether anything changed since the last publish. The toolbar then
65
+ shows a warning badge. It counts a change to any of these:
66
+
67
+ - An experience or a feature flag.
68
+ - A step, a field, an action, or a condition.
69
+
70
+ ## API and MCP
71
+
72
+ 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).
73
+
74
+ | Task | GraphQL | MCP tool | Run |
75
+ | --- | --- | --- | --- |
76
+ | List the workspaces | [`project`](/reference/management-api/schema/project#project) | [`list_workspaces`](/reference/tools/mcp#list_workspaces) | `tools.list_workspaces({ project_id })` |
77
+ | Open a preview of the workspace | [`workspace`](/reference/management-api/schema/workspace#workspace) | [`get_preview_url`](/reference/tools/mcp#get_preview_url) | `tools.get_preview_url({ workspace_id, target_url })` |
78
+ | See the changes that you publish | [`workspaceDiff`](/reference/management-api/schema/workspace-version#workspacediff) | [`compare_workspace_versions`](/reference/tools/mcp#compare_workspace_versions) | `tools.compare_workspace_versions({ compare_workspace_id })` |
79
+ | Publish the workspace | [`workspacePublish`](/reference/management-api/schema/workspace#workspacepublish) | [`guide_publish_workspace`](/reference/tools/mcp#guide_publish_workspace) | `tools.guide_publish_workspace({ workspace_id })` |
80
+ | Find unpublished changes | [`workspace`](/reference/management-api/schema/workspace#workspace) | [`get_workspace_overview`](/reference/tools/mcp#get_workspace_overview) | `tools.get_workspace_overview({ workspace_id })` |
81
+
82
+ The MCP server does not publish. `guide_publish_workspace` gives the link to the
83
+ **Publish** button in the dashboard.
84
+
85
+ ## Related
86
+
87
+ - [About workspaces and versions](/explanation/workspaces-and-versions) — why a draft and
88
+ a version are separate.
89
+ - [How to see a preview of a workspace](/how-to/preview-a-workspace)
90
+ - [How to publish a workspace](/how-to/publish-a-workspace)
91
+ - [How to archive or delete a workspace](/how-to/archive-or-delete-a-workspace)
@@ -0,0 +1,152 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Experience Content Endpoint
7
+
8
+ Fetch the content entries that back the steps of a single experience.
9
+
10
+ ## Request
11
+
12
+ ```
13
+ GET /api/v1/projects/:projectId/experiences/:id/content
14
+ ```
15
+
16
+ | Parameter | In | Description |
17
+ | --- | --- | --- |
18
+ | `projectId` | path | The project the experience belongs to. |
19
+ | `id` | path | The experience to fetch content for. |
20
+ | `preview_token` | query | Optional. With it, the endpoint returns preview content, which is unpublished. |
21
+
22
+ ## Response
23
+
24
+ ```json
25
+ {
26
+ "experienceId": "exp_123",
27
+ "versionId": "ver_456",
28
+ "content": [
29
+ {
30
+ "id": "entry_789",
31
+ "contentModelKey": "page-hero",
32
+ "data": {
33
+ "title": "Spring sale",
34
+ "category": { "contentEntryId": "entry_42", "contentModelKey": "category" }
35
+ }
36
+ }
37
+ ],
38
+ "references": [
39
+ {
40
+ "id": "entry_42",
41
+ "contentModelKey": "category",
42
+ "data": { "name": "Outerwear" }
43
+ }
44
+ ]
45
+ }
46
+ ```
47
+
48
+ | Field | Type | Description |
49
+ | --- | --- | --- |
50
+ | `experienceId` | `string` | The experience the content belongs to. |
51
+ | `versionId` | `string \| null` | The published version id, or `null` on preview. |
52
+ | `content[]` | `array` | The entries that the steps of the experience point at. |
53
+ | `content[].id` | `string` | The content entry id. |
54
+ | `content[].contentModelKey` | `string \| null` | The Key of the Model, or `null` when it cannot be resolved. |
55
+ | `content[].data` | `object` | The entry data. It matches the schema of the Model. |
56
+ | `references[]` | `array` | Every entry that a `reference` field reaches, in the same blob shape as `content[]`. |
57
+
58
+ The published response and the preview response hold the same fields, and the same
59
+ values, for the same content.
60
+
61
+ ## A reference field points at a separate blob
62
+
63
+ A [Reference field](/reference/dashboard/content/models#reference-fields) arrives as a
64
+ pointer, and not as the entry:
65
+
66
+ ```json
67
+ { "contentEntryId": "entry_42", "contentModelKey": "category" }
68
+ ```
69
+
70
+ A repeatable Reference field arrives as an array of such pointers.
71
+
72
+ The entry itself arrives in `references[]` under its own `id`. Look the pointer up
73
+ there. The SDK does this for you, through
74
+ [`useReference` and `getReference`](/reference/sdk/content).
75
+
76
+ `references[]` holds each entry one time, for any number of fields that point at it. It
77
+ omits the entries that are in `content[]` already.
78
+
79
+ ### What `references[]` omits
80
+
81
+ Picked resolves a chain of references to a maximum depth of 5. It counts the depth from
82
+ the entries in `content[]`. An entry is absent from `references[]` when Picked cannot
83
+ resolve it:
84
+
85
+ | Cause | Result |
86
+ | --- | --- |
87
+ | The target was deleted | The pointer stays. The entry is absent. |
88
+ | The target is in another workspace | The pointer stays. The entry is absent. |
89
+ | The chain makes a cycle | The pointer stays. The entry is absent. |
90
+ | The chain is deeper than 5 | The pointer stays, with its `contentModelKey`. The entry is absent. |
91
+
92
+ A pointer with no entry in `references[]` means that there is no such entry. Picked sends
93
+ no empty blob for it.
94
+
95
+ :::warning
96
+ A reference pointer also carries a `data` field with the content of the target inlined.
97
+ This is for the SDK versions that came before `references[]`. Read `references[]`
98
+ instead. A later release removes the inline copy.
99
+ :::
100
+
101
+ ## An HTML asset comes back in the response
102
+
103
+ A Model can have an [HTML asset](/reference/dashboard/content/asset-library) field. The
104
+ value of that field arrives inside the response. The endpoint changes the reference to
105
+ `{ id, content }`. There, `content` holds the HTML that you uploaded, as a string. It
106
+ is `null` when the endpoint cannot resolve it:
107
+
108
+ ```json
109
+ {
110
+ "id": "entry_789",
111
+ "contentModelKey": "page-hero",
112
+ "data": {
113
+ "markup": { "id": "asset_42", "content": "<section>...</section>" }
114
+ }
115
+ }
116
+ ```
117
+
118
+ The SDK renders the inlined HTML directly, with no extra storage fetch.
119
+
120
+ ## Status codes
121
+
122
+ | Code | Meaning |
123
+ | --- | --- |
124
+ | `200` | Success. |
125
+ | `401` | Invalid `preview_token`. |
126
+ | `404` | The experience has no published content. |
127
+
128
+ ## Example
129
+
130
+ ```bash
131
+ curl https://api.picked.app/api/v1/projects/proj_123/experiences/exp_123/content
132
+ ```
133
+
134
+ ```json
135
+ {
136
+ "experienceId": "exp_123",
137
+ "versionId": "ver_456",
138
+ "content": [
139
+ { "id": "entry_789", "contentModelKey": "page-hero", "data": { "title": "Spring sale" } }
140
+ ],
141
+ "references": []
142
+ }
143
+ ```
144
+
145
+ ## Related
146
+
147
+ - [About the two APIs](/explanation/the-two-apis)
148
+ - [About content references](/explanation/content-references) — why a reference is a pointer.
149
+ - [Content](/reference/sdk/content) — how the SDK resolves a pointer.
150
+ - [Project config](/reference/delivery-api/project-config) — the endpoint that links a step to an entry.
151
+ - [Server Snapshot](/reference/sdk/ssr/serialize) — how the SDK reads this content.
152
+ - [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling)
@@ -0,0 +1,45 @@
1
+ ---
2
+ type: reference
3
+ layout: docs
4
+ ---
5
+
6
+ # Delivery API
7
+
8
+ The Delivery API is a public REST API. It is read-only, and it serves the published
9
+ configuration of your project together with your page content. It is separate from the
10
+ GraphQL management API.
11
+
12
+ ## Base URL and versioning
13
+
14
+ All Delivery API routes are versioned under `/api/v1`:
15
+
16
+ ```
17
+ https://api.picked.app/api/v1
18
+ ```
19
+
20
+ ## Published content and preview content
21
+
22
+ Each endpoint serves two surfaces:
23
+
24
+ - **Published** content is anonymous. Anybody can read your published configuration and
25
+ your published content.
26
+ - **Preview** content needs a `preview_token` query parameter. With it you can render
27
+ an unpublished draft before you make it live.
28
+
29
+ The management API holds the preview token of a workspace in the `previewToken`
30
+ field. The preview action in the dashboard also makes one for you.
31
+
32
+ ## Endpoints
33
+
34
+ | Endpoint | Description |
35
+ | --- | --- |
36
+ | [Project Config](/reference/delivery-api/project-config) | `GET /api/v1/projects/:projectId` returns the published configuration of the project, with the content link of each step. |
37
+ | [Experience Content](/reference/delivery-api/experience-content) | `GET /api/v1/projects/:projectId/experiences/:id/content` returns the Content Entries of an experience. |
38
+
39
+ Both endpoints share some behaviour. See
40
+ [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling).
41
+
42
+ ## Related
43
+
44
+ - [About the two APIs](/explanation/the-two-apis) — which one to use, and why they are
45
+ separate.