Skip to content

AI Campaigns - Marketing Documentation

Menu Location: AI > AI Campaigns - Marketing

Access Level: Administrator and above

Last Updated: 2026-03-02


Overview

The AI Campaigns - Marketing page (admin-edit.php?table=ai_campaigns) manages AI-generated marketing campaign content for social media and promotions. The system automatically identifies top-selling products and generates complete marketing campaign packages including titles, hooks, captions, offers, hashtags, image prompts, and UTM tracking codes.

Primary Functions:

  • View AI-generated marketing campaign content
  • Review campaign suggestions with product highlights
  • Accept or reject campaign ideas
  • Track AI-generated image prompts and URLs
  • Monitor campaign creation history
  • Add comments and feedback on campaigns

Database Fields

Field Description
id Unique identifier
title Campaign type (e.g., "top_seller")
product Product name featured in the campaign
hook Attention-grabbing opening line
caption Full social media caption/post text
offer Promotional offer details
hashtags Suggested hashtags for social media
image_prompt AI image generation prompt
image_url URL of AI-generated campaign image
utm UTM tracking parameters for links
created Unix timestamp of campaign creation
accepted Whether the campaign was accepted
rejected Whether the campaign was rejected
comment Admin feedback/notes on the campaign
classify_id Product classification ID linking to catalog

How the System Works

Campaign Generation Process

  1. Product Selection: System identifies top-selling products for the current week
  2. Deduplication: Products featured in the last 2 weeks are excluded
  3. AI Generation: OpenAI creates a complete campaign package for the selected product
  4. Storage: Campaign content is saved with all components
  5. Review: Admin reviews and accepts or rejects the campaign

Smart Product Rotation

The system avoids featuring the same product repeatedly:

  • Checks ai_campaigns for products used in the last 2 weeks
  • Excludes recently featured products from selection
  • Falls back to least-recently-used products if all recent ones are excluded
  • Filters out non-product items (tips, zero-price items)

Product Selection Criteria

Products must meet these criteria:

  • Active status (status=1 or featured in current week)
  • Retail price > 0
  • Not a "Delivery Specialist Tip" or "Driver Tip"
  • Not recently featured in a campaign
  • Has actual order history (sorted by order count)

How to Use

Viewing Campaigns

  1. Navigate to AI > AI Campaigns - Marketing
  2. Browse the list of generated campaigns
  3. Click on any campaign to see full details

Reviewing Campaign Content

Each campaign includes:

  • Hook: The attention-grabbing opening - use as email subject or first line
  • Caption: Full social media post text
  • Offer: Promotional offer to include
  • Hashtags: Ready-to-use hashtag suggestions
  • Image Prompt: Use with AI image generators if no image was auto-generated
  • UTM: Tracking parameters for campaign links

Accepting/Rejecting Campaigns

  • Set accepted=1 to mark a campaign as approved for use
  • Set rejected=1 to mark a campaign as not suitable
  • Use the comment field to note why a campaign was accepted or rejected

Common Use Cases

Weekly Social Media Content

Review the latest AI-generated campaigns for social media post ideas. Use the captions, hashtags, and image prompts for Instagram, Facebook, or Twitter posts.

Email Marketing Inspiration

Use the hooks and captions as starting points for email marketing copy. Adapt the tone and messaging to match your brand voice.

Product Promotion Planning

Review which products the AI selected as top sellers. Use this data alongside the campaign content to plan promotional strategies.

Content Calendar

Build a content calendar from accepted campaigns. The smart rotation ensures variety in featured products.


Tips & Best Practices

  1. Review and adapt AI-generated copy to match your brand voice
  2. Use the hooks as email subject lines - they're designed to grab attention
  3. Test different campaigns against each other using the UTM tracking
  4. Add comments explaining why campaigns were accepted or rejected for future reference
  5. The AI selects top sellers - consider manually creating campaigns for new or underperforming products too
  6. Use the image_prompt with your preferred AI image generator if no image was auto-created
  7. Hashtags are suggestions - add your brand-specific hashtags before posting

FAQ

How often are campaigns generated?

Campaign generation is typically triggered by a cron job. Each run creates campaigns based on current top-selling products.

Why do some campaigns have no image?

Image generation is a separate step and may not always be available. Use the image_prompt field with an AI image generator to create visuals.

Can I edit campaign content?

Yes, through the admin-edit interface you can modify any field before using the content.

How does the product rotation work?

Products featured in campaigns within the last 2 weeks are excluded. If all recent top sellers have been used, the system falls back to the least-recently-featured product.

What is the classify_id for?

It links the campaign to the product's classification record in the catalog, enabling direct product page links.


  • AI Overview - Central AI dashboard
  • Products - Product catalog management
  • API Calls - AI API call log
  • Bestselling Results - Best-selling product tracking