Common use cases

Invoice delivery

The customer receives the invoice automatically when it becomes final, with the PDF attached and a way to pay. Create an INVOICE workflow with the TO_FINAL variant, then attach an action that includes the PDF and a payment link:

Workflow and action
$curl -X POST https://test.api.solvimon.com/v1/workflows \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Invoice final delivery",
> "reference": "invoice-final-delivery",
> "type": "INVOICE",
> "status": "DRAFT",
> "invoice": { "variant": "TO_FINAL" }
> }'
$
$curl -X POST https://test.api.solvimon.com/v1/workflow-actions \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "workflow_id": "wf_7KcQm1RtbXeUvL2NpHZ4S",
> "type": "SEND_EMAIL_TO_CUSTOMER",
> "status": "ACTIVE",
> "send_email_to_customer": {
> "integration_id": "intg_9PvTa4XcnRbEwK1MjQZ6L",
> "template_name": "invoice-final",
> "variant": "INVOICE",
> "from": { "name": "Acme Billing", "email": "billing@acme.com" },
> "invoice": {
> "type": "TO_FINAL",
> "include_pdf": true,
> "include_payment_link": true
> }
> }
> }'

Verify: finalize one invoice for a pilot customer, confirm a trigger exists via the API, then check the execution result on the workflow’s page in Desk. See Workflow triggers.

Overdue reminders (dunning)

Stop chasing unpaid invoices by hand and send reminders at consistent intervals instead. Use the OVERDUE variant: each period in overdue.periods produces one reminder, counted from the due date.

Reminders at 7, 15 and 30 days past due
$curl -X POST https://test.api.solvimon.com/v1/workflows \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Overdue reminder 7/15/30",
> "reference": "overdue-reminder-7-15-30",
> "type": "INVOICE",
> "status": "DRAFT",
> "invoice": {
> "variant": "OVERDUE",
> "overdue": {
> "periods": [
> { "type": "DAY", "value": 7 },
> { "type": "DAY", "value": 15 },
> { "type": "DAY", "value": 30 }
> ]
> }
> }
> }'

The action mirrors invoice delivery, with invoice.type set to OVERDUE and a reminder template. Only unpaid invoices are in scope; an invoice that is paid between steps stops receiving reminders.

Verify: check that the intervals that actually fired match the periods you configured. A cadence that drifts usually means two overlapping workflows are both in scope for the same customer.

Failed payments

When a payment fails, tell the customer what happened and what to do next. Use a PAYMENT workflow with the FAILED_PAYMENT variant and a PAYMENT action:

Failed payment notification
$curl -X POST https://test.api.solvimon.com/v1/workflows \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Failed payment notification",
> "reference": "failed-payment-notification",
> "type": "PAYMENT",
> "status": "DRAFT",
> "payment": { "variant": "FAILED_PAYMENT" }
> }'

The email should give the customer one clear next step: update the payment method, pay the invoice, or contact support. See Payment collections for the setup that makes a pay link work.

Free trial reminders

Warn customers before a trial converts, so the first invoice is not a surprise. Use a PRICING_PLAN_SUBSCRIPTION workflow with FREE_TRIAL_REMINDER; periods count backwards from the trial end date.

Remind 7 days and 1 day before trial end
$curl -X POST https://test.api.solvimon.com/v1/workflows \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Free trial ending",
> "reference": "free-trial-ending",
> "type": "PRICING_PLAN_SUBSCRIPTION",
> "status": "DRAFT",
> "pricing_plan_subscription": {
> "variant": "FREE_TRIAL_REMINDER",
> "reminder_periods": [
> { "type": "DAY", "value": 7 },
> { "type": "DAY", "value": 1 }
> ]
> }
> }'

Rolling out safely

The same sequence applies to all four:

1

Build in DRAFT

Create the workflow and its action with status: "DRAFT" so nothing can fire while you configure it.

2

Scope to a pilot

Set customer_ids to one or two internal or friendly customers.

3

Activate and trigger manually

Activate the workflow and the action, then create a MANUAL trigger against a real invoice to see the actual email.

4

Widen the scope

Once the output is right, PATCH the workflow with an empty customer_ids array to cover every customer.