guidedFlowPreview
Requires permission settings:tenant:update.
Previews one step of a product finder (guided flow) for the picks made so far, using a draft flow that has not been saved. The draft is validated as a save would validate it, and nothing is written. Requires permission to update tenant settings.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query GuidedFlowPreview($flow: JSON!, $path: [GuidedPickInput!]!) {
guidedFlowPreview(flow: $flow, path: $path) {
display
flowId
kind
label
opensProduct
search
contextCategory {
id
code
name
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query GuidedFlowPreview($flow: JSON!, $path: [GuidedPickInput!]!) {\n guidedFlowPreview(flow: $flow, path: $path) {\n display\n flowId\n kind\n label\n opensProduct\n search\n contextCategory {\n id\n code\n name\n }\n }\n}",
"variables": {
"flow": {},
"path": [
{
"stepKey": "string",
"value": "string"
}
]
}
}
EOF
Variables:
{
"flow": {},
"path": [
{
"stepKey": "string",
"value": "string"
}
]
}
Response:
{
"data": {
"guidedFlowPreview": {
"display": "LIST",
"flowId": "id",
"kind": "OPTIONS",
"label": "string",
"opensProduct": true,
"search": true,
"contextCategory": {
"id": "id",
"code": "string",
"name": "string"
}
}
}
}
guidedFlowPreview(
entry: GuidedEntryInput
flow: JSON!
path: [GuidedPickInput!]!
): GuidedStepResult!
Arguments
guidedFlowPreview.entry ● GuidedEntryInput input
Preview as if opened from this; ignored unless it would open this flow
guidedFlowPreview.flow ● JSON! non-null scalar
The draft guided flow, in the shape the editor saves.
guidedFlowPreview.path ● [GuidedPickInput!]! non-null input
The picks made so far, each with the step it answered and the value chosen.
Type
GuidedStepResult object
The next step of a guided flow, or its final result.