---
title: Example - Replicating a contact into a Salesforce lead
related:
  - https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/working-with-contacts.md
  - https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/scoring-contacts.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Info:** **Enterprise license required**
>
> Features described on this page require the **Kentico Xperience Enterprise** license.

The following example demonstrates how the system replicates a sample contact into a Salesforce lead.

**Important**: The sites must be [authorized](https://docs.kentico.com/13/integrating-3rd-party-systems/salesforce-integration/configuring-salesforce-integration.md) for Salesforce access.

## Creating the replication score

First you need to define a [score](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/scoring-contacts.md) to determine which contacts the system will replicate.

1. Open the **Scoring** application.
2. Click **New score**.
3. Type _SF Score_ as the score's **Display name** and click **Save**.
4. Switch to the **Rules** tab of the new score and click **New rule**.
5. Set the following properties for the rule:

   - **Rule name**: SF Rule
   - **Score value**: 50
   - **Rule type**: Attribute
   - **Attribute**: Job title
   - **Condition**: _Contains_ - Manager

   ![Creating a new score rule](https://docs.kentico.com/docsassets/13/example-replicating-a-contact-into-a-salesforce-lead/creating_score_rule.png "Creating a new score rule")
6. Click **Save**.

This _SF Score_ grants 50 points to all contacts who have the word _Manager_ in their job title.

## Creating a new contact

Now you need to create a [contact](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/working-with-contacts.md) that fulfills the rule of the previously defined score. On live deployments, the system automatically creates and maintains contacts for the website visitors, but you can add a contact manually to try out the Salesforce replication.

1. Open the **Contact management** application on the **Contacts** tab.
2. Click **New contact** and fill in the following attributes:

   - **First name**: Kenny
   - **Last name**: Weathers
   - **Job title**: OMF Manager
   - **Address 1**: N 14th St
   - **City**: Cottonwood
   - **Country:** USA
   - **State**: Arizona
   - **Business phone**: 1-575-123-456
   - **Email address**: kenny@cottonwood.local
3. Click **Save**.
4. Go back to the **Scoring** application.
5. **Edit** () the _SF score_.

On the **Contacts** tab, you can see that your new contact has 50 points in the replication score. The system awarded the points because the contact contains the word _Manager_ in the **Job title** field.

![Contact with assigned score of 50](https://docs.kentico.com/docsassets/13/example-replicating-a-contact-into-a-salesforce-lead/contact_with_assigned_score.png "Contact with assigned score of 50")

## Replicating the contact to Salesforce

You now need to configure the Salesforce replication settings.

1. Go to **Settings -> Integration -> Salesforce**.
2. Make sure that the [field mapping settings](https://docs.kentico.com/13/integrating-3rd-party-systems/salesforce-integration/configuring-salesforce-integration.md#mapping-contact-fields-to-salesforce-lead-fields) match your requirements.
3. Specify the replication score requirements through the following settings:

   - **Score**: Select your replication score (_SF Score_)
   - **Minimum number of points for replication**: 50
4. **Save** the settings.

You now have a contact that fulfills the replication criteria. By default, the system replicates contacts once every hour. You can however run the replication manually at any time.

### Starting the replication process manually

1. Open the **Scheduled tasks** application.
2. Select _(global)_ in the **Site** selector.
3. Click **Execute** () next to the **Salesforce replication** task.

## Result

After a couple of minutes at most, your contact should appear as a lead in Salesforce.

To check whether the replication was successful:

1. Log in to Salesforce using your account.
2. Navigate to the **Leads** tab.
3. Select **Recently Created** in the drop-down list of the **Recent Leads** section.

You should see the lead replicated from the Xperience contact. You can now work with the lead as with any other Salesforce lead.

![Contact replicated from Kentico into Salesforce](https://docs.kentico.com/docsassets/13/example-replicating-a-contact-into-a-salesforce-lead/replicated_contact.png "Contact replicated from Kentico into Salesforce")

You can also check the replication status of the contact in Xperience:

1. Open the **Contact management** application on the Contacts tab.
2. Click **Advanced search**.
3. Select **Replicated into Salesforce leads** in the second **Search** options.
4. Click **Search**.

The list now shows only contacts that have been successfully replicated to Salesforce.
