# Deals and statuses

> A deal is one creator making the videos for one campaign. This is every status it can be in, who moves next, and what your integration can do there.

## How a deal runs

1. The brand publishes a campaign. Matching creators are ranked into a shortlist, and creators can also ask to join.
2. The brand invites creators with `invite_creators`. Each invite is a deal with status `invited`.
3. The creator says yes with `respond_to_invite`. The deal is `accepted`.
4. The brand starts the deal on yapfactory.com. Their card is charged and the payment is held. The deal is `funded`.
5. The creator films and uploads a draft on yapfactory.com. The deal is `draft_submitted`.
6. The brand asks for changes with `request_revision`, or approves on yapfactory.com. Approving pays the creator.
7. The deal is `completed`, and `schedule_post` can send the video to the brand's own accounts.

> Three steps always happen on yapfactory.com, never through the API: starting a deal (charges the brand), approving a draft (pays the creator) and uploading a draft. `start_deal` and `approve_draft` return the link to show the person.

## Deal statuses

| Status | What it means | Who moves next | From the API |
| --- | --- | --- | --- |
| `invited` | The brand invited the creator. The invite lasts 2 days. | Creator | `respond_to_invite` (creator) |
| `declined` | The creator said no, or the invite ran out. | Nobody | `invite_creators` again re-opens the same deal |
| `accepted` | The creator said yes. The brand has 3 days to start the deal. Nothing is charged yet. | Brand | `start_deal` returns the link; `pass_on_creator` says not this time |
| `funded` | The brand started the deal. Payment is held by Yap Factory, and the creator films. | Creator | `send_deal_message` |
| `draft_submitted` | A draft is waiting for the brand's review. After 3 days without an answer it's approved automatically. | Brand | `request_revision`; `approve_draft` returns the link |
| `revision_requested` | The brand sent the draft back with notes. The creator uploads a new version. | Creator | `send_deal_message` |
| `reshoot_offered` | Only on older deals: a paid re-record was offered. | Brand | Read only |
| `draft_approved` | The brand approved the draft. The creator is paid and the final file is released. | Nobody | Read only |
| `posted` | Delivered and posted (campaigns that include posting). | Nobody | Read only |
| `completed` | Done. The video is in the brand's library. | Nobody | `list_postable_videos`, `schedule_post` |
| `stalled` | A draft is overdue. One upload puts the deal back in review. | Creator | `send_deal_message` |
| `cancelled` | Called off: the brand passed or cancelled, or a payment never came. | Nobody | Read only |
| `disputed` | One side asked Yap Factory to step in. We decide and both sides are told. | Yap Factory | Read only |

`list_deals` with `status=open` leaves out `declined`, `completed` and `cancelled`. `get_deal` returns `nextStep`, a sentence that says what happens next in the person's own words, so show that instead of writing your own.

Every status change sends a `deal.updated` [webhook](https://yapfactory.com/developers/webhooks.md) with `status` and `previousStatus`.

## Campaign statuses

| Status | What it means |
| --- | --- |
| `draft` | Only the brand can see it. The brief can be changed freely. |
| `live` | Creators can see it and ask to join. The brand can invite. |
| `paused` | Hidden from creators. Deals already under way carry on. |
| `closed` | Finished. Deals already under way carry on. |

`publish_campaign` takes a draft live. `set_campaign_status` moves between `live`, `paused` and `closed`.

## Campaign templates

| Template | What the creator makes | Where the brand can use it |
| --- | --- | --- |
| `one_video` | 1 video | The brand's own channels, no ads |
| `test_openings` | 1 video with 3 different openings | The brand's own channels, no ads |
| `ad_bundle` | 3 videos | Paid ads for 3 months |

## Scheduled post statuses

| Status | What it means |
| --- | --- |
| `awaiting_approval` | Waiting for the brand to approve it on yapfactory.com. |
| `changes_asked` | The brand asked for changes before it goes out. |
| `scheduled` | Will go out at `publishAt`. |
| `publishing` | Being sent to TikTok or Instagram now. |
| `in_drafts` | Sent to the account's TikTok drafts. The person finishes it in the TikTok app. |
| `live` | Posted. `postUrl` has the link. |
| `needs_action` | Stopped. `problem` says why, and the person fixes it on yapfactory.com. |
| `missed` | Its time passed before it was approved. |
| `cancelled` | Cancelled before it went out. |

`list_posts` with `status=upcoming` returns everything that hasn't gone out yet. `post.published` and `post.failed` webhooks tell you when one lands or stops.

## The next step: `gettingStarted`

[`GET /me`](https://yapfactory.com/developers/api/get_account.md) (the `get_account` tool) returns `gettingStarted`: the one next thing worth doing, as `{ step, say, url }`, or `null` when nothing is waiting. `say` is a sentence for the person; `url` is there when the step happens on yapfactory.com.

| `step` | Who | Means |
| --- | --- | --- |
| `confirm_email` | Everyone | The email isn't confirmed yet. Nothing that acts works until it is. |
| `start_deal` | Brand | A creator said yes. Start the deal on its page to secure payment. |
| `review_draft` | Brand | A draft is waiting for review. |
| `create_campaign` | Brand | No campaigns yet: draft the first one. |
| `publish_campaign` | Brand | There are drafts but nothing live. |
| `invite_creators` | Brand | A campaign is live with nobody invited. |
| `answer_invite` | Creator | A brand's invite is waiting for a yes or no. |
| `upload_draft` | Creator | Payment is secured, or changes were asked for: film and upload on the deal page. |
| `browse_campaigns` | Creator | No open deals: look for campaigns to make. |
| `finish_profile`, `finish_onboarding` | Everyone | Sign-up isn't finished on yapfactory.com. |

---

HTML version: https://yapfactory.com/developers/statuses
