// Module included in the following assemblies:
// as_sf2db-create-integration.adoc

[id='sf2db-add-data-mapping-step_{context}']
= Adding a data mapping step

To continue creating the Salesforce to database sample integration,
add a data mapping step that correlates Salesforce lead fields to
fields in the sample database. 

.Prerequisites
* The integration's start connection is to Salesforce.
* The integration's finish connection is to the PostgresDB sample database. 

.Procedure
. In {prodname}, in the integration visualization, click the plus sign. 
. Click *Data Mapper* and wait a few moments. When the data fields
appear, the *Sources* panel on the left displays the Salesforce fields
and the *Target* panel on the right displays the database fields.

. Map the Salesforce `Company` field to the
database `company` field. On the left, in the *Sources* panel, click *Company* and drag it to the *Target* panel onto *company*.
+
The data mapper displays a line from the source field to the target field.
. Map the *Sources* (Salesforce) `Email` field to the *Target* (database)
`email` field.
. Map two Salesforce fields (`FirstName` and `LastName`) to the database
`first_and_last_name` field:
.. In the *Target* panel, click *first_and_last_name* and then click the *Create New Mapping* icon.
.. In the *Mapping Details* panel, in the *Sources* field, select */FirstName* and then select */LastName*.
+
When you are done you should see a line from each of the source fields to
the target field. 

. Add the following mappings:
+
[options="header"]
|=======================
|Map This Salesforce Field |To This Database Field
|`LeadSource`    |`lead_source`
|`Status`    |`lead_status`
|`Phone`    |`phone`
|`Rating`    |`rating`
|=======================

. In the upper right, click *Done*.
