# TikTok Deal‑Flow Studio (Premium)

## Overview  
A **single‑click Notion workspace** that lets TikTok creators:

* Track brand deals from prospect to payout  
* Schedule sponsored videos & auto‑populate production steps  
* Generate Stripe/PayPal invoices **and** send them via Gmail/Outlook  
* Keep FTC‑compliant disclosures with a built‑in legal‑review library  
* See ROI trends in live charts (Google Data Studio embed)  
* Collaborate with multiple creators, assign roles, and view a team activity log  
* Receive Slack / email alerts for deadlines, contract expirations, and compliance failures  
* Back‑up the entire deal history with one click (CSV / JSON export)  

All components are linked via relational databases, pre‑made views, and **conditional** template‑button workflows.

---

## 1️⃣ Onboarding Guide (Page)

| Step | Description | Action |
|------|-------------|--------|
| **1. Duplicate Master Template** | Click **Duplicate** on the top‑level page → *TikTok Deal‑Flow Studio (Premium)*. | ✅ |
| **2. Run the “Setup Wizard”** | Press the **Setup Wizard** button (see *Backup & Version Control* section). It creates the required Zapier webhooks, Google Data Studio embed, and Slack channel. | ✅ |
| **3. Watch the Intro Video** | Embedded YouTube video (5 min) walks through the first 5 deals. | 🎥 |
| **4. Import Example Data** | Click **Import Sample Deals** (button in *Deal Tracker*). Five pre‑filled deals appear, showing the full workflow. | 📊 |
| **5. Invite Your Team** | In the *Team Collaboration* page, add members and assign **Creator**, **Editor**, or **Finance** roles. | 👥 |

> **Tip:** After the wizard finishes, you’ll see a **“All Set!”** banner confirming every integration is live.

---

## 2️⃣ Deal Tracker (Database)

| Property | Type | Description |
|----------|------|-------------|
| **Deal ID** | Text (auto‑generated) | `DT‑{{formatDate(now(), "YY")}}‑{{format(prop("Created"), "000")}}` |
| **Brand** | Text | Partner name |
| **Campaign** | Text | Campaign title |
| **Status** | Select | `Prospecting`, `Negotiating`, `Signed`, `Invoiced`, `Paid`, `Closed` |
| **Contract Sent** | Date | Date contract was emailed |
| **Payment Due** | Date | Invoice due date |
| **Estimated Value** | Number (currency) | Forecasted payment before negotiation |
| **Paid Amount** | Number (currency) | Amount received |
| **ROI %** | Formula | `if(prop("Paid Amount") > 0, (prop("Paid Amount") / prop("Estimated Value")) * 100, 0)` |
| **Payment Platform** | Select | `Stripe`, `PayPal`, `Manual` |
| **Invoice Status** | Formula | `if(prop("Status") == "Invoiced", "🟡 Pending", if(prop("Status") == "Paid", "🟢 Paid", "—"))` |
| **Created** | Created time | Auto‑filled |
| **Last Updated** | Last edited time | Auto‑filled |
| **Team Owner** | Person | Creator responsible for the deal |
| **Zapier Invoice Webhook** | URL | Auto‑filled by the *Setup Wizard* (read‑only) |

### Views

| View | Type | Filters / Sort |
|------|------|----------------|
| **Active Deals** | Board (grouped by **Status**) | `Status != "Closed"` |
| **Upcoming Payments** | Table | `Payment Due ≤ dateAdd(now(), 7, "days")` |
| **Team Dashboard** | Table | `Team Owner = currentUser()` (saved view for each role) |
| **All Deals (CSV Export)** | Table | No filter (used by the *Export* button) |

---

## 3️⃣ Content Calendar (Linked Board)

*Relation:* `Deal ID` → **Deal Tracker**  
*Rollup:* `Publish Date` = `dateAdd(prop("Contract Sent"), 30, "days")` (adjust per brand)  

| Property | Type | Details |
|----------|------|---------|
| **Video Title** | Title |
| **Deal ID** | Relation (Deal Tracker) |
| **Publish Date** | Date (rollup) |
| **Production Stage** | Select | `Idea`, `Script`, `Filming`, `Editing`, `Ready`, `Posted` |
| **Slack Reminder** | Formula | `if(prop("Publish Date") <= dateAdd(now(), 2, "days"), "🔔", "")` |

**Board groups:** Production Stage → columns.

> **Tip:** The `Slack Reminder` column automatically shows a bell icon when a video is within 48 h of publishing. The *Automated Reminders* Zap reads this property and posts to Slack.

---

## 4️⃣ Invoices Database

| Property | Type | Description |
|----------|------|-------------|
| **Invoice #** | Text (auto‑generated) | `INV‑{{formatDate(now(), "YY")}}‑{{format(prop("Created"), "000")}}` |
| **Deal ID** | Relation (Deal Tracker) |
| **Brand** | Rollup (Deal Tracker → Brand) |
| **Campaign** | Rollup (Deal Tracker → Campaign) |
| **Invoice Date** | Date (today) |
| **Due Date** | Date (rollup from Deal Tracker → Payment Due) |
| **Amount** | Rollup (Deal Tracker → Estimated Value) |
| **Deliverables** | Relation (Content Calendar) – filtered to the linked Deal |
| **Status** | Select | `Draft`, `Sent`, `Paid`, `Cancelled` |
| **Payment Platform** | Rollup (Deal Tracker → Payment Platform) |
| **Stripe Link** | URL (populated by Zap) |
| **PayPal Link** | URL (populated by Zap) |
| **Created** | Created time |
| **Last Updated** | Last edited time |

### Views

| View | Type | Filters |
|------|------|---------|
| **Pending Invoices** | Table | `Status = "Draft"` |
| **Sent & Paid** | Table | `Status != "Draft"` |
| **Finance Export** | Table | No filter (used by *Export* button) |

---

## 5️⃣ Invoice Generator (Conditional Template Button)

> **Location:** Inside the **Deal Tracker** page (top‑right).

1. **Create a Template Button** → **Name:** `Generate Invoice (if ready)`  
2. **Button Action:** *Create a new page in **Invoices** with the following preset properties*  

| Property | Value |
|----------|-------|
| **Deal ID** | `{{relation}}` (auto‑linked to the current deal) |
| **Brand** | `{{rollup Brand}}` |
| **Campaign** | `{{rollup Campaign}}` |
| **Invoice Date** | `{{today}}` |
| **Due Date** | `{{rollup Payment Due}}` |
| **Amount** | `{{rollup Estimated Value}}` |
| **Status** | `Draft` |
| **Payment Platform** | `{{select Payment Platform}}` |

3. **Conditional Logic (Zapier):**  
   *The button also triggers a **Zapier Webhook** (URL stored in the deal’s **Zapier Invoice Webhook** property). The Zap checks `Status`. If `Status` = `Signed` **or** `Invoiced`, it proceeds to create a Stripe/PayPal invoice and updates the **Invoices** record with the returned payment link. If the condition fails, the Zap returns a “❌ Not ready” message in a Notion comment.*

> **Zapier Setup (one‑time):**  
> *Trigger:* **Notion – New Page in Invoices** (filter `Status = Draft`).  
> *Action 1:* **Filter** – Only continue if `Payment Platform` ≠ `Manual`.  
> *Action 2:* **Stripe – Create Invoice** (or **PayPal – Create Invoice**) using the `Amount` and `Brand` fields.  
> *Action 3:* **Notion – Update Page** – Write the returned payment URL into `Stripe Link` or `PayPal Link` and set `Status` to `Sent`.  
> *Action 4:* **Slack – Send Message** – “Invoice generated for {{Brand}} – {{Amount}}”.  

---

## 6️⃣ FTC Compliance Checklist (Database)

| Property | Type | Description |
|----------|------|-------------|
| **Checklist ID** | Text (auto‑generated) |
| **Deal ID** | Relation (Deal Tracker) |
| **Video Title** | Rollup (Content Calendar → Video Title) |
| **Disclosure Added** | Checkbox (required) |
| **Link in Caption** | Checkbox (required) |
| **Disclosure Timestamp** | Text (e.g., `0:05`) |
| **Legal Script** | Relation (Legal Library) |
| **Compliance OK** | Formula | `if(and(prop("Disclosure Added"), prop("Link in Caption")), "✅", "⚠️")` |
| **Reviewed By** | Person |
| **Reviewed Date** | Date |
| **Comments** | Text |

### Views

| View | Type | Filters |
|------|------|---------|
| **Pending Compliance** | Table | `Compliance OK = "⚠️"` |
| **All Checks** | Table | No filter (used for audit) |

---

## 7️⃣ Legal Library (Database)

| Property | Type | Description |
|----------|------|-------------|
| **Script ID** | Text (auto‑generated) |
| **Title** | Title (e.g., “Standard FTC Disclosure – Sponsored”) |
| **Category** | Select | `General`, `Affiliate`, `Giveaway`, `Paid Promotion` |
| **Full Text** | Text | Ready‑to‑copy disclosure script |
| **Last Updated** | Date |
| **Source Link** | URL (link to official FTC guidance) |

**Auto‑populate:** In the *FTC Compliance* template button, the **Legal Script** relation is set to the first record where `Category` matches the deal’s **Campaign** tag (e.g., “Giveaway”). The script text can be copied with one click.

---

## 8️⃣ ROI Dashboard (Page)

### 8.1 Summary Table

| Metric | Formula / Rollup |
|--------|------------------|
| **Total Earned** | Rollup `Paid Amount` → **Sum** (Deal Tracker) |
| **Total Estimated** | Rollup `Estimated Value` → **Sum** |
| **Overall ROI %** | Formula: `prop("Total Earned") / prop("Total Estimated") * 100` |
| **Avg Deal Size** | Formula: `prop("Total Earned") / count(prop("Deal ID"))` |
| **Deals Closed This Month** | Rollup `Paid Amount` → **Count** where `Payment Due` is in the current month |

### 8.2 Visual Analytics (Embedded Google Data Studio)

1. **Create a Google Data Studio report** that pulls the exported CSV (see *Backup & Version Control*).  
2. **Copy the embed link** (`https://datastudio.google.com/embed/reporting/…`).  
3. In Notion, add a **/embed** block → paste the link.  
4. The chart shows **Month‑over‑Month ROI**, **Revenue by Brand**, and **Average Production Time**.

> **Tip:** The report refreshes automatically when the CSV export (triggered by the *Export* button) updates.

---

## 9️⃣ Team Collaboration (Pages)

### 9.1 Team Dashboard (Page)

| Section | Content |
|---------|---------|
| **My Deals** | Filtered view of **Deal Tracker** where `Team Owner = currentUser()` |
| **Team Pipeline** | Board view of **Deal Tracker** (all deals) – grouped by **Status** |
| **Activity Log** | Database (see below) showing every action (deal created, invoice sent, compliance updated) |
| **Roles** | Table of members with assigned Notion permissions (Creator = Edit, Finance = Edit + Export, Viewer = Read‑only) |

### 9.2 Activity Log (Database)

| Property | Type | Description |
|----------|------|-------------|
| **Log ID** | Text (auto‑generated) |
| **Actor** | Person |
| **Action** | Select | `Created Deal`, `Sent Invoice`, `Marked Paid`, `Compliance Updated`, `Exported Backup` |
| **Target** | Text | e.g., `Deal DT‑002` |
| **Timestamp** | Created time |
| **Details** | Text (optional notes) |

*Automation:* A **Zapier “Notion – Updated Page”** trigger watches the **Deal Tracker**, **Invoices**, and **FTC Checklist**. It creates a new **Activity Log** entry for each change.

---

## 🔔 Automated Reminders (Zapier Integration)

| Trigger | Condition | Action |
|---------|-----------|--------|
| **Notion – Updated Page** (Deal Tracker) | `Payment Due` is within 3 days **and** `Status != "Paid"` | **Slack – Send Channel Message** “⚠️ Payment due for {{Brand}} ({{Amount}}) in 3 days.” |
| **Notion – Updated Page** (Content Calendar) | `Publish Date` is within 2 days | **Gmail – Send Email** to creator with subject “Upcoming video: {{Video Title}} – publish tomorrow”. |
| **Notion – Updated Page** (FTC Checklist) | `Compliance OK = "⚠️"` | **Slack – Send Direct Message** to the assigned creator: “❗ Disclosure missing for {{Video Title}}”. |

*All Zap URLs are stored in the **Setup Wizard** page for easy copy‑paste.*

---

## 💾 Backup & Version Control (Page)

### 9.1 One‑Click Export Button

1. **Add a Template Button** on the *Backup & Version Control* page → **Name:** `Export Deal History`.  
2. **Button Action:** *Create a new page* in a hidden **Exports** database with the following properties:  

| Property | Value |
|----------|-------|
| **Export ID** | `EXP‑{{formatDate(now(), "YYMMDD")}}‑{{format(prop("Created"), "000")}}` |
| **Export Date** | `{{today}}` |
| **CSV Link** | **Zapier Webhook** (see below) |
| **JSON Link** | **Zapier Webhook** (see below) |
| **Notes** | Text (auto‑filled “Full deal history export”) |

3. **Zapier Workflow:**  

   *Trigger:* **Notion – New Page in Exports** (filter `Export ID` exists).  
   *Action 1:* **Notion – Export Database** (Deal Tracker) → **CSV**.  
   *Action 2:* **Notion – Export Database** (Invoices) → **CSV**.  
   *Action 3:* **Google Drive – Create File** (store both CSVs).  
   *Action 4:* **Notion – Update Page** (Exports) → write the Drive share links into `CSV Link` and `JSON Link`.  

The resulting page contains permanent links to the latest backup files.  

### 9.2 Version History

*Every time a deal, invoice, or compliance record is edited, the **Activity Log** records the change.*  
To view a full snapshot, open the **Exports** page and click the latest CSV link.

---

## 📥 How to Import & Activate the Premium Template  

1. **Create a new page** in your workspace → name it **TikTok Deal‑Flow Studio (Premium)**.  
2. Click **Import → Markdown & CSV**, select the `.md` file you just received.  
3. Notion will render each `##` heading as a sub‑page. **Open each sub‑page** and click the three‑dot menu → **Turn into → Database** (choose Table, Board, or Gallery as indicated).  
4. **Re‑create relations** exactly as described in each section (Deal Tracker ↔ Invoices, Deal Tracker ↔ FTC Checklist, Deal Tracker ↔ Content Calendar, etc.).  
5. **Paste the Zapier webhook URLs** (provided in the *Setup Wizard* page) into the corresponding **Zapier Invoice Webhook** and **Export** properties.  
6. **Add the Template Buttons**:  

   * `/template button` → *Generate Invoice (if ready)* → configure the action table as shown.  
   * `/template button` → *Export Deal History* → configure the action table as shown.  

7. **Embed the Google Data Studio chart**: copy your report’s embed link, then add a `/embed` block on the *ROI Dashboard* page.  
8. **Set up Slack & Gmail alerts**: follow the Zapier steps in the *Automated Reminders* table; each Zap will ask for your Slack workspace and Gmail account – grant access once.  
9. **Invite your team** via the *Team Collaboration* page → **Share** → assign the appropriate Notion permissions (Creator, Finance, Viewer).  
10. **Run the “Setup Wizard”** button (found at the top of the *Backup & Version Control* page). It will:  

    * Create the required Zapier webhooks (if you haven’t already).  
    * Generate a temporary Google Data Studio report and embed it.  
    * Add the hidden **Exports** database.  

11. **Test the flow**:  

    * Click **Generate Invoice (if ready)** on a deal with `Status = Signed`.  
    * Verify a Stripe/PayPal invoice appears in the **Invoices** page and a Slack notification is sent.  
    * Mark a video as `Published` → confirm the compliance checklist auto‑populates the appropriate legal script.  

Your premium TikTok Deal‑Flow Studio is now fully functional, collaborative, and automated. 🎉