# Create A Salesforce Lead

Airkit is designed to work with many different platforms, providing a better front end for your digital experiences. In this guide we walk through creating a lead in Salesforce. We start with configuring your Organization for working with your Salesforce account and then move creating a connection to create a lead.

### Setting up your connection to Salesforce

Setting up your Airkit Organization to talk to your Salesforce Organization is the first step. Go to the console and click on the **Integrations** tab on the left. With **Credentials** selected (it’s selected by default when you click integrations), click **New** on the right. From the Integration list select **Salesforce**. Name your Credential something you will remember like your Salesforce Org Name. ![create-sf-lead1.png](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-b5e8066c5143429373b89179999a4d61dface6f2%2Fcreate-a-salesforce-lead-v180-0.png?alt=media)

You will be presented with the Salesforce Login Page. Log in with your Salesforce Credentials. Once you are connected you will see an additional item on your **Credentials** page for your new connection.

Now we need to connect this to your application. Click on **Apps** on the left hand side, select your app, and click the **Edit In Studio** button in the **Inspector**. From there select **Settings** from the Builder Bar. Scroll down to the **Integrations** section and click the new button. Under **Adapters** you will see **Salesforce** option to select. ![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-c0d295bd0b10324f775b2ee7a859de08c84b938a%2Fcreate-a-salesforce-lead-v180-1.png?alt=media)

In the **Datasource** section of the new integration, select the Salesforce credential you just created. **Save** your app.

### Creating the Connection

Now that your app is connected to your Salesforce account, the next step is to create a connection to create a Lead object. Select **Connections Builder** from the **Builder Bar** on the right hand side. Add a new **Data Operation**. ![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-adf1a98f641d2295b00bb6252b1438c01f7bd82c%2Fcreate-a-salesforce-lead-v180-2.png?alt=media)

Double click on the connection name in the **Tree** and rename the connection to “SF - Create a Lead”. Change the type of the first **Data Operation Step** to **Salesforce**. Make sure the datasource you created is selected for the Datasource. ![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-dbfc177ec8309f07734a3c7649606278ed893b5f%2Fcreate-a-salesforce-lead-v180-3.png?alt=media)

Next select **Create Record** operation and for **Object Type** look for **Lead**. Notice that the **Object Body** is already set up with the required fields to create a **Lead** object in your Salesforce instance. Fill them out and click the play button at the top of the **Data Operation Step**. ![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-ce6e6961111266c7d51b620a2d2ada47b35bbc00%2Fcreate-a-salesforce-lead-v180-4.png?alt=media)

If you were successful you will see run results that look something like this:

```javascript
{
  "success": true,
  "result": {
    "id": "00Q4x000001l9oKEAQ",
    "success": true,
    "errors": []
  },
  "errorMessage": null
}

```

### Adding other properties to your Lead

Selecting the **Lead** option from the dropdown enters fields for creating the required fields for your **Lead** object in salesforce. You can select the plus button below the required items to add any additional fields required by your lead object. Depending on the type of the property selected, the input will match the type. For example if we select **Lead Source**, the input will be a dropdown with the available **Lead Source** types. ![](https://2093598723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC2DgLBPTrwoEhWaU24LL%2Fuploads%2Fgit-blob-b979bd9d56563b0061e9343055cdcd26d29229e7%2Fcreate-a-salesforce-lead-v180-5.png?alt=media)

### Summation

In this guide we walked through creating one type of **Salesforce** object from within the connection builder using a Salesforce Integration. You can create any type of Salesforce object following similar steps. You can also find and update salesforce objects and even subscribe to object property changes with **Subscriptions**.
