Automating Updates to AMCalc Loan Status on Lead Conversions
In another post we discussed how to use AMCalc Status values to differentiate between loans associated with leads from those associated with customers. In this post I will show you a way to automatically update the status of a loan when lead records are converted to contact records.
First of all, why would we want to do this? Well for one, as we saw in that earlier post, you may want to start including a loan that is in process in your reports. Also, the value of the loan status is a great way to trigger other types of automation such as emailing your underwriters when a new loan is in process, so it is important to keep it updated.
Understanding How AMCalc Works with Salesforce Lead Conversion
Before diving into the details on how to do the automation, it is useful to understand how AMCalc works when a lead is converted to a contact.
As you know, when you add an AMCalc calculator to a Communities site, you not only select the calculator definition that it will use, but you also configure a number of other attributes such as button labels, etc. At the very bottom of the attribute list is the Convert Schedule To attribute. Using this attribute, you tell AMCalc which standard Salesforce object to move the lead’s AMCalc loan to when a lead is converted to a contact.
As long as you already established a lookup relationship (see the Configuring an AMCalc Calculator for a Communities Site section of the AMCalc Administration Guide for details on this), you can tell AMCalc to move the lead’s loan information to either the account, contact, or opportunity record that is associated to the contact record that is created when the lead is converted. Again, the lookup relationship with account, contact, or opportunity has to be established already for it to be shown in the drop down list.
For example, let’s say that you have a lead named John Smith that works for Acme Anvils Inc. While John is a lead, you are able to view the loan details created by AMCalc for him in the Amortization Schedule related list on his lead detail page. Now Mr. Smith wants to be approved for the loan, so you convert him to a contact. If Mr. Smith used a Communities calculator that had its Convert Schedule To attribute set to Account, after the conversion you would now go to the Acme Anvils Inc. account record to view Mr. Smith’s loan details.
Automate with Process Builder
Now that we know how the AMCalc conversion process works, let’s see how to put some automation in so that, at the time of Mr. Smith’s conversion, his AMCalc loan is updated with a status that indicates that the loan is in processes. To do this we will use the Salesforce Process Builder.
Navigate to Process Builder by typing it into the Quick Find box in the Setup menu.
Click the New Button and indicate a descriptive name for this process, accept the default API Name, add a Description, select “A record changes” from the The process starts when dropdown, and click Save.
3. Click Add Object in the box under the start of the process. In the right-hand area that pops up, select “Amortization Schedule” from the Object dropdown, click the radio button next to when a record is created or edited, and click Save.
4. On the next screen, we will indicate the criteria that must be met before the loan status is updated. In this example scenario, we are moving the lead’s loan details to the account that is created when the lead is converted to a contact. When AMCalc performs this move, it adds a reference to the account that was created for the lead onto the AMCalc loan record and removes the reference to the old lead. These references are kept in the Lookup fields that were created on the AMCalc object. The reference fields were created when AMCalc was initially set up using the instructions in the Creating Parent Object Relationships section of the Administration Guide.
For our example, the reference field for account is called Account__c and the reference field for lead is called Lead__c. The reference fields are custom fields and custom fields always end with “__c”. Since both of these fields will be changed when the AMCalc loan record is moved, we will base our criteria on that.
5. Give the criteria a name and select the Conditions are met radio button.
6. Click the Field box in the Set Conditions box and select the relationship field for your installation for the Salesforce object that the AMCalc loan will be moved to. Remember, the lookup field will end with __c. Again, for our example this reference field is called “Account__c”, yours may have a different name.
7. For Operator, select “Is Changed”, and for Value select “True”.
8. Now click Add Row to input our second criteria. This time we are going to input criteria that will determine if this is a lead conversion. In the Field box select the reference field that was created for your install for the lead object. The rest of the criteria is the same as before, for Operator select “Is Changed” and for Value select “True”.
9. Make sure that “All of the conditions are met (AND)” under the Conditions section and click Save.
10. Next we are going to indicate what Salesforce should do when the conditions we just input are met. Click on the IMMEDIATE ACTIONS in the process flow chart on the left to open up the Select and Define Action panel.
11. For Action Type select “Update Records”, indicate a name, and for Record Type select “Select the amortcalc__AmortizationSchedule__c record that started your process”. In the Field box select “Status” for the loan’s status field, keep “Picklist” in the Type box, and then select the new status value you would like the AMCalc loan to have when the lead is converted in the Value box. For our example, we are changing the status to “Pending”. Click Save.
If you want to add any more actions when a lead conversion take place, like sending out an email for example, you can click the Add Action link on the flow chart to include them.
That is it! When you get back to the main Process Builder page, click the Activate button to activate it.
Be sure to create a couple of leads and then convert them to contacts to make sure that the whole process is working the way you intended.
You can see more about AMCalc by going to the Salesforce AppExchange. Be sure to click the Watch Demo button to see it in action!
Let us know if you found this article helpful or if you have any questions or comments!