sally docs
This page is rendered from the canonical GitHub docs. Edit on GitHub.

Sally Marketing local test recipe

Marketing is enabled in Community by default. Run migrations and start Sally normally; no feature or edition environment override is required or supported.

Browser flow

Open:

http://localhost:3000/marketing

Recommended test order:

  1. Go to System → Email / SMTP senders and create a sender.
    • SMTP: host, port, user, password, from email.
    • AWS SES: region and from email; prefer AWS credentials from environment.
  2. Click Check on the sender.
  3. Go to Fields and create a test custom field, for example interests as MULTI_SELECT with options recipes,events.
  4. Go to Contacts and create a test contact, or create one through /marketing/submissions with fields.interests.
  5. Go to Audiences and create a test audience.
  6. Open the audience modal and either add the contact manually or save a segment rule such as interests contains recipes, then click Sync.
  7. Go to Messages and create a message with the audience and sender.
  8. Open the message modal, edit subject/body, and send a test.
  9. Click Create send approval.
  10. Go to Approvals and approve the proposal.
  11. Run the worker:
pnpm --filter api marketing:worker
  1. Return to Overview, Deliveries, or the message modal and inspect recent deliveries. Open a delivery to see attempts, provider id, failure reason, events, and retry action.

Submission/content gate API

Create a content gate in Content Gates, then submit:

curl -X POST http://localhost:4000/marketing/submissions \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'x-workspace-id: WORKSPACE_ID' \
  -H 'content-type: application/json' \
  -d '{
    "source":"recipe-form",
    "gateKey":"recipe-access",
    "email":"reader@example.com",
    "firstName":"Reader",
    "consent":{"newsletter":true,"text":"I want the recipe newsletter"}
  }'

For AFTER_SUBMISSION gates, Sally returns an opaque accessToken that the website can store first-party or use request-local.