User Request Framework

Learn about the data items that define the framework for capturing user's requests. The framework is implemented on the insurance storefront as part of first notice of loss process (when a user submits a claim). However, it is generic, fully configurable, and can be easily implemented for any custom user's request process.

UML Diagram

The framework relies on two important aspects - the definition of user's request process and its instances (or process execution). In the back-end, we first need to define the pages that we want a user to fill in when submitting a request. The data model that enables this is explained in the section Definition of User's Request Process. Secondly, we need to have a mechanism for capturing the data that a user provided. In other words, we need to manage instances of user's requests. This part is explained in the section Instance of User's Request.

Definition of User's Request Process

To define the user's request process, FSStepGroupDefinition and a list of AbstractFSStepDefinition items are used. FSStepGroupDefinition is a container-like element that contains a list of AbstractFSStepDefinition objects. The object is created to handle specific FSRequestType and is associated with a Category. In our implementation, the request type can be FSCLAIM, FSCOVERAGE_CHANGE and FSINSUREDOBJECT_CHANGE, this framework can be used for submitting claims or it may be a policy change request or any other type of request that you need. The main attributes of this object are title and confirmationURL. The title property is used to display the heading information on the storefront that describes the request, while the confirmationURL is used to navigate the user to an appropriate confirmation page after the request is submitted.

Let's take as an example the first notice of loss process in Financial Services Accelerator. The process comprises four pages or steps that guide the user during submission of claim. For every page that we want a user to fill in, a specific step definition needs to be created and associated with the group (FSStepGroupDefinition), based on what kind of content should be displayed and how the processing of the step will work. In the default implementation, two types of step definitions are available:
  • YFormFSStepDefinition, for displaying and processing a YForm

  • SimpleFSStepDefinition, for displaying basic or summary content

Note that these two steps are only implementations that are used in FNOL process. You can introduce any kind of step definition that satisfies your business requirements. The FSStepGroupDefinition object, as well as its step definitions are catalog-aware and can utilize the full power of catalog management and synchronization capabilities offered by SAP Commerce.

Instance of User's Request

For managing instances of user's request, the data model provides FSUserRequest that is associated with a FSStepGroupDefinition and list of FSStepData items. FSUserRequest is the actual request that a user submits, and in the default case, it is the implementation of FSClaim object. You may extend the implementation to any other object for which this kind of step-wise procedure is needed. It has its own requestId, which is very important for generic handling of the user journey. A basic set of FSRequestStatus enumerations are available that simply denote whether a request has been submitted or not.

FSStepData items are created based on the corresponding AbstractFSStepDefinition objects and the sequence they have in FSStepGroupDefinition. For each step definition, a corresponding FSStepData is created that takes over the group's name, sequenceNumber, pageLabelOrId, configuratorType and summaryStep (if it exists). In case of YFormFSStepDefinition, which is based on YFormDefinition information, a YFormData instance is created and stored on FSStepData. Finally, FSStepStatus is used to track the actual status of the step in the user journey.

When a specific request type is initiated by the user for the provided Category (e.g. User starts to report a claim (FSClaim) for car insurance (Category)), if a specific FSStepGroupDefinition is defined, a list of FSStepData objects are instantiated based on AbstractFSStepDefinition instances and associated with a FSUserRequest instance (e.g. FSClaim). From that moment on, the entire user journey is handled based on FSUserRequest instance, its FSStepData collection and additional information available through FSStepGroupDefinition.

Since one cannot determine which implementation of FSUserRequest is the user relying on during their journey, AllowedFSRequestType is used as a flexible way to deal with the processing of user data. Through AllowedFSRequestType, you can define which type of requests are allowed for each category, as well as which spring bean does the transforming/processing of values (requestTransformer field).