# Marketing sources

Connect a lead vendor, choose which agents its leads go to, and give the vendor its posting URL.

## What a marketing source is

A marketing source is one vendor's way into Mav. Each source has its own posting URL. When the vendor posts a lead there, Mav saves the contact and starts a conversation with one of the agents you picked. Use one source per vendor, so every contact shows where it came from.

## Find your sources

Click the lightning bolt next to **Agents** in the sidebar, or **Integrate a Marketing Source** on Home. The page has two parts:

- **Directory** lists the vendors Mav already works with. A connected vendor shows **Connected** and how many sources you have with it.
- **All sources** lists every source on your account, from directory vendors, other vendors and custom sources alike.

Everyone on the account can see this page. Only Managers can add, change or remove a source.

## Add a source

For a vendor in the directory, click **Integrate** on its tile. To connect a vendor you already have a source with, click **Add another** on its tile. For anyone else, click **Add source** and pick the vendor under **Lead source**, or choose **Custom (not in the directory)**. Then fill in:

| Field | What it does |
|---|---|
| **Source name** | Fills in from the vendor's name. Rename it any time. Two sources on one account can't share a name, even with different capital letters. |
| **Transfer DID** | Optional. The number Mav dials to reach a rep on a transfer, when the vendor doesn't send one with the lead. |
| **Route to agents** | The agents this source's leads go to. |

Not buying from a directory vendor yet? **Request leads** on its tile emails their sales team.

## Route leads to agents

Leads split evenly across the agents you pick: two agents get 50% each, three get about 33% each. A contact always goes to the same agent, so a repeat lead lands with the agent who already has it. Every agent on a source must be the same kind, like all auto insurance agents.

To change the split, click **Edit agents** on the source, tick the agents you want and click **Save routing**.

To pause a source, clear all its agents. Leads that arrive while it's paused are saved as contacts, but no agent works them.

## Rules

Rules act on a lead based on the fields the vendor sends with it. Click the funnel icon on a source's card to open **Rules**, then **Add a rule**. Each rule reads "when this field meets this condition, then do this":

- **When field**: a field this source has sent, or any field Mav knows by name. Send a test lead first to pick from the source's own fields.
- **Condition**: **is any of**, **is none of**, **is blank** or **is present**. Separate several values with commas. Field names and values match regardless of capital letters.
- **Then**: one of three actions.

| Action | What it does |
|---|---|
| **Skip lead** | The contact is saved but not worked, and shows **Filtered**, like a blocked number. |
| **Use transfer DID** | Live calls for this lead transfer to the number you enter. The first matching DID rule wins, ahead of the number the vendor sent and the source's **Transfer DID**. |
| **Wait before texting** | The first text waits the hours or days you set, then still goes out inside the contact's allowed hours. |

Rules run in order. To wait on every lead from a source, use a field every lead has, like **phone is present**. Click **Save Rules** when you're done.

## Give the vendor the posting URL

Click **Integration** on the source. It shows the **Posting URL** with a **Copy** button, the **Lead Parameters** the vendor can send and an example request. Only `phone` is required; everything else the vendor sends is kept on the contact under **Properties**.

To send it all as one public link, click **Copy link** under **Share with your vendor**. See [Share the integration guide](/knowledge/integrations/lead-sources-and-marketing-webhooks#share-the-integration-guide). For field mapping and the debug log, see [Lead sources and marketing webhooks](/knowledge/integrations/lead-sources-and-marketing-webhooks).

## From lead to first text

1. The vendor posts the lead to the source's URL.
2. Mav saves the contact, or finds the contact already on your account with that phone.
3. Mav picks the agent and starts a conversation.
4. Mav checks it can reach the contact: a valid number, no opt-out, not recently reassigned, not skipped by a rule, and not on your blocked numbers or a scrub service you turned on. See [Blocked numbers and scrub services](/knowledge/features/blocked-numbers-and-scrub-services).
5. The agent sends its first text within seconds, or calls first if the agent is set up to.

A directory source labels each contact with the vendor and your source name, and the vendor can't change it. A custom source uses the `source` and `sub_source` the vendor sends.

## Repeat leads

When the phone is already a contact on your account, Mav uses that contact. It doesn't overwrite the name, email or other details on file. An open conversation with the same agent carries on; a different agent starts a new conversation in its place.

## Edit or remove a source

Click the pencil on a source to rename it or change its **Transfer DID**. **Remove source** deletes the source and its debug log, and its posting URL stops taking leads. When you remove the last source for a directory vendor, its tile goes back to **Integrate**.

## Who can do what

| Action | User | Manager |
|---|---|---|
| See sources, **Integration** and **Debug** | Yes | Yes |
| Add, integrate, route, edit, map fields, set rules, remove | No | Yes |