Results

SDK platic.campaigns.funnel()
SDK platic.campaigns.report()
SDK platic.campaigns.runs.export()

Read campaign results in three ways:

  • Funnel: sent, delivered, read, clicks, and purchases for each send.
  • Report: conversations, messages per day, and how many met each goal during a period.
  • Export: a file with each recipient's result for one send.

Before you start: the campaign id in the CAMPAIGN_ID variable.

Funnel

Each send of the campaign is a run, with its runId. The funnel counts distinct people at each step.

const campaignId = process.env.CAMPAIGN_ID!;
const funnel = await platic.campaigns.funnel(campaignId);
for (const run of funnel.data.runs) console.log(run.runId, run.funnel, run.rates);

A click without a read receipt does not count as read. Amounts are in cents.

money.ordersLinked and revenueLinkedCents represent purchases attributed to the link. ordersMatched and revenueMatchedCents estimate purchases matched by phone or email without a prior click. That estimate is not added to link-attributed purchases.

Report

const report = await platic.campaigns.report(campaignId, { startDate: "2026-11-01", endDate: "2026-11-30" });
console.log(report.metrics, report.goals);

Without dates, the report covers the current month. Dates are read in Mexico City time.

Export the recipients of a run

Download a CSV with one row per recipient and their delivery, read, click, and purchase results. Filter recipients, such as those who read without clicking, and use the list as another campaign's audience.

const runId = funnel.data.runs[0]?.runId;
if (!runId) throw new Error("The campaign has no runs yet.");
const file = await platic.campaigns.runs.export(campaignId, runId);
console.log(file.rowCount, file.warnings);

It works with a run in delivering, completed, failed, or cancelled; while it is sending or scheduled the list still changes. Read warnings before using the file.

Funnel reference

ParameterInTypeDescriptionRequired
campaignIdpathstringThe campaign id✓
runIdquerystringOne run. Without it, the latest ones—
limitquerynumberHow many of the latest runs, from 1 to 10. Default 5—
workspacequerystringThe campaign's workspace, if the credential covers several—
{
  "status": "success",
  "data": {
    "message": "Embudo de 1 ejecución(es) de la campaña.",
    "data": {
      "campaignId": "EgIOvaKPmrQFfuh6D023",
      "runs": [
        {
          "runId": "run_8fK2pQx7",
          "status": "completed",
          "templateName": "spring_sale",
          "creationDate": "2026-11-20T16:00:00.000Z",
          "scheduledDate": null,
          "recipients": 1250,
          "funnel": {
            "sentUnique": 1250,
            "deliveredUnique": 1201,
            "readUnique": 940,
            "failedUnique": 49,
            "repliedUnique": 133,
            "clickedUnique": 210,
            "purchasedUnique": 18
          },
          "rates": { "deliveredOverSent": 96.1, "readOverDelivered": 78.3, "clickedOverDelivered": 17.5, "purchasedOverClicked": 8.6 },
          "money": { "ordersLinked": 18, "revenueLinkedCents": 2154000, "ordersRun": 18, "revenueRunCents": 2154000, "ordersMatched": 4, "revenueMatchedCents": 389000, "matchedIsEstimate": true },
          "intensity": { "repliesTotal": 171, "clicksHuman": 236, "clicksPrefetch": 12 },
          "reconciledAt": "2026-11-21T06:00:00.000Z"
        }
      ]
    }
  }
}
Field of each runDescription
funnelDistinct people at each step
ratesPercentages with one decimal; null when the previous step is 0
moneyPurchases and amounts in cents. Anything "matched" is an estimate
intensity, reconciledAtnull while the run is still in flight

A campaign that was never sent answers runs: [].

Report reference

ParameterInTypeDescriptionRequired
campaignIdpathstringThe campaign id✓
startDatequerystringFirst day, YYYY-MM-DD. It goes with endDate—
endDatequerystringLast day, YYYY-MM-DD. It goes with startDate—
includequerystringWhich sections to compute, separated by commas: metrics, chart, goals. Without it, all of them—
workspacequerystringThe campaign's workspace, if the credential covers several—
{
  "status": "success",
  "data": {
    "filtersApplied": {
      "timezone": "America/Mexico_City",
      "startDate": "2026-11-01T06:00:00.000Z",
      "endDate": "2026-12-01T05:59:59.999Z",
      "include": { "metrics": true, "chart": true, "goals": true }
    },
    "metrics": { "transactions": 1250, "conversations": 133, "conversionRate": 10.6 },
    "chartData": [{ "group": "Mensajes", "date": "2026-11-20T12:00:00.000Z", "value": 1250 }],
    "goals": [
      { "id": "gq3Lm8Xp", "name": "Asked for a quote", "criteria": "The customer asks for a price.", "count": 41, "percentage": 31, "totalConversations": 133 }
    ]
  }
}
FieldDescription
metricsMessages sent (transactions), conversations, and the percentage of messages that opened a conversation
chartDataMessages per day
goalsEach active goal, from most met to least: how many conversations met it and what percentage that is

Only the sections you asked for arrive. A single date answers 400.

Export reference

No body. The runId comes from the funnel. It can take up to 5 minutes.

{
  "status": "success",
  "message": "Exportados 1250 destinatarios de la ejecución run_8fK2pQx7.",
  "data": {
    "campaignId": "EgIOvaKPmrQFfuh6D023",
    "runId": "run_8fK2pQx7",
    "runStatus": "completed",
    "templateName": "spring_sale",
    "rowCount": 1250,
    "complete": true,
    "warnings": [],
    "estimatedPurchaseCount": 4,
    "columns": ["phoneNumber", "name", "tags", "funnelClientId", "funnelStage", "funnelIsSent", "funnelIsDelivered", "funnelIsRead", "funnelIsClicked", "funnelIsPurchasedByLink", "funnelHasEstimatedPurchase", "funnelIsReplied", "funnelIsFailed", "funnelHoursSinceSent", "…"],
    "columnMapping": { "…": "…" },
    "downloadUrl": "https://storage.googleapis.com/…",
    "expiresAt": "2026-11-23T19:00:00.000Z",
    "generatedAt": "2026-11-23T18:00:00.000Z",
    "runCreationDate": "2026-11-20T16:00:00.000Z"
  }
}

Reimport contacts using phoneNumber, name, and tags (empty). Analysis columns start with funnel:

  • funnelIs… contains 0 or 1.
  • funnelHoursSinceSent lets you filter, for example, "72 hours later".
  • For "who did not buy", drop the two purchase columns.

If you import part of the file as an audience, send columnMapping unchanged.