
The **Create a Lead** node is a native integration between Synerise and Salesforce CRM that enables seamless synchronization of lead data. Whenever a new lead appears on the Synerise radar (for example, a visitor to the website submits a form), you can create a workflow that automatically sends a request to the Salesforce API to create that lead in Salesforce CRM. This integration ensures real-time lead transfer and helps you keep your Salesforce CRM updated.  

This node is available only in the [customer-oriented workflows](/docs/glossary#profile-oriented-workflow).

## Node configuration
---
1. Go to **Automation Hub > Workflows > New workflow**.  
2. Create a workflow by adding nodes and arranging them in an order that aligns with your business requirements and the intended logic.  
    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can read more about the workflow basics in [Creating workflows](/docs/automation/creating-automation).

   </div></div></div>

3. As one of the nodes, select **Salesforce CRM > Create a Lead**.  
2. To allow the data exchange, establish a connection between Synerise and Salesforce CRM, click **Select connection**.  
3. From the dropdown list, select the connection.  
   - If no connections are available or you want to create a new one, see [Create a connection](#create-a-connection).
   - If you selected an existing connection, proceed to [defining the integration settings](#define-the-integration-settings).

### Create a connection

If you haven't established any connection yet or you want to create another, establish a connection between Synerise and Salesforce CRM that facilitates the exchange of data.  

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/salesforce-connection.png" class="large" alt="A blank configuration form for establishing connection between Synerise and Salesforce"><figcaption>A blank configuration form for establishing connection between Synerise and Salesforce</figcaption></figure>

1. In the **Connection name** field, enter the name of the connection.  
    It's used to find the connection on the list.
2. In **Token endpoint URL**, enter the URL used to obtain an access token from the authorization server.
2. In **Client ID**, enter a unique identifier assigned to your application by Salesforce CRM.
3. In **Client secret**, enter client secret assigned to your application by Salesforce CRM.  
4. Confirm by clicking **Create**.  
    **Result**: You will be redirected to the form in which you will define the integration settings. The connection you created is available in <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/settings-icon.svg" alt="Settings icon" class="icon"> **Settings > Connections**.

   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   We recommend setting the app-specific token timeout in Salesforce to at least 1 hour. Read more about [Salesforce OAuth Settings](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_api_integration.htm&type=5).

   </div></div></div>


## Define the integration settings

In this part of the process, fill in the configuration form so that you can send lead data. 

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/salesforce-create-lead.png" class="large" alt="A blank configuration form of the Create a Lead node"><figcaption>A blank configuration form of the Create a Lead node</figcaption></figure>

1. In **Body**, provide information about the lead in `JSON` format which will be created in Salesforce CRM.
    - You can add custom information.
    - You can add standard information (make sure the parameter names you use conform with the Salesforce API requirements).  
        For further information, check the [Salesforce createLead endpoint documentation](https://developer.salesforce.com/docs/marketing/marketing-cloud-growth/references/mc-rest-leads?meta=createLead).  
    - You can use Jinjava in this field.
1. In the **Additional event parameters** section, you can add parameters (jinjava in values not allowed) which will be added to the automatically generated [salesforce.leadCreated](/docs/assets/events/event-reference/integration#salesforceleadcreated) events. 
    1. In the **Parameter** field, provide the name of the event parameter.  
    2. In **Value**, provide the value of the event parameter.   
8. Confirm by clicking **Apply**.  
    **Result**: When the Create a Lead node is executed, a [`salesforce.leadCreated` event](/docs/assets/events/event-reference/integration#salesforceleadcreated) is generated on the activity list of the profile who is the actor in the workflow.  



## Example of use
---

You can create a workflow that sends a request to Salesforce CRM to create a lead each time a profile submits the form.  

1. As the first node, add **Profile Event**. In the settings of the node, select the event which signifies submitting data in a form. 
2. As the next node, add **Create a Lead**. Fill out the node settings according to the instructions in the ["Define the integration settings"](#define-the-integration-settings).  
    You can use data received from the event selected in the **Profile Event** node and include them in the request body to the Salesforce CRM. To learn how to insert this data dynamically, see ["Event parameters" section](/developers/inserts/automation#event-parameters).
3. As the final node, add **End**.  
    **Result**:  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/salesforce-create-lead-example.png" class="large" alt="Final workflow configuration"><figcaption>Final workflow configuration</figcaption></figure>