Views:

Overview

In this scenario, we require a button that sets a Lead to the status Qualify and creates an Account and a Contact using the data from the Lead

This is very similar to what the Qualify Lead ribbon Microsoft provides does except in our scenario, we don't use Opportunties so we do not wish to create them.

We will use North52's Quick Button functionality for this, please see how to set this up here

North52 BPA Solution

The North52 BPA solution works like this:

  • A formula is created that will set the status of a Lead to Qualified
  • The same formula will also create an Account and a Contact using the information in the Lead
  • A Quick Button will be configured for the Lead form that will trigger the formula

Setup Formula

  • Navigate to Settings > N52 Formula
  • Create a new formula, setting the following values in the Formula Guide:
    • Source Entity set to Lead
    • Set Formula Type to Clientside Calculation
    • Select the Decision Table Editor
  • Change the Name of the formula to Qualify Lead and Create both an Account and a Contact
  • Click Save

We will create 3 sheets to implement the business logic required: 

Sheet 1: Set Lead to Qualified 

  • Double-click on the current sheet name and rename it to Set Lead to Qualified
  • Select cell A2
    • Right-click and select Delete > Delete Column
  • Select cell A2 again
    • Right-click and select Insert > Insert Action
    • Select the Source tab and expand Source
    • Select the Status node to add it to cell A2
  • Select cell A4
    • Expand the Status node and select Qualified
  • Select cell B2
    • In the Source tree, collapse Status and select Status Reason
  • Select cell B4
    • Expand Status Reason and select Qualified
  • Click Save


 

Sheet 2: Create Account 

Next we create a second Decision Table sheet for creating the Account record. We will set the Account fields using information from the Lead:

  • Right-click on the Decision Table editor and select Insert > Insert Decision Table
  • Double-click on the sheet name and rename it to Create Account
  • Right-click anywhere on the sheet and select Set Sheet Options > Use CreateRecord
  • Select cell A2
    • Right-click and select Delete > Delete Column
  • Select columns A to I by dragging across the column headers
    • Right-click and select  Insert > Insert Action. This will add 9 Action columns
  • Select cell A2
    • Select the Explore tab and expand Entites > Account
    • Find and select Account Name
  • Select cell A4 
    • Select the Source tab, find and select Company Name
  • Select cell B2
    • Select the Explore tab and select Main Phone
  • Select cell B4
    • Select the Source tab and select Business Phone
  • Repeat this for each of the Actions, selecting the fields you want to be copied from the Lead. You can use the screen capture below as an example:

Sheet 3: Create Contact

Finally, we create a third Decision Table sheet for creating the Contact. We will set the Contact fields using information from the Lead:

  • Right-click on the Decision Table editor and select Insert > Insert Decision Table
  • Double-click on the sheet name and rename it to Create Contact
  • Right-click anywhere on the sheet and select Set Sheet Options > Use CreateRecord
  • Select cell A2
    • Right-click and select Delete > Delete Column
  • Select columns A to J by dragging across the column headers
    • Right-click and select  Insert > Insert Action. This will add 10 Action columns.
  • Select cell A2
    • Select the Explore tab expand Entites > Contact
    • Find and select Company Name
  • Select cell A4
    • Paste in the text shown below - Note that this presumes your second sheet is called Create Account
      'account|' + {Create Account}
      The reason why we need to prefix the reference to the previously created Account with account| is that the Company name field is a 'Composite' field and we need to specify the type of entity we are linking - in this case it is an Account record being linked.
  • Select cell B2
    • Select the Explore tab and expand Entites > Account
    • Find and select First Name
  • Select cell B4 
    • Select the Source tab, find and select First Name
  • Select cell C2
    • Select the Explore tab and select Last Name
  • Select cell C4
    • Select the Source tab and select Last Name
  • Repeat this for each of the Actions, selecting the fields you want to be copied from the Lead. You can use the screenshot below as an example:

Test

To test the formula:

  • Refresh the Lead and you will see that it has been set to Qualified
  • Go to your Accounts list and see that the related Account has been created:
 
  • Go to the Contacts list and see that the related Contact has been created: