# RevCent MCP Overview: Campaigns

AI/MCP-focused overview of Campaigns in RevCent.

---

## Purpose

This guide explains what Campaigns are in RevCent, how they organize data, how they differ from Organizations, and how Campaign association can affect visibility for lower-level business personnel.

Campaigns are one of the most important top-level data organization concepts in RevCent.

They are also one of the main filters used throughout RevCent data, reporting, AI workflows, sales/customer management, and user visibility restrictions when paired with Organizations.

---

## Source Documentation Read

This overview incorporates the purpose and behavior described in the RevCent Knowledge Base pages:

```text
https://kb.revcent.com/en/management/campaign
https://kb.revcent.com/management/organization
https://kb.revcent.com/management/organization/user
```

Key KB points reflected in this guide:

```text
Campaigns are central to RevCent.
Every sale and associated entity is created with the campaign attribute.
Campaigns allow advanced filtering and segmentation when viewing reports, sales, etc.
Organizations are optional and are used to group third-party accounts, campaigns, and users with visibility restrictions.
Supervisor and Employee users must be assigned to Organization(s).
Campaigns associated with an Organization can restrict Organization users so they only see sales, customers, and related data for the selected Campaign(s).
```

---

## Core Concept

A **Campaign** is a central RevCent data grouping used to organize commerce activity.

Campaigns help organize:

```text
Sales
Customers
Transactions
Product Sales
Shipping
Taxes
Discounts
Trials
Subscriptions
Subscription Renewals
Chargebacks
Fraud Detections
Reports
AI Assistant account-event filtering
Other Sale/Customer-related records
```

Simple model:

```text
Campaign
    ↓
Sale / Customer context
    ↓
Related operational records
```

Important:

```text
All Sales and Customers must have Campaign context.
```

That Campaign context proceeds down to related items.

---

## What Campaigns Are For

Campaigns are for organizing and segmenting business data.

They answer questions such as:

```text
Which business/store/funnel generated this Sale?
Which Campaign should this Customer belong to?
Which Campaign should this checkout/sales flow use?
Which Campaign should this report filter by?
Which Campaign should this AI Assistant trigger/filter for?
Which Campaign should this fraud, chargeback, subscription, or shipping record be understood under?
Which lower-level users should be allowed to see the Sales/Customers for this business area?
```

Campaigns should be treated as a durable business-data segmentation layer, not a casual label.

---

## Campaigns vs Organizations

Campaigns and Organizations are related but not the same thing.

| Concept | Primary Purpose | Required? | Main Effect |
|---|---|---:|---|
| Campaign | Organizes Sales, Customers, and related commerce records. | Sales/Customers require Campaign context. | Filtering, segmentation, reporting, and data organization. |
| Organization | Groups sub-users and associated entities within a main RevCent account. | Optional account-management structure. | User grouping, permission/visibility restrictions, employee/supervisor separation. |

A Campaign organizes commerce data.

An Organization organizes users and can restrict what those users can see or do.

---

## Organization Purpose

An Organization is meant for account management and user grouping.

Organizations are useful when the main RevCent account has multiple businesses, departments, brands, stores, or operating units and wants to separate access for lower-level personnel.

Organizations can group:

```text
Campaigns
Product Groups
Coupons
Metadata Groups
Third-Party Shops
AdWords Accounts
Tracking Domains
Organization Presets
Users
```

Organizations are optional and are not required to create Sales or perform many core RevCent actions.

However, Organizations become important when a business wants to create sub-users with limited visibility or limited abilities.

---

## Organization Users

RevCent user types include:

```text
Account Owner
Administrator
Supervisor
Employee
```

Important hierarchy distinction:

```text
Account Owners and Administrators are not assigned an Organization.
Supervisors and Employees must be assigned to Organization(s).
```

Supervisor and Employee accounts are lower-level business personnel whose access and visibility can be restricted by Organization association, permissions, and abilities.

---

## Campaigns and Visibility Restrictions

Campaigns do more than organize data.

When Campaigns are associated with an Organization, they can also help enforce visibility restrictions for lower-level users assigned to that Organization.

Important:

```text
Selecting Campaign(s) for an Organization applies visibility restrictions to users added to that Organization.
```

This means Organization users may only be able to view:

```text
Sales
Customers
and related entities
```

that are related to the selected Campaign(s).

This is why Campaign design matters. A poorly named or incorrectly shared Campaign can create confusion and may expose or hide the wrong data for Supervisor/Employee users.

---

## How Campaign Visibility Restrictions Work Conceptually

```text
Organization
    ↓
Associated Campaign(s)
    ↓
Supervisor / Employee users assigned to the Organization
    ↓
Users only see Sales, Customers, etc. related to selected Campaign(s)
```

Campaign associations are therefore used both for:

```text
data organization
and
controlled visibility for lower-level personnel
```

---

## Campaign Association Warning

When adding Campaigns to an Organization, AI/MCP should treat the change as consequential.

Important:

```text
Do not associate Campaigns with an Organization casually.
```

Adding or removing Campaigns from an Organization can change what Supervisor and Employee users can see.

If no Campaigns are selected for an Organization, users may be able to view broader Campaign data depending on the Organization/user configuration.

If Campaigns are selected, Organization users are restricted to those Campaigns for Sales, Customers, and related data.

---

## Third-Party Shop Visibility Distinction

A Third-Party Shop association in an Organization is not the same as Campaign-based Sales/Customer visibility restriction.

Important:

```text
Third-Party Shop associations affect shop visibility for filtering/selection.
Campaign associations are used when the goal is to restrict visibility of Sales, Transactions, Customers, etc. based on shop/business activity.
```

If the user wants to restrict visibility of Sales, Transactions, Customers, etc. for a WooCommerce store or other third-party shop, the correct strategy is usually Campaign association, not only Third-Party Shop association.

---

## Product Group Visibility Distinction

Product Group associations can restrict which Product Groups and associated Products users can view.

However:

```text
Product Group restrictions do not apply visibility restrictions to Sales, Subscriptions, etc.
```

Use Campaign associations for sales/customer-related visibility restrictions.

Use Product Group associations for product-level visibility restrictions.

---

## Metadata Group Visibility Distinction

Metadata Group associations restrict which metadata values users in the Organization can view.

This is separate from Campaign visibility.

Use Metadata Groups when the goal is to restrict sensitive or segmented metadata visibility.

Use Campaigns when the goal is to restrict Sales, Customers, and related commerce data.

---

## Campaign as a Senior Organizational Layer

A Campaign is senior to many operational items because many records either directly include Campaign information or inherit/derive Campaign context from their parent Sale/Customer.

Examples:

```text
Sale has Campaign
Customer has Campaign context
Product Sale relates to Sale
Transaction relates to Sale
Shipping relates to Sale
Tax relates to Sale
Discount relates to Sale
Subscription relates to Sale/Customer
Trial relates to Sale/Customer
Subscription Renewal relates to Subscription/Sale/Customer
Chargeback relates to Transaction/Sale
Fraud Detection relates to source Sale/Transaction/API call
```

For AI/MCP, this means Campaign context should be preserved and considered when creating, retrieving, editing, filtering, or reporting on related items.

---

## Campaigns and Multi-Business Accounts

When a RevCent account has multiple businesses, stores, websites, funnels, or brands, each major business area should generally have its own Campaign or Campaign structure.

Good Campaign names:

```text
Acme Skincare Main Campaign
AcmeSkincare.com WooCommerce Campaign
Acme Wholesale Store Campaign
Brand A Main Sales Campaign
Brand A Subscription Funnel Campaign
```

Avoid overly generic names:

```text
Main
Default
Campaign
Store
Test
```

A Campaign name should be clear enough that future AI/MCP sessions and human operators can identify which business, store, funnel, or sales flow it belongs to.

---

## Campaign vs Project

Campaigns and Projects are different concepts.

| Concept | Purpose |
|---|---|
| Project | Organizes RevCent setup/workflows/entities for a business/store/brand. |
| Campaign | Organizes Sales, Customers, and related commerce activity. |
| Organization | Groups sub-users and associated entities, applying visibility restrictions where configured. |

Recommended pattern:

```text
Project = Acme Skincare
Campaign = Acme Skincare Main Campaign
Organization = Acme Skincare Team
```

The Project helps AI/MCP understand setup history and associated entities.

The Campaign organizes commerce data and provides a primary reporting/filtering dimension.

The Organization groups users and can restrict what lower-level users can see.

---

## Related Campaign Operations

| Operation | Purpose |
|---|---|
| `GetCampaigns` | Retrieve a paginated list of Campaigns. |
| `CreateCampaign` | Create a new Campaign and receive a `campaign_id`. |
| `GetCampaign` | Retrieve the details of one Campaign by `campaign_id`. |
| `EditCampaign` | Edit a Campaign by `campaign_id`. |

---

# Operation: `GetCampaigns`

## Purpose

```text
Returns a list of campaigns previously created.
```

Use this operation when:

- the user does not know the Campaign ID,
- AI/MCP needs to find a Campaign by name,
- AI/MCP needs to choose the correct Campaign before creating a Sale, Shop, Payment Profile, report, AI Assistant filter, or Organization association,
- AI/MCP is onboarding a new business and must avoid duplicate/confusing Campaign names.

## Input Schema

Required:

```json
{
  "limit": 25,
  "page": 1
}
```

Fields:

| Field | Type | Required | Notes |
|---|---:|---:|---|
| `limit` | integer | Yes | Range 1-25. Default is 25. |
| `page` | integer | Yes | Used for pagination. |

## Output Highlights

Each Campaign result can include:

```text
id
name
description
enabled
organization
created_date_unix
updated_date_unix
```

Use the Campaign `id` as `campaign_id` in other operations.

---

# Operation: `CreateCampaign`

## Purpose

```text
Create a campaign, which will issue a unique campaign ID.
```

Use this operation when a new Campaign is needed for a business, store, sales flow, Organization visibility boundary, or organizational segment.

## Input Schema

Required:

```text
name
```

Optional:

```text
description
enabled
organization
```

Example:

```json
{
  "name": "Acme Skincare Main Campaign",
  "description": "Primary Campaign for Acme Skincare WooCommerce sales.",
  "enabled": true
}
```

If organizations are used:

```json
{
  "name": "Acme Skincare Main Campaign",
  "description": "Primary Campaign for Acme Skincare WooCommerce sales.",
  "enabled": true,
  "organization": [
    "OOOOOOOOOOOOOOOOOOOO"
  ]
}
```

## Important Rules

Campaign names must be unique from other Campaign names.

AI/MCP should check existing Campaigns before creating a new one when there is risk of duplication.

Recommended pre-check:

```text
GetCampaigns
    ↓
Look for same or similar Campaign name
    ↓
CreateCampaign only if the intended Campaign does not already exist
```

---

# Operation: `GetCampaign`

## Purpose

```text
Retrieve the details of a previously created campaign using the campaign ID.
```

Use this operation when the Campaign ID is known and AI/MCP needs full Campaign details.

## Input Schema

Required:

```json
{
  "campaign_id": "CCCCCCCCCCCCCCCCCCCC"
}
```

## Output Highlights

`GetCampaign` can return:

```text
id
name
description
enabled
organization
created_date_unix
updated_date_unix
```

Use `GetCampaign` to verify a Campaign before using it in important workflows, especially Organization visibility or live selling workflows.

---

# Operation: `EditCampaign`

## Purpose

```text
Edit a previously created campaign using the campaign ID.
```

Use this operation when the user explicitly wants to update Campaign details.

## Input Schema

Required:

```text
campaign_id
```

Optional fields:

```text
name
description
enabled
organization
```

Example:

```json
{
  "campaign_id": "CCCCCCCCCCCCCCCCCCCC",
  "description": "Primary Campaign for Acme Skincare direct and WooCommerce sales.",
  "enabled": true
}
```

Important:

```text
Only include the fields that should be modified.
```

Do not include fields just because they exist in the schema.

---

## Editing Campaigns Safely

Campaign edits can affect how data is organized and understood across RevCent.

Ask for confirmation before changing:

```text
name
enabled
organization
```

Especially confirm before disabling a Campaign if it may still be used by live selling flows or Organization visibility restrictions.

Disabling, renaming, or changing Organization association for a Campaign can affect:

```text
reporting
AI Assistant filters
human operator understanding
lower-level personnel visibility
sales/customer segmentation
```

---

## Campaign Enabled State

Campaigns have an `enabled` boolean.

A disabled Campaign should generally not be used for new sales or new setup unless the user explicitly wants that.

AI/MCP should verify the Campaign is enabled before using it in new active selling workflows.

---

## Campaign Organization Association

Campaigns can be associated with Organizations.

The Campaign schema includes:

```text
organization
```

For create/edit requests, this is an array of Organization IDs.

For responses, Organization objects can include:

```text
id
name
```

This association is important because Organization-level Campaign associations can affect visibility restrictions for Supervisor and Employee users.

---

## Campaigns in Business Onboarding

During business onboarding, AI/MCP should create or identify the correct Campaign before creating business/store workflows that depend on Campaign context.

Recommended onboarding pattern:

```text
Identify business/store/brand
    ↓
Create or identify Project
    ↓
Create or identify Campaign
    ↓
If the business has lower-level users, create/identify Organization and associate Campaign appropriately
    ↓
Create or identify Payment Profile, Shop, Products, Product Groups, Email Templates, etc.
    ↓
Use Campaign consistently in sales/customer-related workflows
```

For WooCommerce onboarding, the Campaign should be created before `CreateUserShop` if the shop requires a Campaign.

For custom store onboarding, the Campaign should be known before creating Sales through direct API/AI workflows.

---

## Campaigns and Sales

Campaigns are central to Sales.

Each Sale should have Campaign context.

When retrieving a Sale, Campaign information may appear as:

```text
campaign_id
campaign_name
```

Downstream sale-related records can inherit or be interpreted through the Sale's Campaign.

Examples:

```text
Product Sales
Transactions
Shipping
Tax
Discounts
Subscriptions
Trials
Subscription Renewals
Chargebacks
Fraud Detections
Pending Refunds
```

When AI/MCP is working on any downstream record, it should retrieve the parent Sale when Campaign context matters.

---

## Campaigns and Customers

Customers must also have Campaign context.

A Customer may be created during an initial Sale, and the Campaign context from the Sale should be treated as important for future organization, filtering, reporting, and visibility.

When working with existing Customers, AI/MCP should consider Campaign context before:

- adding customer cards,
- creating direct Sales,
- adding customer groups,
- running customer reports,
- triggering AI Assistants,
- sending customer-facing communication,
- deciding whether a lower-level user should see the Customer.

---

## Campaigns as Filters

Campaigns are one of the main filters throughout RevCent.

Many RevCent list/search/report workflows can use Campaigns to narrow results.

Examples of Campaign-filtered questions:

```text
Show sales for Acme Skincare Campaign.
Find chargebacks for this Campaign.
Report subscriptions by Campaign.
Show fraud detections for Campaign CCCCCCCCCCCCCCCCCCCC.
Get shipments related to this Campaign.
Run a revenue report grouped by Campaign.
Trigger an AI Assistant only for events in this Campaign.
Restrict this Organization's users to Sales/Customers in this Campaign.
```

If the user asks about a specific business/store/brand, AI/MCP should identify the Campaign first when the task is sales/customer/data related.

---

## Campaigns and AI Assistants

AI Assistants can use Campaign context in event filtering and workflow decisions.

For account-event triggered AI Assistants, Campaign filters can help ensure the assistant only runs for relevant business/store activity.

Example:

```text
AI Assistant trigger: sale.created
Campaign filter: Acme Skincare Campaign
```

This prevents an assistant for one business/store from running on another business/store's events.

Best practice:

```text
Use Campaign filters for business-specific AI Assistants whenever possible.
```

---

## Campaigns and Reporting

Campaigns are a primary reporting dimension.

Use Campaigns to report on:

- sales volume,
- revenue,
- refunds,
- chargebacks,
- fraud detections,
- subscriptions,
- renewals,
- trials,
- shipments,
- product performance,
- customer counts,
- payment performance,
- AI Assistant activity tied to account events,
- lower-level user visibility/account organization.

For simple record lookup, use specific Get/List operations.

For counts, aggregations, metrics, grouped reports, or trends, use BigQuery.

Recommended reporting pattern:

```text
GetBigQueryTables
    ↓
Find relevant table and campaign fields
    ↓
BigQueryRunQuery
```

Use Campaign fields such as:

```text
campaign_id
campaign_name
```

when available in the relevant table.

Do not assume every table uses identical Campaign field names; inspect `GetBigQueryTables` first.

---

## Example Campaign Reporting Concepts

These are conceptual BigQuery patterns. AI/MCP should confirm exact table and field names with `GetBigQueryTables` first.

### Sales by Campaign

```sql
SELECT
  campaign_id,
  campaign_name,
  COUNT(*) AS sale_count,
  SUM(amount_total) AS total_sales
FROM `revcent.user.sale`
GROUP BY campaign_id, campaign_name
ORDER BY total_sales DESC
```

### Fraud Detections by Campaign

```sql
SELECT
  campaign_id,
  campaign_name,
  COUNT(*) AS fraud_detection_count
FROM `revcent.user.fraud_detection`
GROUP BY campaign_id, campaign_name
ORDER BY fraud_detection_count DESC
```

### Campaign Revenue Over Time

```sql
SELECT
  DATE(TIMESTAMP_SECONDS(created_date_unix)) AS sale_day,
  campaign_id,
  campaign_name,
  COUNT(*) AS sale_count,
  SUM(amount_total) AS total_sales
FROM `revcent.user.sale`
GROUP BY sale_day, campaign_id, campaign_name
ORDER BY sale_day DESC
```

---

## Campaign Selection Logic for AI/MCP

When the user references a business/store/brand, AI/MCP should resolve Campaign context carefully.

Recommended logic:

```text
1. Determine the business/store/brand involved.
2. Look for the Project if the task is setup/workflow related.
3. Use Project notes/associated entities if available to identify Campaign.
4. Use GetCampaigns if Campaign ID is unknown.
5. If one clear Campaign matches, use it.
6. If multiple plausible Campaigns match, ask the user which one to use.
7. If no Campaign exists, create one only when the workflow requires it and the user has provided enough context.
```

Do not guess a Campaign when multiple plausible Campaigns exist.

---

## Campaign and Organization Selection Logic

When the user is setting up personnel visibility, AI/MCP should resolve both Campaign and Organization context.

Recommended logic:

```text
1. Identify the lower-level personnel type: Supervisor or Employee.
2. Identify the Organization the user belongs to or should belong to.
3. Identify which Campaign(s) represent the Sales/Customers the user should see.
4. Confirm whether Campaign visibility restriction is intended.
5. Associate the Campaign(s) with the Organization only if the user wants that visibility boundary.
6. Document the visibility decision clearly.
```

AI/MCP should distinguish between:

```text
"Use this Campaign for data organization/reporting"
and
"Associate this Campaign with an Organization to restrict Supervisor/Employee visibility"
```

These are related but not identical actions.

---

## Campaign Naming Guidance

Use business/store/brand-specific names.

Good:

```text
Acme Skincare Main Campaign
AcmeSkincare.com WooCommerce Campaign
Acme Wholesale Campaign
Acme Trial Funnel Campaign
```

Avoid:

```text
Default
Main
Campaign 1
WooCommerce
Test
```

Campaign names should be durable and clear for future operators and AI/MCP sessions.

---

## Project Notes for Campaign Setup

When creating a Campaign during onboarding or setup, add a concise Project Note if the workflow is Project-based.

Example:

```text
[YYYY-MM-DD] Created Campaign for Acme Skincare

Changes:
- Created Campaign: Acme Skincare Main Campaign
- Campaign ID: CCCCCCCCCCCCCCCCCCCC
- Enabled: true
- Purpose: Primary Campaign for Acme Skincare sales/customer activity.
- Organization visibility: Not associated with an Organization yet.

Follow-up:
- Use this Campaign for WooCommerce shop setup and sales-related reporting.
- If Supervisor/Employee users are added later, decide whether this Campaign should restrict their Organization visibility.
```

If the Campaign is associated with an Organization for visibility restriction, document that explicitly:

```text
Organization visibility:
- Associated Campaign with Organization: Acme Skincare Team
- Intended effect: Supervisors/Employees in this Organization should only see Sales, Customers, etc. related to this Campaign.
```

Do not create one Project Note per minor Campaign field change unless it is operationally important.

---

## Human-in-the-Loop Guidance

When a human is actively working with AI/MCP:

Ask for confirmation when:

- creating a new Campaign,
- choosing between multiple Campaigns,
- editing Campaign name,
- disabling a Campaign,
- changing Organization association,
- using a Campaign for a live selling workflow,
- associating a Campaign with an Organization for user visibility restriction,
- changing Campaign association on an Organization that already has Supervisor/Employee users.

Use safe defaults when clear, but do not guess among multiple business/store Campaigns.

---

## No-Human-in-the-Loop Guidance

For external AI/agent workflows without a human in the loop:

```text
Only use a Campaign when the task payload clearly provides campaign_id or a single unambiguous Campaign match.
```

Do not guess:

- Campaign ID,
- whether to create a new Campaign,
- whether to disable a Campaign,
- which Organization IDs to associate,
- whether Campaign association should restrict users,
- whether two similarly named Campaigns are equivalent.

If required Campaign or Organization visibility context is missing, stop safely and return the missing requirements.

---

## Common Mistakes to Avoid

Do not:

- confuse Campaigns with Projects,
- confuse Campaigns with Organizations,
- treat Organization association as merely decorative,
- forget that Organization Campaign association can restrict Supervisor/Employee visibility,
- use generic Campaign names in multi-business accounts,
- create duplicate Campaigns without checking existing Campaigns,
- disable a live Campaign without explicit confirmation,
- use a disabled Campaign for new sales unless explicitly requested,
- assume a downstream item has no Campaign just because it does not show Campaign fields directly,
- restrict users by Third-Party Shop association when Campaign association is the correct visibility boundary for Sales/Customers,
- run reports without considering Campaign filters,
- guess Campaign selection when multiple Campaigns match.

---

## Recommended AI/MCP Summary Format

When summarizing a Campaign:

```text
Campaign: [name]
Campaign ID: [id]
Enabled: [true/false]
Description: [description]
Organizations: [organization names/IDs]

Purpose:
- [How this Campaign organizes Sales/Customers/data]

Visibility:
- [Whether this Campaign is associated with any Organization]
- [Whether Supervisor/Employee visibility restriction is intended]

Related workflows:
- [Sales / customers / shop / payment profile / AI Assistant / reporting]

Notes:
- [Any setup or ambiguity notes]
```

---

## Final AI/MCP Instruction

Campaigns are a senior top-level RevCent organizational concept and one of the main filters across RevCent data and features.

All Sales and Customers must have Campaign context, and that context proceeds down to related items.

Organizations are different: they group sub-users and associated entities. When Campaigns are associated with Organizations, they can restrict lower-level Supervisor/Employee users so they only see Sales, Customers, and related data tied to those Campaigns.

Use `GetCampaigns`, `CreateCampaign`, `GetCampaign`, and `EditCampaign` to identify, create, inspect, and update Campaigns. Preserve Campaign clarity across onboarding, sales, customer management, reporting, AI Assistant triggers, Organization visibility, and business-specific workflows.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.