nevent_quote_campaign
Estimate the credit cost and eligible audience of a campaign BEFORE sending it. Read-only pre-flight check against nev-api POST /campaigns/quote — it never debits credits and never sends. Call this after nevent_create_campaign and before nevent_schedule_campaign: scheduling a campaign the tenant cannot afford fails at send time with a 402. Returns cost (credits required), available (credits in the pool), missing (shortfall), recipientCount, affordable (boolean — the gate to check), blocked, unlimited, and an audience block with uniqueAudience, estimatedEligible per channel, eligibleAnyChannel and emailExclusions (no_email / invalid_email / opt_out / unknown). The audience block is null when the estimate could not be computed: a channel mix that combines WhatsApp with another channel (for example EMAIL_AND_WHATSAPP or ALL_CHANNELS), more than 20 segments, a WhatsApp selection too large for the segmentation budget, or a data-api failure/timeout — cost and recipientCount are still valid in that case. A WHATSAPP_ONLY quote IS estimated (by nev-api, with the same eligibility the send applies: consent of the tenant or its descendants, opt-outs, Meta stops and cooldowns, one recipient per phone) and fills extra audience fields: estimatedEligible.whatsapp (recipients that will receive the message), whatsappExclusions (why audience users do NOT receive it, one count per reason) and whatsappConsentSources (list of {tenantId, tenantName, relation SELF|DESCENDANT, recipients}: whose WhatsApp consent authorises the recipients, sending tenant first). Those three are null/absent for every other channel. Use segment_ids from nevent_list_segments; omit them to quote the full addressable audience. Set transactional=true only for genuinely transactional sends (order confirmations, ticket delivery) — it estimates against the TRANSACTIONAL consent mode, which reaches recipients who opted out of marketing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel": "<channel>"
},
"name": "nevent_quote_campaign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Delivery channel to quote (nev-api CommunicationChannel enum). Legacy values EMAIL/SMS/WHATSAPP are accepted and mapped to the _ONLY variants. WHATSAPP_ONLY returns a WhatsApp-specific audience estimate; mixes that combine WhatsApp with another channel return a null audience block. | |
| segment_ids | No | Segment IDs to quote (optional, max 20). Omit to quote the full addressable audience for the channel. More than 20 segments makes the backend skip the audience estimate. | |
| transactional | No | Whether this is a transactional campaign (default false). Transactional uses the TRANSACTIONAL consent mode for the audience estimate, which reaches recipients who have opted out of marketing. |