Skip to content

Playbooks

Playbooks are standard operating procedures (SOPs) for Influencer (IFM). Use calls.md for payload shape and required fields.

Surface availability (explicit)

  • API Gateway: Available.
  • Direct Lambda: Not offered.
  • CLI: Available (g3n influencer ..., API Gateway).
  • MCP: Available.

Playbook: Campaign + attribution

Goal: Create a campaign and record attribution events.

Why this sequence:

  • Campaigns define the incentive structure.
  • Attribution events drive earnings and downstream payouts.

Preconditions

  • Valid org session/API key.

SOP (happy path)

  1. Create influencer profile (POST /profile/create) if not already present.
    • Reason: ties attribution to an influencer identity.
  2. Create campaign (POST /campaign/create).
    • Reason: defines the campaign scope, rules, and timeline.
  3. Set discount tiers (POST /discount-tier/set) if applicable.
    • Reason: configures discount ladders for referral performance.
  4. Record attribution (POST /attribution/record) on eligible events.
    • Reason: captures conversions for earnings.
  5. Verify (POST /campaign/get, /campaign/list, /attribution/record audit via list endpoints as applicable).
    • Reason: confirm campaign state and attribution intake.

Outputs

  • Active campaign with recorded attribution events.

Failure modes / remediation

  • invalid-state: ensure campaign is active before recording attribution.
  • not-found: check influencer profile and campaign IDs.

Cross-service relationships

  • SCM: sales/returns events often drive attribution.

Playbook: Earnings + payout cycle

Goal: Manage earnings, holds/clawbacks, and payouts.

Why this sequence:

  • Earnings flow from attribution and must be approved before payout.

Preconditions

  • Attribution events exist and are eligible.

SOP (happy path)

  1. List earnings (POST /earnings/list).
    • Reason: review computed earnings.
  2. Apply holds or clawbacks (POST /earnings/hold, /earnings/clawback) when required.
    • Reason: enforce policy or dispute outcomes.
  3. Release earnings (POST /earnings/release) when conditions are met.
    • Reason: mark earnings as ready for payout.
  4. Set payout readiness (POST /payout/ready/set) and submit payout (POST /payout/submit).
    • Reason: move from eligible to payable.
  5. Generate statements (POST /statement/create, /statement/get).
    • Reason: provide audit-friendly payout records.

Outputs

  • Payouts issued with statements and audit trail.

Failure modes / remediation

  • invalid-state: ensure holds are cleared before release.

Cross-service relationships

  • Accounting: payout records may be exported downstream.