Agent Enablement (On-Behalf-of Framework)
The On-Behalf-of framework in Financial Services Accelerator enables business users to perform actions on behalf of end customers.
Overview
In online financial interactions, there is often a need for business users to help their customers buy and manage insurance or banking products by acting on their behalf. To make this process possible, the On-Behalf-of (OBO) framework has been implemented. The OBO framework introduces a seller as a new type of user in the Financial Services Accelerator, who can perform different actions on their customers' behalf, based on granted permissions. In other words, to be able to act on behalf of a customer, the user needs to be a member of the Seller user group (sellergroup) and have the necessary consent (OBOConsent).
Concepts
Seller Group
The Seller Group (sellergroup) is a new user group created for the purpose of the On-behalf-of framework, to enable differentiation between sales agents and other business users in the Financial Services Accelerator. By becoming a member of this group, the business user is defined as a seller and has permission to create accounts for customers in the portal and preview their portfolios. After obtaining full consent, sellers can perform other financial operations on the customers' behalf from the Agent Dashboard (see next sections for more information).
On-Behalf-of Consent
Being a member of the Seller Group is not enough for the seller to, for example, start creating quotes or changing policies on the customer's behalf. The seller first needs to obtain a set of permissions from the customer. These permissions are managed with the On-Behalf-of consent (OBOConsent).
The On-Behalf-of consent allows sellers and customers to transparently work together: customers grant consent to their dedicated sales agents for actions they want the seller to perform for them, and the seller is then able to act according to the granted consent.
Without OBO consent, the seller can only create an account for a customer. By creating a customer account, the seller acquires full OBO consent to execute business actions in the portal in the name of that customer. The consent is generated out of the box because it is assumed that the customer was the one who requested the creation of the account by the seller and is aware of the given permissions. At any point, later on, the customer can withdraw the granted permissions by going to the Consent Management page, located in the My Account area. This is also where the customer can preview and manage all of their consents.
In the current implementation, sellers can perform the following actions on behalf of their customers:
- preview customer's assets (quotes, applications, policies, claims)
- create new quotes and applications
- submit claims
- change existing policies
- add or update address information
Each of the above-mentioned actions is configured as separate permission within the OBO consent. For example, the seller can have permission to create quotes and applications, but not to change the customer's policies. When the seller starts a certain process for the customer, the system first checks if the seller has permission to perform that process for the selected customer.
Implementation-wise, when the seller creates an account for a customer, a new OBOConsent instance is formed as an aggregation between the seller (who is now the consent holder) and the created customer account.
The following properties of the OBOConsentModel should be considered during implementation:
- code - Unique consent identifier.
- customer - Name of the customer.
- consentHolder - Name of the seller who acts as the OBO consent holder.
- template - Sample consent template for the On-Behalf-of framework. Should be set to OBO_CONSENT_TEMPLATE.
- givenDate - Date when the OBOConsent is created for the given customer.
- oboPermissionConfiguration - Configuration used to control permissions granted to the consent holder by the customer.
Agent Dashboard
To support this feature on the storefront, an Agent Dashboard is introduced. The Agent Dashboard is an overview page that contains all the necessary information and action points sellers need to be able to do their job.
In the default implementation, sellers can perform actions on behalf of customers they created as if they were logged into the system as that customer. This means that the seller can act without having to wait for the customer to start a session in the portal, as is the case with Assisted Services Module (ASM). The seller simply logs in to the same portal like the one the customer uses, but the system recognizes that the logged-in user is a member of the sellergroup, and therefore displays an Agent Dashboard for them instead of a regular end-user Dashboard. (Logged-in customers are also presented with their own Dashboard, that shows an overview of the most essential information retrieved from the My Account area.)
On Agent Dashboard, sellers can:
- see an overview of their own profile (personal details)
- see the number of existing customers
- create new customer accounts
- see the list of their customers
Further on, the seller can select a specific customer from the list and be redirected to the Customer Dashboard page. The Customer Dashboard contains similar information as the Dashboard presented to the customer when they are logged into the portal. The seller can also see basic personal information of the customer (name, email address, date of birth), and a list of the customer's insured objects: quotes, policies, and claims. What is different is that the Customer Dashboard also serves as a starting point to the seller for processes such as creating a claim, changing a policy, or adding an address on behalf of the chosen customer.
Implementation
To enable the OBO framework, there was a need to separate actions that the seller can do from actions that can be done by a customer. This was accomplished in two ways: by introducing a new controller, the FSOBOConsentsController and by introducing a new security filter, FSUserMatchingFilter. These two methods are not used at the same time. In the current implementation, the FSOBOConsentsController is used when the seller needs to create a customer account, get a list of customers, get customer's insured objects (quotes, policies, claims), add or change customer's address, and initiate the quotation or application process. On the other hand, the FSUserMatchingFilter is used for claim creation and policy change processes.
Within the FSOBOConsentsController, the following APIs are available:
- createOBOCustomer - Registers a new OBO customer. A new instance of OBOConsent is created.
- getCustomersCreatedByConsentHolder - Returns the paginated list of customers for a specified base store, created by the specified consent holder. The number of results per page is 10.
- getOBOCustomer - Returns the selected OBO customer profile.
- getInsuranceQuotesForOBOCustomer - Returns insurance quotes for the selected OBO customer profile.
- getInsurancePoliciesForOBOCustomer - Returns insurance policies for the selected OBO customer profile.
- getClaimsForOBOCustomer - Returns claims for the selected OBO customer profile.
- transferCartToCustomer - Transfers the cart created by the consent holder to the customer. This call is used in the quotation process, when the seller needs to select for which customer they are creating the quote. The cart is then transferred to the selected customer, which can retrieve the quote from their own profile and comlete the purchase.
- updateOBOCustomerPermission - Updates permission for OBO customer.
- getOBOConsentsForCustomer - Returns OBO consents for selected OBO customer profile.
- createAddress - Creates a new address for customer that has given the OBO consent.
- updateAddress - Updates the existing address for customer that has given the OBO consent.
The FSOBOConsentsController uses both userId (the logged-in user or the current user) and the customerId, in order to separate actions performed by the seller in their own name and in the name of a chosen customer. For example, for customer account creation, only userId is used, as the seller is acting on their own behalf when creating an account for a user. The same goes for fetching the customer list.
GET/{baseSiteId}/users/{userId}/oboconsents/customers
When the seller selects a customer from the list and opens the Customer Dashboard, a customerId is introduced, as the seller now acts on behalf of the chosen customer. Therefore, requests such as getInsuranceQuotesForOBOCustomer, getInsurancePoliciesForOBOCustomer, and getClaimsForOBOCustomer contain the customerId attribute, pointing at the customer on whose behalf the seller wishes to see existing quotes, policies, and claims.
GET//{baseSiteId}/users/{userId}/oboconsents/customers/{customerId}
When creating a quote or an application for the customer, the seller fills out the forms with details provided by the customer. After the Personal Details step, the seller is prompted to choose the customer they wish to create the quote for. When the quote is bound, the cart is prepared and the customer can log in, retrieve the quote, and complete the action by providing payment information (in case of insurance products) or accepting legal requirements (in case of banking products).
@Secured({ "ROLE_SELLERGROUP", "ROLE_TRUSTED_CLIENT" })
This security annotation prevents users who are not part of the sellergroup to see information or make requests reserved for a seller.
The FNOL process and the Policy Change process do not use the same logic as this would result in duplicating requests that already exist in FSClaim and FSChangeRequest controllers. For that reason, we have introduced a security filter FSUserMatchingFilter to separate seller-initiated actions from the ones initiated by the customer. This filter replaces the existing UserMatchingFilter and enables separation between use cases that involve just the customer from use cases that involve both the seller and the customer (OBO framework use cases). In the current implementation, the filter is triggered when the seller wishes to create a claim or change a policy for a chosen customer.
else if (hasRole(ROLE_CUSTOMERGROUP, auth) && StringUtils.equals(userID, CURRENT_USER))
{
setCurrentUserForCustomerGroupRole((String) auth.getPrincipal(), userID);
}
else if (hasRole(ROLE_SELLERGROUP, auth) && !StringUtils.equals(userID, CURRENT_USER))
{
setCurrentUser(userID);
setSeller((String) auth.getPrincipal());
}
In the FNOL use cases, when the seller starts claim creation from the Customer Dashboard, the FSUserMatchingFilter is triggered. It then recognizes the seller as the logged-in user, but sets the customer as the currentUser (userId), as the seller now performs actions on the customer's behalf. Further on, the initial request continues to be processed. Then the method createClaimForPolicy is called, and the system first checks if the seller who initiated the request has the corresponding OBO consent in place. If yes, the method gets executed as usual. Otherwise, the exception is thrown and the seller is informed that there are no sufficient permissions to perform the requested action.
The same logic is applied to the policy change requests. In the current implementation, the seller can change the customer's auto insurance policies, and the same sample processes are enabled as for the customers themselves: change mileage, add or remove coverage, and add additional drivers. In order to complete a policy change, the same requests need to be sent in the same order and with the same properties as for the customer-initiated process. What needs to be different when the seller does the policy change is the userId parameter in the URL, which needs to be set to the registered email address of the customer for which the seller makes the change. Keep in mind that the authorization token is the one of the seller. This way, the system recognizes that the request comes from a seller but that the change is applied to a customer.