# Form Router

{% hint style="info" %}
Requirements:

* Form mapped.
* Routing Rules created.
* Event Type created.
  {% endhint %}

## **Components of a Distro Router:** <a href="#components-of-a-distro-router" id="components-of-a-distro-router"></a>

1. **Forms:** This is the initial information provided by the lead on your website. It's the starting point of the lead's journey in your system.
2. **Ownership Rules:** These rules are designed to align each lead with a specific Distro user, primarily utilized for associating existing CRM contacts with their respective owners or implementing account-based marketing strategies.
3. **Distribution Rules:** These are designed to qualify leads and allocate them either according to custom criteria or through a round-robin system when a meeting is deemed necessary.
4. **Event Type**: they allows you to determine the nature of meetings that are organized once a lead completes a specific form and qualifies for a meeting.

## Creating a Form Router

{% stepper %}
{% step %}
Navigate to **Form Routers** tab in the left sidebar

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2F5mi4qSZHnMlcqRBICqHg%2FCleanShot%202025-01-13%20at%2014.53.41%402x.png?alt=media&#x26;token=b7c8ad7e-3cf7-4b05-891d-359ec31577e8" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the "+ New Form Router" button in the top-right corner

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2FdjEuNNqHR70L9owbiCtA%2FCleanShot%202025-01-13%20at%2014.54.16%402x.png?alt=media&#x26;token=11ba3560-5cba-4448-8205-938a388237e4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click on "Create Router"
{% endstep %}
{% endstepper %}

## Configure your Form Router

### Select a Matching Form

Before you can start distributing leads, you'll need to connect your inbound form with Distro. This connection lets you use any information collected in your form – whether it's shown to users or collected behind the scenes – to create smart routing rules for your leads.

[Create a routing form](https://help.distro.so/routing-forms/overview) if you have not done so yet.

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2FNfXQyFMcqDi4f8SvZr6k%2FCleanShot%202025-01-13%20at%2015.56.54%402x.png?alt=media&#x26;token=f1850cb7-bcbf-4a3a-a4b6-5c1f084e7911" alt=""><figcaption></figcaption></figure>

### Select Ownership Rules

Distro automatically checks if there's already a relationship established in your CRM. If there is, the lead gets directed to the right sales rep, ensuring consistent communication and avoiding any mix-ups in ownership.

These ownership rules are evaluated in order, from top to bottom. The first rule that matches will be applied, so it's important to arrange your rules in order of priority.

Your account comes pre-configured with these ownership rules:

1. Companies: New bookings are assigned to the existing company owner
2. Contacts: New bookings are assigned to the existing contact owner
3. Leads: For Salesforce users, new bookings are assigned to the existing lead owner

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2FBJklGlkVKewnikhkMz2m%2FCleanShot%202025-01-13%20at%2016.01.46%402x.png?alt=media&#x26;token=1d54e1ad-71aa-4c82-8e97-81dec41c3941" alt=""><figcaption></figcaption></figure>

### Select Distribution Rules

When new leads or meetings come in without existing relationships in your CRM, Distro uses distribution rules to assign them to your sales team. These rules ensure leads are fairly and efficiently allocated based on your team's needs and structure.

These distribution rules are evaluated in order, from top to bottom. The first rule that matches will determine the assignment, so arrange your rules with the most specific conditions at the top.

Your account can be configured with various distribution methods:

1. Round-Robin: Automatically rotates leads among team members
2. Territory-Based: Assigns leads based on geographic or market segments
3. Custom Logic: Routes leads based on specific criteria like deal size, industry, or product interest

{% hint style="info" %}
**Distribution method**:

**Strict Round-Robin**: follows a fixed rotation order. Each team member receives their next lead strictly in sequence, ensuring perfectly even distribution.

**Flexible Round-Robin**: balances distribution while considering member availability and capacity. May skip temporarily unavailable team members to maintain efficient lead routing.
{% endhint %}

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2FvO4lkWod3J1cIZlTJlM1%2FCleanShot%202025-01-13%20at%2016.04.57%402x.png?alt=media&#x26;token=4c85da57-f8ec-46ae-9163-e3e50747ba98" alt=""><figcaption></figcaption></figure>

### Change settings of Form Router

#### Form Router Name

Enter a descriptive name for your router that helps identify its purpose (e.g., "Account Executives - NA"). This name will be used throughout Distro to reference this specific routing configuration.

#### Event Type Selection

Choose which type of meeting this router should schedule. You can select from your existing meeting types that have been configured as booking forms.

#### Meeting Notes

* Enable "Allow prospects to add notes to their booking" to let prospects provide additional context or questions when scheduling their meeting
* When enabled, prospects can share important information that helps prepare your team for the meeting

#### Email Processing

* Enable "Remove suffixes from prospect emails after '+'" to standardize email handling
* Example: '<adrien+test@distro.so>' will be processed as '<adrien@distro.so>'
* This helps prevent duplicate leads and ensures consistent matching in your CRM

### Redirect URLs

Configure where prospects should be directed after different booking outcomes:

#### Successful Booking

* Set the "Booked Meeting Redirect URL" to specify where prospects are sent after successfully scheduling a meeting
* Example: <https://example.com/booked-meeting>

#### No Booking

* Set the "No Booking Redirect URL" to specify where prospects are sent when no booking has been made.
* Example: <https://example.com/no-booking>

#### Disqualified

* Set the "Disqualified Redirect URL" to specify where prospects are sent if they don't meet qualification criteria
* Example: <https://example.com/disqualified>

<figure><img src="https://2442454418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQA3GQNrIYVrPQ90NBwRa%2Fuploads%2FdSbTTwkl9S6uW0AUpwE8%2FCleanShot%202025-01-13%20at%2016.15.20%402x.png?alt=media&#x26;token=5c6b1a73-3c74-41a8-b070-ee7653b2b812" alt=""><figcaption></figcaption></figure>

### Select How Distro Sync Data to CRM

Configure how Distro should create and update records in your CRM when leads submit forms and book meetings. These settings ensure your CRM data stays accurate and up-to-date.

{% hint style="info" %}
Note: records must exist in your CRM or be created by Distro to update ownership. Updates will only occur if the corresponding options are enabled.
{% endhint %}

{% tabs %}
{% tab title="HubSpot" %}
**Create contact if does not exist**

* Enable this setting to automatically create new contacts in Hubspot when no matching contact is found
* Keeps your CRM database growing with new prospects

**Update existing contact fields**

* When enabled, Distro will update contact information in Hubspot when matching contacts are found
* Ensures contact data stays current with the latest form submissions

**Create meeting**

* Creates a meeting record in Hubspot when a booking is confirmed
* Maintains a complete history of prospect interactions
  {% endtab %}

{% tab title="Salesforce" %}
{% hint style="danger" %}
In Salesforce, a record can either be a Lead OR a Contact, but not both. Choose which type of record you want Distro to create based on your sales process.
{% endhint %}

**Create lead if does not exist**

* Creates a new lead in Salesforce when no matching lead or contact is found
* Helps capture all new prospects in your pipeline

**Create contact if does not exist**

* Automatically creates new contacts in Salesforce when no matching contact exists
* Works in conjunction with lead creation settings

**Create account if does not exist**

* Creates a new account in Salesforce when needed for contact creation
* Ensures proper record relationships are maintained

**Update existing lead fields**

* Updates lead information in Salesforce when matching leads are found
* Keeps lead data synchronized with new form submissions

**Update existing contact fields**

* Updates contact information in Salesforce when matching contacts are found
* Maintains accurate contact records

**Create activity**

* Creates an activity record in Salesforce when a booking is confirmed
* Tracks all prospect interactions within Salesforce
  {% endtab %}
  {% endtabs %}

### Install Form Router

After configuring your router settings, you'll need to install the router on your webpage to start capturing and routing leads. Add the following code snippet to your website:

1. Copy the router code snippet

* Add this code to your website's HTML, preferably just before the closing \</body> tag
* The code includes Distro's JavaScript library and your unique router configuration

```javascript
javascriptCopy<script type="text/javascript" src="https://app.distro.so/inbound.js"></script>
<script type="text/javascript">
window.distro = new Distro({ routerId: '36' })
distro.schedule('#hsForm_3c2cf1b6-c45d-47c2-a06d-ccc792b37595')
</script>
```

2. Verify installation

* After adding the code, verify that your form is properly connected to Distro
* Test the form submission to ensure leads are being routed correctly
