fayzfayz sdk
PTEN

← Plugin catalog

plugin-marketing

Beta

@fayz-ai/plugin-marketing

Marketing analytics are always the same shape — channels, campaigns, a funnel, landing-page CVR — but what counts as a "conversion" changes per business. A salon converts a booking, a store converts an order, an agency converts a lead. plugin-marketing is one plugin that adapts to all of them: pick a domain preset (or pass an explicit conversion model + channels) and the funnel, channel…

Preview of plugin-marketing as the customer sees it
Full documentation is coming. For now, this page summarizes what the SDK catalog knows about the plugin.

Specs

Package@fayz-ai/plugin-marketing
Version0.2.1
Statusbeta
CapabilityPartial capability
Stable channel^0.2.1
Migrations4 migration(s)
FactorycreateMarketingPlugin()

Data model

TableKey columns
plg_marketing_social_accountsname, handle, platform, is_active
plg_marketing_content_plansaccount_id, name, status, weeks_count, start_date, objective
plg_marketing_content_postsplan_id, week_number, position, title, format, status
plg_marketing_ranklayer_integrationsapi_key, site_domain, active, last_sync_at
plg_marketing_ranklayer_sync_logintegration_id, status, message, fetched, written
plg_marketing_channelschannel_key, label, icon, kind, is_active, monthly_spend
plg_marketing_campaignsname, channel_key, status, starts_at, ends_at, spend

Convention: plg_ + tenant_id + RLS. Data model.

AI tools

idmodedescription
marketing.channel-performancereadReturns acquisition performance per channel (reach, conversions, CVR, spend, CPA).
marketing.top-channelsreadReturns the top acquisition channels ranked by conversions.
marketing.campaign-cvrreadLists campaigns with their conversion rate for a date range.
marketing.create-campaignpersistCreates an acquisition campaign on a channel. Resolve the channel first via queryData/searchRecords on marketing channels (use its channel key). The user confirms before creating.

Tools an agent can call against your app. Your app as a data layer.

Integrations

No hosted connector — external providers come in via the connector spine. integrations catalog.

Use this page as a skill. .md of this page is the agent-consumable contract — data model, tools and integrations in a single file an AI reads directly. Preview fayz skill add plugin-marketing is coming soon to install this as a skill. See Skills.

Integrate

Add the plugin to surfaces.admin.plugins in your app's app.manifest.json and run the doctor to validate:

{
  "surfaces": {
    "admin": {
      "plugins": [
        { "id": "marketing", "enabled": true }
      ]
    }
  }
}
npx fayz doctor

fayz doctor checks the manifest against the SDK catalog. See Configuration.