Developers
Ask
Sign inSign in

Create campaign

How does the assistant create a campaign from a basket of plans?

1 min readUpdated 15 November 2026
Short answer

dorna_create_campaign creates a campaign and its draft invoice in one of your projects from a basket of plans. No money moves.

  • dorna_create_campaign
  • Changes data
Contents
  1. Parameters
  2. What it returns
  3. Example
  4. Access and confirmation

Parameters

FieldTypeDescription
projectIdstring (ID)Required. The project the campaign belongs to, from dorna_projects.
namestringRequired. The campaign's name, 2 to 100 characters.
targetstringThe campaign's goal. One of SEO, BRANDING, OTHER.
itemsarrayRequired. The basket, 1 to 50 lines. Each line: planId and orderPriceRials (required), and optionally addonIds, durationMonths, targetUrl and anchorText.

What it returns

The campaign ID, the invoice number and the totals in rials. The server computes the amounts itself.

Example

Ask your assistant: Create a campaign called Launch with these two plans.

The assistant then calls the tool like this:

{
  "name": "dorna_create_campaign",
  "arguments": {
    "projectId": "64f1a2b3c4d5e6f7a8b9c0d1",
    "name": "Launch campaign",
    "items": [
      {
        "planId": "64f1a2b3c4d5e6f7a8b9c0d1",
        "orderPriceRials": 12000000
      }
    ]
  }
}

A typical result looks like this (the values are examples):

{
  "campaignId": "64f1a2b3c4d5e6f7a8b9c0d1",
  "invoiceId": "64f1a2b3c4d5e6f7a8b9c0d1",
  "invoiceNumber": "INV-1405-0042",
  "paid": false,
  "subtotalRials": 12000000,
  "discountRials": 1200000,
  "vatRials": 1080000,
  "totalRials": 11880000,
  "orders": [
    {
      "orderId": "64f1a2b3c4d5e6f7a8b9c0d1",
      "title": "Our new payments app is live",
      "totalRials": 11880000
    }
  ]
}

Access and confirmation

Changes data: it adds something new to your account or creates a link.

Your assistant confirms the basket and the estimated total with you before it creates anything.

Related tools: dorna_search_media dorna_add_to_campaign dorna_pay_campaign

Still have a question?

Open this guide in your own AI assistant and ask it.

ChatGPTClaudeGemini