Changelog · Change Added
Broadcasts can be declared a promotion
Last updated
miira.broadcast_quoted takes an optional purpose: notice (the default, unchanged) or promotion. A promotion never goes as free text, even with the 24-hour window open: it needs an approved marketing template (otherwise plantilla_invalida) and only reaches clients with granted marketing consent (no_marketing_consent otherwise). US numbers are left out with the new row outcome us_moratorium, which is emitted only for a promotion, so existing integrations never see it. The purpose is signed into the quote.
Actions this change touches
miira.broadcast_quotedQuotes sending the SAME WhatsApp message to several clients named by name (up to 50). Sends NOTHING: per client, it says whether the text goes as-is (24-hour window open, free), whether an approved template is needed and what it costs, or why that client cannot be messaged. Returns a signed quote valid for 15 minutes; to send, call miira.broadcast_sent with it. Show the quote to the person first. Optional `purpose`: `notice` (default) is the usual notice; `promotion` NEVER sends free text, even with the window open, and requires an approved MARKETING template (otherwise plantilla_invalida): it only reaches clients with granted marketing consent (no_marketing_consent otherwise) and leaves US numbers out (us_moratorium). In a promotion `message` is never sent: what goes is the template with its `templateValues`. Use `promotion` for offers and campaigns, never for a reply or a notice.v1miira.broadcast_sentSends the WhatsApp broadcast quoted by miira.broadcast_quoted, exactly to whom and how the quote said. If anything changed (window, consent, rate) it refuses with a new quote to confirm again. Costs money when templates are involved: do not call it without the person having seen the cost.v1