Configuring Insured Object Types
General process description: Inside the Insured Object Types section, the user can create a new object, and configure its dimensions. Inside the dimensions grid, the user can change the order index of the grid items.
The addressId dimension is added by default, for every object.
Read below about the entities, endpoints, scripts and libraries used for implementing this functionality.
Entity FTOS_IP_InsuredObjectType
This entity stores data about the insured object types.


This flow is used for creating insured object types.

Insured Object Type step: This flow is used to edit insured object types. It also allows the user to configure the dimensions for the insured object type.
History step: This displays the versioning history of the record.


This view displays all registered insured object types - in Draft, Approved or Closed status.

This view displays the version history for the specified record.

This view displays all the Approved insured object types.
Entity FTOS_IP_InsuredObjectTypeDimension
This entity stores data about the insured object types dimensions.


This flow is used for creating and editing dimensions on insured object types.


This view displays all the dimensions defined on an insured object type. Inside the dimensions grid, the user can change the order index of the grid items. This also sets the order index for how dimensions are displayed further, on the policy form.

This view displays all available insured object types dimensions on an insuredObjectTypeId
received as parameter.
Entity Attribute
A new view was developed on the FintechOS Attribute entity. The filterByEntitytId view displays all the attributes from a specific entity, based on the entity’s Id.
For more details - such as an entity's Data Model, Data Events, Data Referencing, Data API, Unique Constrains, and more, go to Innovation Studio > Data Model Explorer > Business Entities List and check the entity's description. For an overview about how FTOS entities are described, consult the Data Model Explorer documentation.
Endpoints

Endpoint used to run the FTOS_IP_getEntityFromObjectType server automation script.

Endpoint used to run the FTOS_IP_InsuredObjectType_CheckBusinessStatus server automation script.

Endpoint used to run the FTOS_IP_CloneObjectType server automation script.

Endpoint used to run the FTOS_IP_ValidateObjectTypeName server automation script.

Endpoint used to run the FTOS_IP_InsuredObjectType_GetDetails server automation script.
Server Side On-demand Scripts

Based on the Id of the insured object type, this script returns the Id of the mapped entity. This script displays only the mapped entity’s attributes when configuring the dimensions.
Input parameters: objectTypeId
- The Id of the insured object type.
Output parameters: entityMapping
- The Id of the mapped entity.

Based on the provided insured object type Id, this script checks if the insured object type is in Draft or Version Draft status and returns a boolean.
Input parameters: insuredObjectType
- The Id of the insured object type.
Output parameters: check
- The boolean that determines if the insured object type is in the correct status.

Based on the insured object type’s name and the name of the entity, this script starts the cloning process for the FTOS_IP_InsuredObjectType entity.
Input parameters:
-
objectName
- The name of the insured object type. -
entityName
- The name of the entity.
Output Parameters: N/A

This script checks if the name provided by the user for the new insured object type (for the cloning process) is valid.
Input parameters: objectName
- The name proposed for the insured object type.
Output Parameters: objectFound
- The boolean that determines if there is already an object with the provided name.

Based on the Id of the insured object type, this script returns the details of the object type: attribute version, description, the Id of the mapped entity.
Input parameters: objectTypeId
- The Id of the insured object type.
Output Parameters: objectTypeDetails
- An object containing the insured object type's details.
Server Side Libraries
1. FTOS_IP_InsuredObjectType_Operations
This server side script library stores methods for various actions that a user can perform on an insured object type. These methods were divided in two main classes to keep the functionalities on the insured object type separate from the ones on the insured object type dimension.

This class holds methods used only for operations performed at the insured object type level.

This function returns information about an insured object type, based on the insured object type Id
Input parameters: objectTypeId
- The Id of the insured object type.
Output parameters: query object - An object containing the results of the query.

This function checks if the status of an insured object type is in Draft or Version draft status and throws an error.
Input parameters:
-
id
- The Id used to retrieve the product’s information. -
functionName
- The name of the function used to retrieve the product’s information. -
resource
- The message the error throws when the product is not in Draft or Version Draft status.
Output parameters: N/A.

Based on the object type’s id, this function checks if the object type is used by an approved product or not.
Input parameters: objectTypeId
- The Id of the object type.
Output parameters: N/A.

This class holds methods used only for operations performed on a insured object type dimension level. From this class, the getDimensionDetailsByObject function is used.
This function returns information about an insured object type dimension, based on the insured object type Id.
Input parameters: objectTypeId
- The Id of the insured object type.
Output parameters: query object - An object containing the results of the query.
2. FTOS_IP_InsuredObjectType_Clone
This server side script library stores a class of methods that deal with cloning an insured object type.


This function returns information about an insured object type, based on its name.
Input parameters: objectName
- The name of the insured object type.
Output parameters: query object - An object containing the results of the query.

This function receives the values of the Name field inside the cloning pop-up, from the client side. If the value comes in as being empty or invalid, an exception will be thrown to inform the user. Same thing happens if the name points to an existing insured object type with the same values.
Input parameters: objectName
- The name proposed for the insured object type to be cloned.
Output parameters: If no exception gets thrown, the cloning process moves on.

After performing some validations on a few attribute names, this function inserts a data object into an entity, both received as a parameter.
Input parameters:
-
entityName
- The name of the entity on which the insert will be made. -
entityData
- The object containing all the data from the original insured object type. -
objectId
- The Id of the cloned insured object type.
Output parameters: Returns an Id
of the newly inserted record.

This function calls all the other functions (described above) in order to validate, insert and update all the data for the new clone.
Input parameters:
-
entityName
- The name of the entity on which the fetches will be made. -
objectId
- Id of the insured object type which is about to be cloned. -
objectName
- The name of the cloned insured object type.
Output parameters: N/A.