# Integrate Callingly With Brivity

Source: https://callingly.com/help/article/106-integrate-callingly-with-brivity

Callingly automatically connects to your Brivity account, allowing you to instantly trigger calls when new leads come in. The call results and recordings are then synced back to Brivity.

<div class="row relevant"><p><span class="material-icons">supervisor_account</span> Owners and Admins can set up integrations. <em class="float-right-desktop">Approx. reading time 5 min.</em></p></div>

<h2 id="connect-callingly-to-brivity">Connect Callingly to Brivity</h2>

<dl><dt>1.</dt><dd><strong>Navigate to the <a href="https://callingly.com/dashboard/integrations/new" target="_blank"><em>New Integration</em> page</a></strong>.</dd><dt>2.</dt><dd><strong>Click <em>Connect</em></strong> next to Brivity.</dd><dt>3.</dt><dd><p><strong>Paste your Brivity API key</strong>.</p><div class="callout-green"><span class="material-icons">info_outline</span><div><strong>Note</strong>: To get your API key, log in to Brivity and go to <em>Settings &gt; API</em>. If you don't see it, ask Brivity support to turn on API access for your account.</div></div></dd><dt>4.</dt><dd><strong>Click <em>Install</em></strong>. Callingly sets up a webhook in Brivity to receive your new leads.</dd></dl>

<h2 id="configure-settings">Choose Settings</h2>

Open the integration from the <a href="https://callingly.com/dashboard/integrations" target="_blank">Integrations</a> page. Its **Settings** tab has these options:

<div class="callout dashed"><h4>Name</h4><p>The integration's name in Callingly.</p><h4>Sync Lead Owner</h4><p>When Callingly assigns the lead to a user, set the same owner in Brivity. Each user must be matched to their Brivity user (see <a href="#syncing-lead-owner">below</a>).</p><h4>Sync Calls</h4><p>Log each of your reps' calls with a lead in Brivity.</p></div>

<p class="mb-2"><strong>What starts a call:</strong> a new lead in Brivity. Brivity sends each new lead to Callingly, and your routing rules decide which team calls it.</p>

<p class="mb-2">Two more tabs finish the setup:</p><ul class="mb-2"><li><strong>Routing</strong> decides which team calls each lead, and which sequence it follows. See <a href="https://callingly.com/help/article/82-understanding-call-routing" target="_blank">Understanding Call Routing</a>.</li><li><strong>Fields</strong> matches Brivity fields to Callingly's lead fields, including your own custom fields.</li></ul>

<h2 id="syncing-lead-owner">Sync Lead Owner</h2>

With <strong>Sync Lead Owner</strong> on, match each Callingly user to their Brivity user:

<dl><dt>1.</dt><dd><strong>Go to the <a href="https://callingly.com/dashboard/users" target="_blank">Users</a> page</strong> and click <strong>Edit</strong> next to the user.</dd><dt>2.</dt><dd><strong>Under <em>Integrations</em>, pick their account</strong> in the <em>Brivity User</em> dropdown.</dd><dt>3.</dt><dd><strong>Save</strong>, and repeat for each user.</dd></dl>

<h2 id="how-it-works">How It Works</h2>

When a new lead comes into Brivity, the following happens automatically:

1.  Brivity sends the lead information to Callingly via webhook
2.  Callingly checks the routing rules to determine which team should receive the call
3.  Your AI Agent calls the lead, asks any qualifying questions you've set, and warm-transfers the lead to one of your team members while the lead is still on the line, or offers a callback if nobody's free.
4.  When a team member talks with the lead, that call is logged back to Brivity (if Sync Calls is enabled)
5.  If lead ownership changes in Callingly, it's synced back to Brivity (if Sync Lead Owner is enabled)

<h2 id="next-steps">Next Steps</h2>

1.  **Test the integration**. During your team's call hours, create a test lead in Brivity with a phone number that isn't one of your users' numbers. Have a rep ready to take the transfer, then answer the AI's call like an interested lead.
2.  **Configure your Teams**. Set up your <a href="https://callingly.com/help/article/21-creating-and-managing-teams" target="_blank">Callingly Teams</a> so the right people receive calls for different lead sources.
3.  **Set the Call Schedule**. Configure your <a href="https://callingly.com/help/article/37-setting-availability-schedules" target="_blank">availability schedule</a> so nobody receives calls outside of work hours.

<h2 id="common-questions">Common Questions</h2>

#### How do leads get from Brivity to Callingly?

When you install the integration, Callingly automatically creates a webhook in Brivity. Whenever a new lead is created in Brivity, it's automatically sent to Callingly.

#### Can I route different lead sources to different teams?

Yes! Use the <strong>Routing</strong> tab in your integration's settings to route leads based on their source in Brivity. Each source can be directed to a different team.

#### Do call recordings sync back to Brivity?

Yes, when you enable "Sync Calls", Callingly creates a call event in Brivity that includes a link to the call recording.

#### Why does a lead show as disconnected from Brivity?

When Callingly tries to sync a lead back to Brivity and Brivity no longer has a matching contact record (for example, a contact was deleted in Brivity), Callingly automatically disconnects the lead from the CRM and logs a <em>crm_disconnected</em> activity on the lead. This prevents repeated sync errors.

To reconnect the lead, recreate the contact in Brivity, then email <a href="mailto:support@callingly.com">support@callingly.com</a> to link it to the lead in Callingly again.

Callingly also handles the case where a lead's email in Callingly has drifted from the email on file in Brivity (e.g. a typo at lead creation). In that situation, Callingly automatically re-syncs the lead's email from Brivity so future updates go through correctly — no action is needed on your part.
