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

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. create-sf-lead2.png

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. create-sf-lead3.png

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. create-sf-lead4.png

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. create-sf-lead5.png

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

{
  "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. create-sf-lead6.png

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.