Draft an email flow
draftFlowWrite the emails of one automated flow and save them with the flow off, replacing the steps it had: up to eight emails, each with how long it waits (the first after the flow starts, the rest after the email before), a brief, an optional subject, and what stops the sequence before it (they bought, or opened or clicked the email before). A personal email is written for each shopper when it sends, from the brief and what started the flow (their cart, their order); a written one is written now, so the person can read it in Kooga first. The flow has to be off: one that is on is refused, because shoppers part-way through it would find its steps changed. Turning it on is enableFlow, which asks the person. Without a store, only the welcome flow.
Only for a workspace with subscribed email contacts.
A change inside Kooga: it runs at once, as the person.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which flow to write | |
| steps | Yes | The emails, in the order they go | |
| couponPct | No | Win-back only: a comeback discount, in percent | |
| workspaceId | No | The workspace, as listWorkspaces gives it (its id or slug). Leave it out when this connection reaches one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| on | Yes | Whether the flow is on; a drafted flow is off | |
| kind | Yes | ||
| steps | Yes |