Marketing
Marketing gives you a durable drip/campaign runner, audience resolution and enrollment, abandoned-cart detection, and bounce handling. Campaign sends go out through the platform’s email delivery and honor a single suppression list.
Four capabilities:
- Drip runner — sends each due campaign step, advances the enrollment, and completes at the last step. Exactly-once: each step is sent at most once, so a retry never re-sends a step. Only enrollments whose campaign is active are sent — pausing a campaign stops its sends without losing anyone’s place, and resuming continues from exactly where each enrollment stood.
- Audience resolution + enrollment —
POST .../campaigns/:id/enrollresolves a campaign’s audience and enrolls the matches. - Abandoned-cart — a cart-changed signal (
POST /cart-activity, one signal per(tenant, cart)) feeds abandoned-cart detection; carts idle past a threshold are enrolled into the tenant’s active abandoned-cart campaign, which the drip runner then sends. - Bounce handling — bounce and complaint notifications from the email provider add the bounced address to the suppression list, so every future send to it is blocked.
Tenant-level campaign administration (create, enroll, pause, resume, cancel) is also available operator/console-managed; merchants manage their own campaigns through the merchant routes below.
Merchant routes
fdk_ credential, tenant from the credential per credential-carries-ownership,
scope manage:own_marketing. Mounted at /v1/merchant/marketing — the
portal’s campaign builder.
| Method | Path | Scope | Purpose |
|---|---|---|---|
GET | /v1/merchant/marketing/campaigns | manage:own_marketing | List the caller’s campaigns. |
GET | /v1/merchant/marketing/campaigns/:id | manage:own_marketing | Fetch one campaign. |
GET | /v1/merchant/marketing/campaigns/:id/enrollments | manage:own_marketing | List a campaign’s enrollments. |
POST | /v1/merchant/marketing/campaigns | manage:own_marketing | Create a campaign. Templates are the merchant-sendable subset only (welcome, abandoned-cart, abandoned-cart-reminder) — internal platform templates are refused with a 403. Every step sends from the store’s default sender (no-reply@ your configured sender domain, else the platform sender); a caller-supplied from_address is ignored. |
POST | /v1/merchant/marketing/campaigns/:id/enroll | manage:own_marketing | Enroll the campaign’s audience. |
POST | /v1/merchant/marketing/campaigns/:id/pause | manage:own_marketing | Pause the campaign (drip stops; enrollments keep their place). |
POST | /v1/merchant/marketing/campaigns/:id/resume | manage:own_marketing | Resume a paused campaign. |
POST | /v1/merchant/marketing/campaigns/:id/cancel | manage:own_marketing | Cancel: archive the campaign and end its active enrollments. |
Manifest gates
None of its own. Campaign sending obeys the platform’s suppression and opt-out gates.
Notes
- Audience segmentation is basic —
all/has-ordered/created-afterfilters are supported today; richer segmentation is planned. - A bounce that can’t be attributed to a tenant is held for reconciliation rather than suppressed against a guessed tenant.