Create A Map To Integrate Leads Into Salesforce

Integration Solution Tutorial

Integration Maps are used for source to target integrations. In an Integration Map you configure Connections to your source and target datastores, add operation Blocks to your Map, and link data fields between the two datastores. Use the instructions below to create an Integration Map.

Maps are contained within Solutions that consist of the Agent used to execute the Maps, the Maps themselves, and the Schedule for running the Solution.

Objectives

Learn how to:

Add An Integration Map

  1. Select Solutions from the Menu bar.
  2. On the Solutions page, select Add and then Integration to start your new Solution.

    Solutions Page — Add Solution

  3. At the top of the Solution Edit page enter Integrate Leads in the Name field for the Solution.
  4. Select your On-Premise Agent from the Agent drop-down.

    Tip: The On-Premise Agent is named using the name of your computer. For example, if the name of your computer is Ferrari, then the name of your agent is Ferrari Agent. If you have more than one Agent installed, a number is appended to the name.

  5. In the Maps section, select Create Integration Map from the Menu to display the Create Map dialog.

  6. In the Name field enter, Insert Leads.
  7. In the Description field enter, Migrating Leads into Salesforce.
  8. In the Connection panel on the left, select the Add Connection link.

  9. On the Add a Connection dialog select the SF Tutorial Connection created in the lesson titled Configure A Salesforce Connection.
  10. Select OK to add the Connection to the Map.

  11. Select the Add Connection link again, and this time add the Text IS Tutorial Connection created in the lesson titled Configure A Text Source Connection.
  12. Select OK to add the Connection to the Map.
  13. Under the Text IS Tutorial Connection on the left, select the Query Block and drag it on to the Map workspace.
  14. Select the General link on the Properties tab on the right side of the workspace. The Query Block Properties dialog displays with the General tab selected.

  15. In the Entity field select Leads.
  16. Select OK to save the Query Block.

  17. In the Connections panel on the left, scroll up to the Controls section and select the For Each Result Block.
  18. Drag the For Each Result Block on to the Map and put it under the Query Block. Make sure the Blocks are attached. If the For Each Result Block is transparent, as shown in the image below, it is not attached to the Query Block and the Map cannot execute.

  19. Under the SF Tutorial Connection on the left, select the Upsert Block and place it inside the For Each Result Block. The Upsert Block has an error icon indicating that it has not been configured or contains invalid information.

  20. Select the Errors and Warnings tab in the Map workspace on the right panel to review the cause of the Error. The error information indicates that you have not selected an entity for the Upsert Block. You can see the same information on the Errors and Warnings tab in the Block Properties.

    Errors And Warnings Tab — Map Workspace

    Errors And Warnings Tab — Block Properties

  21. Select the error in the Errors and Warnings tab on the Map workspace to highlight the Block to which it refers.
  22. Open the Block Properties for the Upsert Block and select the Lead entity. The Error, Warnings tab indicates there are problems. This is normal because you are still missing configuration information.
  23. Select the Fields tab to display the source and target fields associated with the entities you selected in the Query and Upsert Blocks. Use the Fields tab to link fields from the source to fields in the target. Links can be simple or contain complex formulas that use the TIBCO Scribe® Online function library, operators, source fields, and constants to transform data during an integration.

    Upsert Block — Fields Tab

  24. Select the Info icon next to the target Company field to display the details panel with additional information about the field. This field is bold in the field list indicating that it is required. The details panel also indicates that the field is required.
  25. Select BUSINESSNAME in the source list, drag it to the target list and drop the field onto the Company field. Now those two fields are linked. When the map runs, data in the BUSINESSNAME field is placed in the Company field in Salesforce.
  26. In the target panel select Select All, then select Autolink. This selects all of the target fields and links them to source fields with matching names. Select OK on the warning message displayed.

    Tip: In some cases, you may need to clear fields populated by Autolink, such as when a createdon or modifiedon field is involved.

    Populating those fields from the source data prevents them from being updated with the correct datetime stamp when the record is written to the target datastore. For this tutorial, there are no fields that need to be cleared after using Autolink.

  27. Link the following fields manually as follows: 
    1. Drag ADDRESS to Street.
    2. Drag ZIPCODE to PostalCode.
  28. In the Source, the CONTACTNAME field contains the Lead's First, Middle, and Last names. In the Target, each part of the Lead's name is stored in a separate field. To integrate the data correctly, you must use a Formula to return individual parts of the name, and place First, Middle, and Last names in the appropriate target fields. Drag CONTACTNAME to Lastname, which is a required field.
    1. Select the Formula icon next to Leads.CONTACTNAME in the Formula column to display the Formula editor.
    2. Highlight Leads.CONTACTNAME in the Formula panel.
    3. In the Categories panel select Functions > All.
    4. In the Functions panel locate PARSENAME and select the Insert icon .
    5. The Description panel provides information about how to use the PARSENAME function.
    6. The Formula panel contains the PARSENAME function with the Leads.CONTACTNAME field in parenthesis.
    7. After Leads.CONTACTNAME type a comma and "L" for Last Name. This indicates that the PARSENAME function should return the Last Name information from the CONTACTNAME field. The entire function should be as follows: 

      PARSENAME(leads.CONTACTNAME, "L")

    8. Select Validate to make sure the format of the formula is correct.
    9. Review the message above the Formula field.
    10. Select OK to save the formula in the target Lastname field.

      Formula Editor

  29. Drag CONTACTNAME to Firstname and repeat the process for adding a formula to return just the First name. When you are finished mapping fields, the Target panel should have links for all of the Source fields except GENDER and LOCEMP.

    Linked Fields

  30. In the Target field list, scroll down to the website field and in the Formula field type "Scribe Tutorial", including the quotation marks. Adding "Scribe Tutorial" to this field marks the records added to Salesforce as part of the Tutorial. Later you can use this field as a filter to locate and delete the records added during the Tutorial.
  31. Select OK to save the Insert Leads Map and return to the Maps list on the Solution page.
  32. Select the Run option from the Gear menu for the Insert Leads Map to run this single Map.
  33. Scroll to the bottom of the Solution page, to view the Execution History for your Map.The Execution History indicates that 15 records were successfully processed.

    Integration Leads Solution — View Execution History

  34. Changes to Solutions are saved when you move from one field to the next. Select Dashboard from the menu.
  35. Log into Salesforce and go to the Leads page. Open the record for John Thibideau and verify that his Website field contains http://Scribe Tutorial. This indicates that the records were successfully imported from the Source Text file.

Return to Integration Solution Hands-On Tutorial to select the next lesson.