Criminal Checker Post Installation Guide
1. Admin Setup:
Login to your Salesforce org where the package is installed.
Go to the “Criminal App Setup” tab and read the instructions to complete the easy setup steps.
Step 1: Please email “solutions@cloudmaveninc.com” to get your unique credentials for test and production.
Step 2: Click on the Gear Icon to update your API credentials and Criminal report preferences.
Step 3: If you want to use one of your objects as the source, Set the corresponding field mapping.
Step 3 is only required if you don’t want to use default mapping provided by the package.
2. Required Fields:
We need the following fields to pull the credit report from the credit bureaus. Please make sure you have these fields on your source object:
First Name
Last Name
SSN(Social Security Number)
The DOB(Date of Birth)
Street Address
Zip/Postal Code
State Code – ISO Code
Country Code – Country Code
Create a new field “Run Criminal Check” checkbox on the source object. This field will be used to validate when to run the criminal checker.
If your source object is different than Account, Opportunity, Lead, and Contact. Please create a lookup field on the “Criminal Report” object and make your source object as the parent.
3. Validation Rule
Please add a validation rule on the source object to ensure that required fields to run criminal report is present when the user is checking the”Run Criminal Report” custom field. Please change the fields as per your org configuration.
Validation Rule for Contact:
If(AND(Run_Criminal_Check__c,
OR(ISBLANK(FirstName), ISBLANK(LastName), ISBLANK(MailingCity), ISBLANK(MailingCountry), ISBLANK(MailingPostalCode), ISBLANK(MailingState), ISBLANK(Social_Security_Number__c), ISBLANK(Birthdate), ISBLANK(MailingStreet))), true, false)
Validation Rule for Account:
If( AND(
Run_Criminal_Report__c,
OR(ISBLANK(FirstName), ISBLANK(LastName), ISBLANK(BillingCity), ISBLANK(BillingCountry), ISBLANK(BillingPostalCode), ISBLANK
(Text(BillingStateCode)), ISBLANK(Social_Security_Number__c), ISBLANK(Birthdate), ISBLANK(BillingStreet))), true, false)
Message:
Required fields missing on the related contact. Please Populate First Name, Last Name, Social Security and Full Mailing Address
4. Flows
Automating Criminal Check Run.
In this step, we are going to create a flow on your source object(lead, Contact, Opportunity, Account or any other custom object). Using this step, the system will automatically create and run the credit report.
Go to Setup >> Search for Flows in Quick Find Box.
4.1 The flow to create a criminal report:
Choose a record- triggered flow since we want the flow to be triggered whenever any DML action is performed on record.
Choose Freeform
Choose object as Lead(Source Object) and trigger the flow when record is created or updated.
Optimize the flow for Action and Related Records.
Create a resource. Go to Toolbox-> Manager -> New Resource. Choose Resource type as Formula and data type as Boolean. Enter the formula:
IF(
OR(
AND(ISNEW(),{!$Record.Run_criminal_report__c}),
AND(
({!$Record.Run_criminal_report__c} ),
ISCHANGED({!$Record.Run_criminal_report__c} ))),
true, false)
as shown in the image below:-
Choose Decision from the toolbox and add the condition Criminal(Formula we’ve created above) to true.
Choose action from toolbox and in that add Apex Action Create Criminal Report Record and choose list id as record id.
At last, connect the flow as shown in the below image and then Save the flow and Activate it.
4.2 Pull Criminal Report Using Flow
Choose a record- triggered flow since we want the flow to be triggered whenever any DML action is performed on record.
Choose Freeform
Choose object as Criminal Report and trigger the flow when record is created or updated.
Optimize the flow for Action and Related Records.
Choose Decision from Toolbox and give condition as status equals Not Requested.
Choose action from toolbox and in that add Apex action Automatically Run Criminal Check and choose list id as record id.
At last, connect the flow as shown in the below image and then Save the flow and Activate it.
If you have any queries regarding the criminal checker app please reach out to us at http://support@cloudmaveninc.com.