Bank Connect

How to Create Bank Verification Request

This document provides a developer guide for creating Bank Verification records within Salesforce using the custom object bankconnect__Bank_Verification__c. This automation streamlines customer banking information verification.

When to use: Integration workflows, account onboarding, loan applications, or any process requiring verified banking, identity or income data.


Prerequisites

Before creating a Bank Verification record, ensure you have:

Salesforce Setup

  • The BankConnect package installed

  • User permissions: Access to CloudMaven - Bank Connect permission set

Required Data

  • Valid parent record ID (Contact, Opportunity, or custom object)

  • Customer email address (must be valid format)

Plaid Products Available

  • Auth — Bank account and routing number verification

  • Assets — Asset holdings and balances

  • Transactions — Transaction history

  • Balance — Account balance information

  • Investments — Investment account details

  • Liabilities — Liability account information

  • Statements — Bank statements

  • Identity_Verification — Identity verification

  • Income_Verification — Income verification


Object Overview

Object Name: bankconnect__Bank_Verification__c

This is a custom Salesforce object created as part of the BankConnect package. It holds all necessary data related to a customer's bank verification request and its processing status.

Required Fields for Bank Verification Record Creation

Field API Name

Description

Data Type / Notes

Name

Record name

Text

bankconnect__ApplicationName__c

Your company name (appears on the Plaid toolkit)

Text (String)

bankconnect__First_Name__c

First name of the customer

Text

bankconnect__Last_Name__c

Last name of the customer

Text

bankconnect__Email__c

Email address of the customer

Email format

bankconnect__Plaid_Products__c

Semicolon-separated list of Plaid products to request

Semicolon-separated (no spaces). Example: Auth;Assets;Transactions. Invalid products will cause validation error on insert.

bankconnect__Asset_Request_Duration__c

Number of days of asset history to retrieve

Integer; Required only if Assets is selected in Plaid_Products__c. Range: 1-730 days. Default: 30

bankconnect__Asset_PDF__c

Include Asset PDF in the request

Boolean (optional)

bankconnect__Transaction_Start_Date__c

Start date for transaction data

Date; Required only if Transactions is selected. End date must be after start date. Default: 90 days prior to today

bankconnect__Transaction_End_Date__c

End date for transaction data

Date; Required only if Transactions is selected. Default: current date

bankconnect__SkipAutoTriggerEmail__c

Set to true to skip sending an automatic email to the customer

Boolean (Optional)

bankconnect__ParentRecordId__c

Salesforce Record ID of the parent object (e.g., Contact, Opportunity, Custom Object)

18-character Salesforce Record ID


Code Example with Error Handling

Click Here to get the code snippet
// Example: Creating a Bank Verification Request with error handling
try {
    bankconnect__Bank_Verification__c oBankVerification = new bankconnect__Bank_Verification__c(
        // Required fields
        bankconnect__First_Name__c = 'John',
        bankconnect__Last_Name__c = 'Doe',
        bankconnect__Email__c = 'john.doe@example.com',
        bankconnect__ApplicationName__c = 'My Company',
        bankconnect__Plaid_Products__c = 'Auth;Assets;Transactions', // No spaces between products
        bankconnect__ParentRecordId__c = '0015X00000IZ3ZJAA4', // 18-char Salesforce Record ID
        
        // Assets configuration (required only if 'Assets' in Plaid_Products__c)
        bankconnect__Asset_Request_Duration__c = 60,
        bankconnect__Asset_PDF__c = true,
        
        // Transactions configuration (required only if 'Transactions' in Plaid_Products__c)
        bankconnect__Transaction_Start_Date__c = Date.today().addDays(-90),
        bankconnect__Transaction_End_Date__c = Date.today(),
        
        // Income configuration (if needed)
        bankconnect__Income_Days_Requested__c = 60,
        bankconnect__Income_Source_Type__c = 'Bank', // or 'Payroll'
        
        // Holdings configuration (if needed)
        bankconnect__Holdings_Start_Date__c = Date.today().addDays(-90),
        bankconnect__Holdings_End_Date__c = Date.today(),
        
        // Optional: Skip auto-generated email
        bankconnect__SkipAutoTriggerEmail__c = false,
        
        bankconnect__Status__c = 'Not Requested'
    );
    
    // Insert and capture the new record ID
    insert oBankVerification;
    System.debug('Bank Verification Record Created: ' + oBankVerification.Id);
    
} catch (DmlException e) {
    // Handle common errors
    if (e.getDmlType(0) == StatusCode.REQUIRED_FIELD_MISSING) {
        System.debug('Error: Required field missing - ' + e.getMessage());
        // Log to custom error object or send notification
    } else if (e.getDmlType(0) == StatusCode.FIELD_CUSTOM_VALIDATION_EXCEPTION) {
        System.debug('Error: Validation failed - ' + e.getMessage());
        // Check Plaid_Products for invalid values
    } else {
        System.debug('Error creating Bank Verification: ' + e.getMessage());
    }
} catch (Exception e) {
    System.debug('Unexpected error: ' + e.getMessage());
}


What Happens After Record Creation

Once you insert a Bank Verification record, the following occurs automatically:

1. Status Update

Record status changes from "Not Requested" to "Requested" (typically within seconds)

2. Email Notification

(unless SkipAutoTriggerEmail__c = true)

  • Customer receives email with secure Plaid widget link

  • Email sent to bankconnect__Email__c address

3. Plaid Widget

Customer completes bank connection process

  • Security authentication with their bank

  • Grants permission for selected products

  • Completes within 5-15 minutes

4. Record Status Flow

  • Requested → Authorized (customer successfully completes Plaid widget)

  • Requested → Failed (authentication error or timeout)

Common Errors & Validation Rules

Error

Cause

Solution

REQUIRED_FIELD_MISSING

First Name, Last Name, Email, or Plaid Products not provided

Verify all required fields are populated before insert

Invalid Plaid product: "Auth2"

Typo in product name or unsupported product

Use exact product names (case-sensitive): Auth, Assets, Transactions, Balance, Investments, Liabilities, Statements, Identity_Verification, Income_Verification

Parent Record does not exist

ParentRecordId references a deleted or non-existent record

Validate the 18-character Record ID exists before creating verification request

Email format invalid

Email address doesn't match standard format

Ensure email follows: user@domain.com

Asset_Request_Duration must be 1-730

Invalid duration value

Set duration between 1 and 730 days

Transaction_End_Date before Transaction_Start_Date

Date range invalid

Ensure End Date is after Start Date

Email not sent to customer

SMTP or email service issue

Check SkipAutoTriggerEmail__c setting; verify email address is valid; check email logs in Setup > Email Logs