Skip to main content

Account search and creation

Komodo Care Connect provides a custom Account Search experience that allows users to search, find, and create Account and Person Account (PersonAccount) records. Account Search supersedes Salesforce's standard Global Search and Account tabs by providing a highly configurable search experience tailored towards the Komodo Care Connect data model and customer-specific requirements. Account Search can also be extended to connect to customer master database management systems so that users can retrieve and download accounts not stored locally in Komodo Care Connect.

Note

Account Search was redesigned in Komodo Care Connect V2.1.0 for improved performance, configurability, and usability. Much of its functionality remains the same as the Account Search in Komodo Care Connect V2.0.0 and below, but specific changes are detailed in the following sections.

Search for an account

To search for an account with Account Search, users can filter on a desired account type as well as enter specific account and contact information. Depending on the version of the Komodo Care Connect product that is being used, a minimum number of search parameters may be required to initiate a search. However, every search parameter that is entered must contain at least two characters. Search results return exact matches based on the search parameters entered, but users can use asterisks (*) in the middle and end of a search parameter if they are uncertain about spelling. For instructions on how to configure the Account Search experience, including which account type filters and search fields appear, reference the Configuration subsections below.

Table 120. Account Search search parameters

Komodo Care Connect version

Minimum required number of search parameters

V1, including V1.0.1, V1.1.0, V1.2.0, and V1.3.0

2

V2.0.0

0

V2.1.0 and above

1



View the search results

When a search is performed, the Account records that are found are displayed in a table below the search fields. The search results are listed in alphabetical order based on last name then first name for person accounts and on account name for business accounts. The search results are not paginated. In Komodo Care Connect V2.1.0 and above, the total number of Account records that are returned appears above the search results table and the set of Account records that are returned may be filtered down based on certain defined rules. For more information, reference the Configure filter criteria for search results section below.

In KCC V2.1.0, the total number of search results returned, or the total number of Account records found, appears above the Search Results table and next to the "Search Results" title

If a user finds their desired account in the search results, they can click the dropdown arrow on the far right end of the search result row to open the record in a separate tab. If a user cannot find their desired account in the search results, they can create a new account using the information they have already entered for the search. For more information, reference the Create a new account section below.

If any external databases are integrated with Account Search, accounts from both the local Komodo Care Connect database and the external databases will appear in the search results. If there are duplicate records, then only the local results will be kept and displayed. For more information about integrated databases in Account Search, reference the Integrate with an external database section below.

Create a new account

Users can only create a new account after performing an initial search. The search filters and parameters entered in the initial search are subsequently used to drive the creation of the new Account record as well as any related Contact Information (mvn__PJN_Contact_Information__c) records. For instance, users will only be shown either Person Account record types or Business Account record types to create the new Account record depending on which account type filter was initially selected. Additionally, the fields in the new account and contact information forms will automatically be populated with the information entered as search parameters in the initial search.

Information entered as search parameters are automatically populated for new Account and Contact Information records

To create a new account:

  1. Perform an initial search.

    1. Select either Person Accounts or Business Accounts. The former is selected by default.

    2. Select an Account record type. All is selected by default.

    3. Enter one or more search parameters. Depending on the Komodo Care Connect version, this may be required. For more information, reference Table 120, “Account Search search parameters above.

    4. Click Search.

  2. Click New Account if in Komodo Care Connect V2.0.0 or below. Click Create New Account if in Komodo Care Connect V2.1.0 or above.

  3. Select an Account record type. The record types shown are dependent on the selection in step 1a. A record type may already be selected if a filter other than All was selected in step 1b.

  4. Enter details about the new account to be created. Some fields may already be populated based on the search parameters in step 1c.

  5. Add any contact information. For more information, reference the Add contact information for the account section below.

    1. Select a Contact Information record type.

    2. Enter details about the contact information to be added. Some fields may already be populated based on the search parameters in step 1c.

    3. Check the Set as Primary checkbox as appropriate. Only one primary record may exist for each Contact Information record type. If no primary record exists for the current record type, this checkbox will default to true. If a primary record already exists for the current record type, this checkbox will default to false and will override the existing primary record if set to true.

    4. Click Add. A card with the newly added contact information will appear.

    5. Repeat steps 5a-5d as appropriate.

  6. Click Save. The new Account record as well as any new Contact Information records will be created. The Contact Information records will be automatically related to the Account record.

Add contact information for the account

When users create new Account records via Account Search, users can also create new Contact Information records that will automatically be related to the new Account records. For every Contact Information record type, there can only be one record where the Set as Primary (mvn__PJN_Set_as_Primary__c) field equals true. If a contact information is marked as the primary record for a record type and then another contact information is marked as the primary record for the same record type, the newer record will supersede the older record.

To create a new Contact Information record via Account Search, reference step 5 above.

Configuration

Komodo Care Connect's custom Account Search experience is highly configurable. The following sections provide instructions on how to configure different parts of the Account Search user interface and experience (UI/UX).

Configure filter criteria for search results

Out of the box, Account Search returns any Account record that matches the search parameter(s) that users enter. However, you can set specific criteria on the Account Search Additional Filters (mvn__PJN_Account_Search_Additional_Filters__mdt) custom metadata type to define which records should be returned by Account Search. For example, if you want Account Search to exclude any inactive accounts from an integrated external database, you can create an Account Search Additional Filters metadata record to filter out those records from the local database and only show active accounts in the search results. Each Account Search Additional Filter metadata record represents a rule that, when evaluated to true, returns the Account record that meets users' search queries. Multiple Account Search Additional Filter metadata records can be created to control what records appear in the results of an account search.

To define one or more filter criteria for which Account records should be returned to users:

  1. In Setup, navigate to the Feature Activation (mvn__Feature_Activation__mdt) custom metadata type.

    1. Click Manage Feature Settings.

    2. Click the Account Search Additional Filters (PJN_Account_Search_Additional_Filters) metadata record.

    3. Edit the metadata record and check the Active checkbox.

    4. Click Save.

  2. In Setup, navigate to the Account Search Additional Filters (mvn__PJN_Account_Search_Additional_Filters__mdt) custom metadata type.

    1. Create a new Account Search Additional Filters metadata record for each new rule or filter criteria that you want to set.

    2. In the Rule (mvn__PJN_Rule__c) field, enter a JSON string. The JSON string must evaluate to true for the desired Account records to appear as search results.

      Note

      For guidelines on how to write the JSON criteria, reference Criteria definition.

    3. Click Save.

Configure account type filters

The account type tabs and tiles in Account Search allow users to filter accounts returned in the search results by Account record type. The account types, tabs, and tiles are all managed by the Account Type Setting (mvn__PJN_Account_Type_Setting__mdt) custom metadata type.

Account type tabs

Account type tiles

PSP_AccountTabsV2.png
PSP_AccountTilesV2.png

Note

For each Account Type Setting metadata record, the Include in Search? (mvn__PJN_Include_in_Search__c) field must equal true for users to filter and search with the given Account record type while the Include in Create? (mvn__PJN_Include_in_Create__c) field must equal true for users to create new accounts with the selected Account record type.

The tabs and tiles may not always appear in Account Search. For example, in Komodo Care Connect V2.0.0 and below, the tabs appear in every instance of Account Search while the tiles only appear when users open Account Search from a Case record, such as when a user is enrolling a patient into a care plan. Meanwhile, in Komodo Care Connect V2.1.0 and above, the tabs only appear in the standalone instance of Account Search and do not appear when Account Search is used in the context of a Case record. In instances where both the tabs and the tiles appear together in Account Search, clicking a tile automatically selects the corresponding tab.

Note

For each Account Type Setting metadata record, both the Acc Lookup Field API Name For Case (mvn__PJN_Acc_Lookup_Field_API_Name_For_Case__c) field and the Acc Relationship API Name For Case (mvn__PJN_Acc_Relationship_API_Name_For_Case__c) field must be populated for the account type tiles to appear in Account Search when users are relating an Account record to a Case record.

Warning

To ensure that users can create an Account record of the selected account type tab and tile after initiating a search, complete the following steps before creating a new Account Type Setting metadata record for a new Account record type:

  1. Make sure you have the necessary Account or Person Account page layouts and compact layouts for the Account record type.

  2. Create and configure the new account form for the new Account record type. For more information, reference the Configure the forms for new accounts section below.

Configure search fields and search results columns

The fields in Account Search where users enter their search parameters and the columns in the search results table are all managed by the Field Setting (mvn__PJN_Field_Setting__mdt) custom metadata type. To configure the search fields and/or the search results columns, create new Field Setting metadata records and/or modify the out-of-the-box Field Setting metadata records as appropriate.

Warning

Account Search uses both SOSL queries and SOQL queries to search across all fields in the Account object. However, if a user has read-only access to a field in the Account object, they are not able to use it as a search parameter in Account Search. A workaround is to use the Field Setting custom metadata type to create and add a dummy field that the user can access to Account Search.

Set default Country value

Out of the box, the Country field as a search parameter in Account Search is blank. However, you can configure the Country field so that it automatically populates with the current user's country. To set the default value on the Country field in Account Search to equal the Country field on the User record, turn on the Account Search Country Default feature.

  1. In Setup, navigate to the Feature Activation (mvn__Feature_Activation__mdt) custom metadata type.

  2. Click Manage Feature Settings.

  3. Click the Account Search Country Default (PJN_Account_Search_Country_Default) metadata record.

  4. Edit the metadata record and check the Active checkbox.

  5. Click Save.

Configure contact information search parameters

Account Search offers users the ability to search for accounts using associated contact information, such as an address, a phone number, a fax number, or an email. Out of the box, each contact information search parameter in Account Search is related to a specific type of search that in turn is related to a Contact Information (mvn__PJN_Contact_Information__c) record type via the Field Setting (mvn__PJN_Field_Setting_mdt) custom metadata type. For example, the Field Setting metadata records that Komodo Care Connect ships with configure every Phone field in Account Search to prompt a "phone search" that is associated with the Phone (PJN_Phone) record type. Similarly, all City and State fields in Account Search are configured to prompt an "address search" that is associated with the Address (PJN_Address) record type. If there are additional or custom Contact Information record types, they must be identified in the Contact Info Record Types (mvn__PJN_Contact_Info_Record_Types__mdt) custom metadata type in order to be queried by Account Search. For example, if an external database is integrated into Account Search and a new Address Read Only (CUST_Address_Read_Only) record type is created, the new Address Read Only record type must be associated with the existing Address record type in order for an "address search" to find all accounts that have contact information that are either of the PJN_Address or CUST_Address_Read_Only record types.

Table 121. Sample address mvn__PJN_Contact_Info_Record_Types__mdt record

Field label

Sample value

Contact Information Type

Address

Record Types

PJN_Address;CUST_Address_Read_Only



Configure the forms for new accounts

Each Account record type has a dedicated form in Account Search for users to add new accounts, and each form can be configured with the New Account Fields Setting (mvn__PJN_New_Account_Fields_Setting__mdt) custom metadata type. The Record Type (mvn__PJN_Record_Type__c) field on each New Account Fields Setting metadata record specifies which Account record type the form is for and therefore which form is being configured. For example, if the Record Type field equals PJN_Patient, then the New Account Fields Setting metadata record configures the new patient form.

Configure the forms for new contact information

Each Contact Information record type has a dedicated form in Account Search for users to add new contact information for an account, and each form can be configured with the New Contact Info Fields Setting (mvn__PJN_New_Contact_Info_Fields_Setting__mdt) custom metadata type. The Record Type (mvn__PJN_Record_Type__c) field on each New Contact Info Fields Setting metadata record specifies which Contact Information record type the form is for and therefore which form is being configured. For example, if the Record Type field equals PJN_Address, then the New Contact Info Fields Setting metadata record configures the new address form.

Note

When configuring the new address form, make sure that controlling picklist fields appear before their dependent picklist fields to avoid any unexpected behaviors, per Salesforce's documentation on input fields. For example, the Country (PJN_Country) metadata record should have a lower Order (mvn__PJN_Order__c) value than the State (PJN_State) metadata record because the country that is selected determines which states are available.

Integrate with Google's Places API

Komodo Care Connect can be integrated with Google's Places API so that users can more easily search for and add addresses as contact information for accounts in Account Search. For detailed instructions on how to integrate with Google's Places API, reference the Google address search page.

Once Google's Places API is integrated, an Address Search field will be added to the top of the new address form in Account Search. Users can type in this field to view and select from Google's returned list of suggested addresses. The selected address automatically populates the following fields in the new address form that correspond to fields on the Contact Information object:

  • Country (mvn__PJN_Country__c)

  • Address Line 1 (mvn__PJN_Address_Line_1__c)

    Note

    Google's Places API does not separate addresses into two lines, so Address Line 2 (mvn__PJN_Address_Line_2__c) will be left blank.

  • City (mvn__PJN_City__c)

  • State (mvn__PJN_State__c)

  • Postal Code (mvn__PJN_Postal_Code__c)

Integrate with an external database

To enable users to retrieve and download accounts not stored locally in Komodo Care Connect, Account Search can integrate with external databases such as customer master database management systems.

For each external database you would like to integrate with Account Search:

  1. Create a search handler implementing the Account Search Interface (PJN_AccountSearchIntf). The class should implement the following methods:

    1. search(searchRequest), which accepts an Account Search Request (PJN_AccountSearchRequest) object and returns a list of Account Search Result (PJN_AccountSearchResult) objects

    2. insertAccountDetails(searchResult), which accepts an Account Search Result object, inserts account and other data into the Komodo Care Connect database, and returns the ID of the newly created Account record

    3. getAccountExternalIdField(), which returns the SObjectField representing the Account field that is used as an external ID for the integration

  2. Create a new Interface Handler (mvn__Interface_Handler__mdt) metadata record. The interface handler should be created as follows:

    Table 122. Sample Account Search mvn__Interface_Handler__mdt record

    Field label

    Sample value

    Active

    true

    Class

    the name of the search handler class implemented in step 1

    Class Namespace

    the namespace of the search handler class implemented in step 1, if applicable

    Context

    leave blank

    Criteria

    leave blank

    Interface

    mvn.PJN_AccountSearchIntf

    Sequence

    the order that the search handler class should be called after a local search is performed



If a user is searching for an account or relating an account to a Case record and external results are returned, the user can pull the result into Komodo Care Connect. This means that a new Account record and any related Contact Information (mvn__PJN_Contact_Information__c) records will subsequently be created. Once the external result is inserted into Komodo Care Connect, Account Search will match up the external account with the newly created local account based on an external ID and know not to return duplicate results from both the external and local databases.

Note

In Komodo Care Connect V2.0.0 and below, Account Search will run the out-of-the-box search implementation before any custom search handlers. In Komodo Care Connect V2.1.0 and above, Account Search will run all search handlers simultaneously. The latter enhances the performance of the search and reduces the risk of hitting Apex central processing unit (CPU) time limits. In both instances, duplicate results from the local and external databases will be handled appropriately such that only the local results will be kept and displayed.

Warning

Once an external result is pulled into Komodo Care Connect, users will only see the local account in the search results and will no longer be able to view or select the external account. All subsequent changes to the account must be made on the local Account record.

For more information on how to use the DCR framework to submit a data change request, reference Data change requests (DCR).