MuleSoft Accelerator for Financial Services icon

MuleSoft Accelerator for Financial Services

(0 reviews)

Salesforce FSC setup guide

This page describes how to configure an existing Salesforce Financial Services Cloud (FSC) instance to support the default functionality of the MuleSoft Accelerator for Financial Services. Some of these steps may be omitted if the Salesforce Financial System API is being deployed independently of any use cases. These instructions assume that the required FSC packages have been deployed to the target Salesforce instance, and that the appropriate permissions have already been assigned.

Record types

The following record types must exist in the corresponding objects for the accelerator assets to function correctly.

Salesforce ObjectRecord Type
AccountHousehold
Financial AccountBlockchain Account
Financial AccountGeneral Ledger Account
Financial AccountMoney Market Account
Financial Account TransactionFinancial Account Transfer Transaction
LeadLead

Follow the instructions for each object below.

Account & Lead

To enable the Household record type in Account object, follow the below steps:

  1. Click the Salesforce Setup icon.
  2. Navigate to Users -> Profiles.
  3. Select the target profile for the service account user.
  4. Navigate to Object Settings -> Accounts and click the Edit button.
  5. Under Record Types and Page Layout Assignments check the Household record type.
  6. Click the Save button.

Follow the same steps but this time enable the Lead record type on the Lead object.

Financial Account

To create the Blockchain Account record type in the Financial Account object, first create a page layout for it based on an existing layout.

  1. Select the Object Manager tab from the Setup home page.
  2. Select the FinServ__FinancialAccount__c object.
  3. Select Page Layouts from the left nav and click New.
  4. Select an existing page layout (e.g., "Financial Account (Savings Account) Layout").
  5. Set the Page Layout Name field to "Financial Account (Blockchain Account) Layout".
  6. Click Save to create the new layout.

Select Page Layouts from the left nav to return to the list and repeat the above steps to create the General Ledger Account and Money Market Account page layouts.

Now create the new Blockchain Account record type:

  1. Select Record Type from the left nav and click New.
  2. Select an existing record type (e.g., "Savings Account").
  3. Fill out the following fields as indicated.
    • Record Type Label -> "Blockchain Account"
    • Record Type Name -> "Blockchain" (change default value).
    • Description -> "Represents a Blockchain account"
  4. Enable the Active checkbox.
  5. In the list of profiles, check the Make available option the profile assigned to the target API service account (at a minimum).
  6. Click Next and select the option Apply one layout to all profiles.
  7. Select the page layout "Financial Account (Blockchain Account) Layout".
  8. Click Save.

Repeat the above steps to create the General Ledger Account and Money Market Account record types. Be sure to select the correct page layout corresponding to the record type.

The new record types should now be available in the Record Types section. You can verify that the new record type is also available to the target user profile as follows:

  1. Navigate to Users -> Profiles.
  2. Select the target profile.
  3. Navigate to Object Settings -> Financial Accounts (the object you edited earlier) and click the Edit link.
  4. Verify that the new record types are listed under Record Types and Page Layout Assignments.

Financial Account Transaction

The standard record type Financial Account Transaction supports the transaction types DebitTransaction and CreditTranction. The Financial Account Transfer Transaction record type must be created to support the TransferTransaction and PaymentTransaction transaction types.

The steps for creating the Financial Account Transfer Transaction record type are similar to those above, but for the Financial Transaction object instead.

  1. In the Object Manager, select the FinServ__FinancialAccountTransaction__c object.
  2. Select Page Layouts from the left nav and click New.
  3. Select an existing page layout (e.g., "Financial Account Transaction Layout").
  4. Set the Page Layout Name field to "Financial Account Transfer Transaction Layout".
  5. Click Save.
  6. Select Record Types from the left nav and click New.
  7. Select an existing record type (e.g., "Financial Account Transaction").
  8. Fill out the following fields as indicated.
    • Record Type Label -> "Financial Account Transfer Transaction".
    • Record Type Name -> "Financial_Account_Transfer" (change default value).
    • Description -> "Defines a transaction that represents a generic transfer from one account to another".
  9. Enable the Active checkbox.
  10. In the list of profiles, check the Make available option the profile assigned to the target API service account (at a minimum).
  11. Click Next and select the option Apply one layout to all profiles.
  12. Select the page layout "Financial Account Transfer Transaction Layout".
  13. Click Save.

The new record type can be verified as above.

Custom fields

The following fields must be created in the corresponding objects.

Salesforce ObjectField LabelField NameData TypeLengthUnique*ExternalId
AccountGlobal Billing Address IDGlobal_BillingAddress_IdText36YY
AccountGlobal Customer IDGlobal_Customer_IdText36YY
AccountGlobal Email Address IDGlobal_EmailAddress_IdText36YY
AccountGlobal Fax Number IDGlobal_FaxNumber_IdText36YY
AccountGlobal Mailing Address IDGlobal_MailingAddress_IdText36YY
AccountGlobal Mobile Number IDGlobal_MobileNumber_IdText36YY
AccountGlobal Party IDGlobal_Party_IdText36YY
AccountGlobal Phone Number IDGlobal_PhoneNumber_IdText36YY
AccountGlobal Shipping Address IDGlobal_ShippingAddress_IdText36YY
AccountStatusFinServ__StatusPicklist-NN
ContactGlobal Email Address IDGlobal_EmailAddress_IdText36YY
ContactGlobal Individual IDGlobal_Individual_IdText36YY
ContactGlobal Phone Number IDGlobal_PhoneNumber_IdText36YY
ContactGlobal Postal Address IDGlobal_PostalAddress_IdText36YY
FinServ__Card__cCard TypeCard_TypePicklist-NN
FinServ__Card__cCardholder NameCardholder_Name__cText100NN
FinServ__Card__cCredit Card TypeCredit_Card_Type__cPicklist-NN
FinServ__Card__cGlobal Card IDGlobal_Card_Id__cText36YY
FinServ__FinancialAccount__cGlobal Account IDGlobal_Account_Id__cText36YY
FinServ__FinancialAccount__cInitial Transaction IDInitial_TransactionId\_cText36NN
FinServ__FinancialAccount__cLast Payment AmountLastPaymentAmount__cCurrency(16,2)NN
FinServ__FinancialAccount__cLast Payment DateLastPaymentDate__cDate-NN
FinServ__FinancialAccount__cLast Statement DateLastStatementDate__cDate-NN
FinServ__FinancialAccount__cLast Transaction AmountLastTransactionAmount__cCurrency(16,2)NN
FinServ__FinancialAccount__cLast Transaction TypeLastTransactionType__cPicklist-NN
FinServ__FinancialAccount__cLast Transaction IDLast_Transaction_Id__cText36NN
FinServ__FinancialAccount__cMaximum Monthly WithdrawalsMaximum_Monthly_Withdrawals__cNumber18NN
FinServ__FinancialAccount__cMonthly Withdrawal LimitMonthly_Withdrawal_Limit__cNumber(16,2)NN
FinServ__FinancialAccountTransaction__cDebit Financial AccountDebit_Financial_Account__cLookup---
FinServ__FinancialAccountTransaction__cCredit Financial AccountCredit_Financial_Account__cLookup---
FinServ__FinancialAccountTransaction__cGlobal Transaction IDGlobal_Transaction_Id__cText36YY
FinServ__FinancialAccountTransaction__cOriginator IDOriginator_Id__cText36YN
InsurancePolicyGlobal Policy IDGlobal_Policy_Id__cText36YY
OpportunityACH Transfer Authorization Document IDAch_Transfer_Auth_Document_IdText36NN
OpportunityAsset Transfer Authorization Document IDAsset_Transfer_Auth_Document_IdText36NN
OpportunityDocument Signatures ReceivedDocument_Signatures_Received__cCheckbox---
OpportunityKYC CompletedFINS_KYC_Completed__cCheckbox---

*Unique fields should be case-sensitive

Create via Apex script

An Apex class called CustomFieldUtility can be used to create custom fields programmatically. The source for this class can be found in the FINS Common Resources project. Download this project and follow the steps below.

  1. Click on Salesforce Setup icon and select Developer Console to open a new console window
  2. Go to File -> New -> Apex class and create a new class named CustomFieldUtility
  3. Copy the code from fins-common-resources/salesforce/CustomFieldUtility.apxc to the script editor
  4. Select the File -> Save menu option to compile and save the class
  5. Select Debug -> Open Execute Anonymous Window
  6. Copy and paste the contents of fins-common-resources/salesforce/CreateCustomFields.txt into the window.
  7. Enable the Open Log option and click the Execute button.

Once the script completes, select the Debug Only filter option to show just the results of each create request. Verify that all fields have been successfully created.

Create manually via Salesforce

To create each of these custom fields and enable visibility for them on page layouts:

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Find and select the target Salesforce object.
  4. Select the Fields & Relationships page.
  5. Click the New button and create the field as specified above.
  6. Once the field has been created, click the Set Field-Level Security button (or do these steps later - see below).
  7. Enable for desired profile, or tick the checkbox next to Visible to enable visibility for the desired profile(s).

Repeat these steps for each custom field in the above list.

Tip: Instead of adjusting permissions for each field as you go, if you are only making them available to one or two profiles it may be more efficient to go to the Users -> Profiles -> {profile} -> Object Settings for each object and adjust the permissions for multiple fields at once.

Additional notes

  • The Card Type picklist values are DebitCard and CreditCard.
  • The Credit Card Type picklist values are Amex, Discover, Mastercard, Visa, and Other.
  • The Last Transaction Type picklist values are CreditTransaction, DebitTransaction, TransferTransaction, and PaymentTransaction.
  • If the Status (FinServ_Status__c) field is not added as part of the Financial Services Cloud package, it must be added as a custom field. The picklist values are Prospect, Onboarding, Active, Inactive, Closed, Deceased, Delinquent, and Dormant.
  • The Debit Financial Account and Credit Financial Account fields looks up respective Financial Accounts.
  • All Global_*_Id__c fields should be visible in layouts (as described above) but made read-only to avoid issues with data synchronization.

Enable Financial Accounts in Sales

When the Financial Services Cloud feature is added to the Salesforce instance, the Commercial and Retail Banking apps are provided to work with financial accounts. If you want to enable the Financial Accounts tab on the Sales app, follow these steps:

  1. Navigate to the Sales app home page.
  2. Click the pencil icon on the right corner of the navigation pane, which opens the Edit Sales App Navigation Items dialog box.
  3. Click Add More Items.
  4. Navigate to All under the Available Items menu.
  5. Search for Financial Accounts and Select it.
  6. Click Add 1 Nav Item and then click Save.

Enable transaction status

The default implementation of the solution requires the enablement of additional values for the transaction status picklist in the target FSC instance. This can be done as follows:

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Find and select the FinServ__FinancialAccountTransaction__c Salesforce object.
  4. Navigate to Fields and Relationships and select the FinServ__TransactionStatus__c picklist field.
  5. Scroll down to the Values section and click New.
  6. Enter the values for Cancelled and Initial on separate lines and click Save.

Enable transaction types

The default implementation of the solution also requires the enablement of additional transaction types. The steps are similar to those above:

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Find and select the FinServ__FinancialAccountTransaction__c Salesforce object.
  4. Navigate to Fields and Relationships and select the FinServ__TransactionType__c picklist field.
  5. Scroll down to the Values section and click New.
  6. Enter the values for Payment and Transfer on separate lines and click Save.

Workflow Rules

To display a specific page layout based on the record type, a Workflow rule is created. To ensure the page layout changes based on the record type Financial Account Transfer Transaction, follow the below steps:

  1. Click the Salesforce Setup icon.
  2. Navigate to Process Automation -> Workflow Rules.
  3. Click the New Rule button.
  4. Select FinServ__FinancialAccountTransaction__c from the Object dropdown.
  5. Enter Rule Name as Transfer Transaction Type and description as Defines a transaction that represents a generic transfer from one account to another.
  6. Set Evaluation Criteria as created, and any time its edited to subsequently meet criteria`.
  7. In the Rule Criteria section, select criteria are met.
  8. In the first row, select the field as Financial Account Transaction: Transaction Type, operator as equals, and value as Transfer.
  9. In the second row, select the field as Financial Account Transaction: Transaction Type, operator as equals, and value as Payment.
  10. Set filter logic 1 OR 2. Click Save.
  11. In Workflow Actions, under Immediate Actions, select New Field Update.
  12. Set Name as Transfer Transaction Type.
  13. In Field to Update, select Record Type. Click Next.
  14. In Specify New Field Value, select Financial Account Transfer Transaction from the record type dropdown.
  15. Click Save.

Enable multiple currencies

The default implementation of the solution requires the enablement of multiple currency support in the target FSC instance. This can be done as follows:

  1. Click the Salesforce Setup icon.
  2. Navigate to Company Settings -> Company Information.
  3. Click Edit and enable the Activate Multiple Currencies option.
  4. Click Save.

If desired, click the Currency Setup button to add support for additional currency codes (e.g., EUR).

Create PushTopics

The following PushTopics must be created in order to capture updates from Salesforce. The Apex scripts to create these PushTopics are located in the Salesforce Topic Listener integration template.

Salesforce ObjectApex script locationPushTopic name
Account/src/test/resources/scripts/accounts-push-topic.apxcAccounts
Contact/src/test/resources/scripts/contacts-push-topic.apxcContacts
Account/src/test/resources/scripts/accounts-address-push-topic.apxcAccountAddresses
Account/src/test/resources/scripts/households-push-topic.apxcHouseholds
Opportunity/src/test/resources/scripts/opportunities-push-topic.apxcOpportunities
FinServ__FinancialAccount__c/src/test/resources/scripts/financial-accounts-push-topic.apxcFinancialAccounts
FinServ__FinancialAccountTransaction__c/src/test/resources/scripts/transactions-push-topic.apxcTransactions
FinServ__Card__c/src/test/resources/scripts/cards-push-topic.apxcCards

Follow the below steps to create the above PushTopics

  1. Edit the above scripts to set the LastModifiedBy and RecordType conditions to the correct IDs from your org (see Additional notes, below)
  2. Click on Salesforce Setup icon.
  3. Select Developer Console -> Debug-> Open Execute Anonymous Window.
  4. Copy and paste the script from the Apex script location column in the above table and execute.
  5. Repeat above step #3 for all the Salesforce objects in the above table.

Additional notes

  • All the PushTopics created above filters records based on LastModifiedBy <> {Service account ID}. This is to filter out updates done by the Salesforce Customers and Salesforce Financial System APIs to avoid cyclical updates. This can be obtained by running the query SELECT Id FROM User WHERE Username='<service-account-username>' in the Developer Console.
  • The PushTopics Accounts, and AccountAddresses also filter records based on record type ID. The record type ID can be obtained by running the query SELECT Id,Name FROM RecordType where Name='Household' and sObjectType='Account' in the Developer Console.
  • The PushTopic Households also filter records based on record type ID. The record type ID can be obtained by running the query SELECT Id,Name FROM RecordType where Name='Account' and sObjectType='Account' in the Developer Console.
  • If creation of the PushTopic fails due to a missing field error it is most likely a permissions problem. Check the field level permissions for the object under Profile Settings for the same profile used by the service account.

Adding Mailing Address to Person Account details page

The following instructions assume that support for Person Accounts is already enabled. Perform the following actions to enable Mailing Address on the Person Account detail page.

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Search for Person Account and select it.
  4. From the menu on the left, click on Page Layouts and select the layout you want to adjust.
  5. Click the Fields tab on the palette to show all the available fields.
  6. Search for MailingAddress and select it.
  7. Drag the field from the palette and drop it in the Address Information section of the layout
  8. Click the Save button.

Creating Contacts that are not associated with an Account

These instructions assume that the Salesforce FSC instance includes access to the Contact object.

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Search for Contact and select it.
  4. From the menu on the left, click on Page Layouts and select the layout you want to adjust.
  5. Find the Account Name field on the layout and hover over it. Then, click the wrench icon to show the field properties.
  6. Deselect the Required checkbox and confirm your changes.
  7. Click the Save button.

Adding fields to the Opportunity page layout

Perform the following actions to enable custom fields in Opportunity default page.

  1. Click the Salesforce Setup icon.
  2. Select the Object Manager tab from the Setup home page.
  3. Search for Contact and select it.
  4. From the menu on the left, click on Page Layouts and select the layout you want to adjust (e.g., `).
  5. Click the Fields tab on the palette to show all the available fields.
  6. Search for KYC Completed and select it.
  7. Drag the field from the palette and drop it in the Opportunity Information section of the layout.
  8. Repeat the last two steps to add the Document Signatues Recieved, Ach Transfer Auth Document Id, and Asset Transfer Auth Document Id fields.
  9. Click the Save button.

Configure Connected App for authentication

Follow the below steps to generate the Consumer Key and Consumer Secret values required for Salesforce authentication.

  1. Click the Salesforce Setup icon.
  2. Navigate to Apps -> App Manager.
  3. Select New Connected App.
  4. Enter Connected App Name: Mulesoft Accelerator, API Name: Mulesoft_Accelerator and set your email address.
  5. In the API (Enable OAuth Settings) section, check the box Enable OAuth Settings.
  6. Set the callback URL http://localhost.
  7. From the Selected OAuth Scopes list, select Full access (full).
  8. Click Save and then Continue.
  9. Click the Manage button to view details for the new connected app.
  10. Click the Edit Policies button.
  11. In the OAuth Policies section, for Permitted Users select All users may self-authorize.
  12. For IP Relaxation, select the Relax IP restrictions option.
  13. Click Save.

You now need to copy the Consumer Key and Consumer Secret values for use in configuring Mule application deployments. More specifically, these must be supplied as the values for the sfdc.fsc.client-id and sfdc.fsc.client-secret properties found in the FSC-BANKING-DEV, FSC-Insurance-DEV and FSC-WEALTH-DEV profiles in your Maven settings.xml file.

  1. On the Setup Home page, navigate to Apps -> App Manager.
  2. Locate your new connected app and choose View from the actions dropdown for that item (last column on the right).
  3. Under the API (Enable OAuth Settings) section, click the Manage Consumer Details button.
  4. Verify your identity by entering the verification code that was emailed to you.
  5. Copy the key and secret values and update your settings.xml file as described above.

Download the FINS Common Resources project for a sample settings.xml file that can be used as a starting point.

Generating security token for service account

A token needs to be generated for the service account used by the Mule applications in order to connect to the FSC instance.

  1. Login to Salesforce as the Service Account User (the account that will be used by the Mule applications for connecting to Salesforce).
  2. Click the Username icon in the top right corner and select Settings from the menu.
  3. Select My Personal Information -> Reset My Security Token (if not found, see note below).
  4. Click Reset Security Token.
  5. Check the email inbox for an email from Salesforce with the new security token.

Note: If the option to reset your security token is not available, it is likely that one or more Login IP Ranges are in effect. These can be temporarily removed from the settings page of the profile assigned to the service account user.

ContactPoints Mappings

The following table lists the conditions used to assign ContactPoints in Salesforce:

CIM PartyRole - PartySalesforce Object - Record TypeConditionAction in SalesforceComments
Customer - IndividualAccount - PersonAccountContactPointAddress with isUsedForBilling set as falseAssign Address as PersonMailingAddressIf multiple addresses match this condition, the one with primaryFlag set to true is used; if none set the first one will be used
Customer - IndividualAccount - PersonAccountContactPointAddress with isUsedForBilling set as trueAssign Address as BillingAddress
Customer - IndividualAccount - PersonAccountContactPointPhone with isSMSCapable set as falseAssign Phone Number as PhoneIf multiple phones match this condition, the one with primaryFlag set to true is used; if none set the first one will be used
Customer - IndividualAccount - PersonAccountContactPointPhone with isSMSCapable set as trueAssign Phone Number as PersonMobilePhone
Customer - OrganizationAccount - AccountContactPointAddress with isUsedForBilling set as trueAssign Address as BillingAddressIf multiple addresses match this condition, the one with primaryFlag set to true is used; if none set the first one will be used
Customer - OrganizationAccount - AccountContactPointAddress with isUsedForBilling set as trueAssign Address as BillingAddressIf multiple addresses match this condition, the one with primaryFlag set to true is used; if none set the first one will be used
Customer - OrganizationAccount - AccountContactPointAddress with isUsedFoShipping set as trueAssign Address as ShippingAddress
Customer - OrganizationAccount - AccountContactPointPhone with isFaxCapable set as falseAssign Phone Number as PhoneIf multiple phones match this condition, the one with primaryFlag set to true is used; if none set the first one will be used
Customer - OrganizationAccount - AccountContactPointPhone with isFaxCapable set as trueAssign Phone Number as Fax

*The default values for all the flags is false


Reviews

TypeCustom
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onDec 16, 2022
Contact nameMuleSoft Solutions
Contact emailsolutions-questions@mulesoft.com
Asset overview

Asset versions for 1.7.x

Asset versions
VersionActions
1.7.0