The Blend integration managed package includes a global method & apex class called ‘assignLoanOfficer’ that can be used by various Salesforce automation tools to automate the assignment of loan officers to Blend loans that have been synced with SFDC records.
For use in Process Builder
The global method can be referenced in Process builder, allowing an SFDC admin to automatically assign Blend loans based on trigger criteria within SFDC.
To reference the Assign Loan Officer Apex class within process builder, create an action, and set the following details:
- Select Apex as the Action Type
- Select the Assign Loan Officer apex class
- Set the appropriate apex variables:
- Tenant should be the value added in the Blend Tenant field in System Connections.
- Loan ID should reference the field mapped to the Blend Loan ID in the Setup Assistant.
Loan Officer Email can either reference some other field that contains an email address matching the email address of a Loan Officer in Blend, a formula, or even a hardcoded string value.
Example:
Note: If a process is built around Blend-synced SFDC records, process failures may cause Blend updates not to save successfully to the record.
For use via custom Apex code
The ‘assignLoanOfficer’ method can be invoked by any custom Apex code, be it a trigger, global action, or any other function. The following code illustrates how to call the Apex method:
Tip: The Apex class can be accessed by calling:
- blend.assignLoanOfficer.assignLoanOfficer(String, String)
- Where the two arguments expected are the assignable LO email address, and Blend loan ID.
Multi-DBA examples
If you have multiple Blend instances integrated with a single SFDC org, you’ll need to specify the Blend Tenant for both the above invocable method and Apex class.
For the process builder example, set the tenant variable to the desired Blend target instance (you can reference the Blend Tenant field set up on the loan source object).
For the Apex code, the same method can be called, with a third “tenant” variable:
Tip: Similarly, this class can be called via:
- ‘blend.assignLoanOfficer.assignLoanOfficer(string, string, string)
- Where the three expected arguments are LO Email, Blend loan ID, Blend Tenant.
Comments
0 comments
Article is closed for comments.