Skip to content
Topolo Platform Topolo Docs
Open workspace
Documentation

Campaigns

Campaign codes, offers, distribution batches, placements, and cross-app customer journeys.

On this page

What It Is#

Topolo Campaigns coordinates measurable campaigns that connect physical or digital codes to offers and customer journeys. It keeps campaign batches, code placements, engagement events, and redemptions together while linking to resources owned by other Topolo applications.

Automation workflows#

Examples below are source-reviewed illustrations of input and expected behavior. They were not executed and are not captured responses. IDs are placeholders to replace with identifiers discovered in the selected context. Dates are illustrative. Successful persistence, notification requests, provider connection and recipient delivery require separate verification.

Authorization and selected context#

Confirm the production identity and organization with topolo whoami, discover this application and the intended resource using the current credential, then inspect the exact action contract. A schema-valid input does not establish permission or resource access. Campaigns records use their selected app workspace; discover that workspace separately and preserve its scope. Obtain authorization for the specific effect, retain the original payload, and verify the resulting state using the named read action. On an uncertain write outcome, reconcile the record before repeating it. Do not store API keys, provider passwords, access tokens, private exports or invitee manage links in documentation.

Prepare an offer and a draft campaign#

Discover offers.list and campaigns.list before creating records. offers.create defines the incentive; campaigns.create creates a draft program and may refer to an existing offerId. Read campaigns.get and check the offer, commission, attribution and status before changing status. Only the intended activation should make live code issuance/redemption available; this draft preparation does not activate a campaign.

Issue and honor codes deliberately#

codes.issue is an effectful issuance action; inspect count and eligibility in its current contract and obtain authorization before use. Discover codes through codes.list and use codes.update deliberately to disable or relabel one. codes.validate checks a code without consuming redemption capacity, but still requires redemptions:redeem permission. codes.redeem consumes capacity and records a redemption. Check its redeemed/failure outcome and redemptions.list; an HTTP success or an input validation result alone does not prove a code was honored. Preserve the exact original request and reconcile before replaying an uncertain redemption.

integrations.list shows the campaign links. integrations.upsert addresses one applicationId and purpose within the organization/workspace/campaign; the reviewed store uses that compound key and updates the matching resourceType/resourceId/metadata. It does not replace every campaign integration. Discover the target resource in its owning app and confirm access there; recording its ID in Campaigns does not create it or grant permission to use it. Keep the prior link for a deliberate restoration.

Track batches, placements and journeys#

batches.create records a batch with a planned count; it issues no codes by itself. Inspect batches.list before batches.update. batches.fail requires an active batch and a reason; the reviewed source records a failure and pauses that batch, not the campaign. Read the batch and campaign independently after any failure handling. placements.create/update records where a campaign code is distributed; list placements and discover a real codeId first. journey_events.record appends attribution data; list it afterward and avoid duplicate events. An event record is not independent proof that the referenced real-world event occurred.

Complete and measure a campaign#

Read campaigns.dashboard.get, journey_events.list and redemptions.list to distinguish engagement from actual redemptions. campaigns.complete accepts an active or paused campaign, records completion and archives the campaign; later redemption eligibility changes accordingly. Confirm status with campaigns.get and reconcile an uncertain completion before retrying. Widget and dashboard aggregates are summaries, not proof of provider delivery or downstream revenue.

Choose a notification recipient#

workspaces.notification_recipient.update sets a workspace notificationUserId. Discover the intended user and verify eligibility in the authoritative membership context. The reviewed local route checks workspace access and a nonempty userId, but does not itself prove that the selected user is a current member or that any notification was delivered. Keep eligibility and delivery verification explicit.

Protect organization data and retire workspaces#

organizations.data.export/erase take organizationId, which must match the authenticated organization; they span Campaigns-owned organization data rather than one selected workspace. Erasure requires ERASE and is refused while active campaigns, active batches or placed placements remain. Preserve the exact blocker and let the owner resolve it; do not automatically archive work to bypass it. workspaces.delete requires an empty, verified workspace and asks Auth to archive before deleting the local mirror. Protect exports and treat erasure as irreversible.

Use the current response contract carefully#

The current catalog output schemas differ from this source manifest for 29 of 30 actions; widget.get matches. Most catalog shapes are derived structural descriptions. Use fresh action discovery and verify concrete named fields against the actual response before relying on them. Source-authored fixture files are local evidence with simulated credential/workspace boundaries and sealed egress, not current production captures. The examples here deliberately state expected behavior without claiming a captured output or current source deployment.

Illustrative inputs and expected behavior#

Create an offer#

Action: app_topolo_campaigns.offers.create · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "kind": "discount_pct",
  "value": 15,
  "label": "Example offer"
}

Expected behavior: Creates an incentive definition; verify it using offers.list before using its discovered ID.

Create a draft campaign#

Action: app_topolo_campaigns.campaigns.create · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "type": "promo",
  "name": "Example launch",
  "offerId": "ofr_example_discovered"
}

Expected behavior: Creates a draft campaign referring to an offer in the same workspace. Read campaigns.get before any activation.

List campaigns#

Action: app_topolo_campaigns.campaigns.list · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{}

Expected behavior: Reads campaigns visible in the selected workspace. No array contents or live campaign status are asserted.

Action: app_topolo_campaigns.integrations.upsert · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "id": "cmp_example_discovered",
  "applicationId": "app_example_discovered",
  "resourceType": "qr_series",
  "resourceId": "qrs_example_discovered",
  "purpose": "qr_series"
}

Expected behavior: Creates or updates the one integration with this application and purpose. Confirm target ownership/access and read integrations.list.

Create a planned batch#

Action: app_topolo_campaigns.batches.create · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "id": "cmp_example_discovered",
  "name": "Example print run",
  "plannedCount": 100
}

Expected behavior: Records a draft batch with planned count 100; it does not generate codes. Read batches.list.

Check a code#

Action: app_topolo_campaigns.codes.validate · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "code": "EXAMPLE-CODE"
}

Expected behavior: Checks eligibility without redeeming; inspect actual validity/reason fields under the current contract.

Redeem a code#

Action: app_topolo_campaigns.codes.redeem · Inspect contract

Illustrative input; replace discovered identifiers before any authorized call.

json
{
  "code": "EXAMPLE-CODE",
  "redeemedBy": "usr_example_discovered",
  "source": "manual"
}

Expected behavior: If eligible and authorized, consumes redemption capacity. Inspect the redemption outcome and ledger before considering a retry.

Action index#

Inspect each current action before use; this workflow index does not replace its input/output contract.

ActionDeclared permissionMethod
app_topolo_campaigns.batches.createapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.batches.failapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.batches.listapp_topolo_campaigns.campaigns:readGET
app_topolo_campaigns.batches.updateapp_topolo_campaigns.campaigns:writePATCH
app_topolo_campaigns.campaigns.completeapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.campaigns.createapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.campaigns.dashboard.getapp_topolo_campaigns.analytics:readGET
app_topolo_campaigns.campaigns.getapp_topolo_campaigns.campaigns:readGET
app_topolo_campaigns.campaigns.listapp_topolo_campaigns.campaigns:readGET
app_topolo_campaigns.campaigns.updateapp_topolo_campaigns.campaigns:writePATCH
app_topolo_campaigns.codes.issueapp_topolo_campaigns.codes:writePOST
app_topolo_campaigns.codes.listapp_topolo_campaigns.codes:readGET
app_topolo_campaigns.codes.redeemapp_topolo_campaigns.redemptions:redeemPOST
app_topolo_campaigns.codes.updateapp_topolo_campaigns.codes:writePATCH
app_topolo_campaigns.codes.validateapp_topolo_campaigns.redemptions:redeemGET
app_topolo_campaigns.integrations.listapp_topolo_campaigns.campaigns:readGET
app_topolo_campaigns.integrations.upsertapp_topolo_campaigns.campaigns:writePUT
app_topolo_campaigns.journey_events.listapp_topolo_campaigns.analytics:readGET
app_topolo_campaigns.journey_events.recordapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.offers.createapp_topolo_campaigns.offers:writePOST
app_topolo_campaigns.offers.listapp_topolo_campaigns.offers:readGET
app_topolo_campaigns.organizations.data.eraseapp_topolo_campaigns.privacy:writeDELETE
app_topolo_campaigns.organizations.data.exportapp_topolo_campaigns.privacy:readGET
app_topolo_campaigns.placements.createapp_topolo_campaigns.campaigns:writePOST
app_topolo_campaigns.placements.listapp_topolo_campaigns.campaigns:readGET
app_topolo_campaigns.placements.updateapp_topolo_campaigns.campaigns:writePATCH
app_topolo_campaigns.redemptions.listapp_topolo_campaigns.redemptions:readGET
app_topolo_campaigns.widget.getapp_topolo_campaigns.workspace:readGET
app_topolo_campaigns.workspaces.deleteapp_topolo_campaigns.workspace:deleteDELETE
app_topolo_campaigns.workspaces.notification_recipient.updateapp_topolo_campaigns.workspace:writePUT

Architecture#

The application uses the shared Topolo landing page, shared login page, auth callback handling, and shared Topolo shell from the outset.

Workspace Management#

The shared Topolo workspace control reads and manages app-scoped workspace identity through Topolo Auth: authenticated users can list, create, rename, choose a default, and delete an eligible workspace. Workspace IDs and slugs remain stable and exactly one default is explicit. The selected platform workspace scopes this application's app-owned records; the app retains only domain-specific deletion guards for default or non-empty workspaces.

Runtime Surfaces#

The planned production host is https://campaigns.topolo.app, with public entry at /, sign-in at /login, and callback completion at /auth/callback.

API Reference#

The authenticated API exposes Campaigns workspaces, offers, campaigns, code batches, placements, journey events, redemptions, dashboards, and typed links to app-local resources. Its action catalog is discoverable by Topolo CLI and MCP clients with the permissions of the current credential.

Auth and Permissions#

Signed browser and API requests use Topolo Auth through the topolo-campaigns service slug. Organizations can grant access to selected Campaigns workspaces, including simultaneous access to several resources where the client supports it.

Data Ownership#

Campaigns owns its own organization- and workspace-scoped records. Quro series, Web sites, Forms forms, CRM workspaces, Chat channels, Calendar event types, and Notify events remain owned by their respective applications and are connected by explicit resource links rather than a universal workspace ID.

Deployments#

The planned production host is https://campaigns.topolo.app. Staging mirrors the scaffold at https://campaigns.stg.topolo.us.

Failure Modes#

  • service registration and app routing can drift while the product is still planned
  • a linked resource is removed in its owning application without updating the Campaigns integration

Debugging#

  • use the matching internal handbook for operational details
  • verify the system registry entry before deployment or service-registration changes

Use It#

Open Topolo Campaigns for the human product surface. Use the current Campaigns action reference for the supported automation contracts.

Discover the credential-scoped automation surface before making an API call:

bash
topolo services --query topolo-campaigns --json
topolo actions --service topolo-campaigns --json
topolo actions capabilities --service topolo-campaigns --json

Choose an action, inspect it with topolo actions get <action-id> --json, then validate and plan a published example. The Agent Actions reference exposes the same public schemas, effects, examples, verification, and recovery guidance.

Example workflow:

  1. Confirm the active identity and organization with topolo whoami --json.
  2. Discover Topolo Campaigns and select one published action rather than guessing a route.
  3. Inspect its input/output schemas and published example.
  4. Validate and plan the exact payload; obtain confirmation for a mutation.
  5. Execute and perform every published verification step.

Change Log / Verification#

  • Reconciled this page against apps/TopoloCampaigns origin/staging 7097990bc15e on 2026-07-24 after reviewing every docs-relevant commit since its previous verification watermark. Dependency-only currency commits were checked by the fleet production-dependency gate and did not change this page's product contract.

  • Added workspace-scoped orchestration and credential-discoverable actions on 2026-07-14.

  • Scaffold generated on 2026-07-13 from topolo platform apps scaffold.