Accounts

This article provides an overview of accounts in the Socotra Insurance Suite.

Overview

In the Socotra Insurance Suite, an account is a data object that represents a third-party entity (a person or a business) that is capable of being quoted for and being issued a policy for an insurance product. An account can also represent a payer or another external party.

Accounts associate individuals or businesses with the insurance products they’re covered by. Invoicing and payments can be managed at the account level.

A tenant’s configuration defines the overall structure of accounts and how they must be configured, including which parameters are required or optional and which data types are permitted.

Configuring accounts

An important part of tenant configuration is defining what types of accounts you want to make available.

Tip

Accounts are extensible with data in a similar way to other entities. For more information, see: Data extensions.

The directory tree below shows an example of how the accounts directory of a tenant configuration could be set up to allow for multiple account types.

Example file tree of account configuration files
├── accounts
│   ├── BaseAccount
│   │   └── config.json
│   ├── CommercialAccount
│   │   └── config.json
│   └── ConsumerAccount
│       └── config.json

The example above shows three configured account types:

  • BaseAccount

  • CommercialAccount

  • ConsumerAccount

Let’s examine the differences between each of these accounts in their config.json files.

Example: BaseAccount

In the example below, the BaseAccount configuration is defined as a basis for all other accounts. We know this because its abstract parameter is set to true. The intent of this account is not to be used directly, but rather to be extended by other account definitions.

Notice that in the CommercialAccount and ConsumerAccount examples there is a property called extend that points to the BaseAccount. This means that those accounts also include the parameters defined in the BaseAccount.

BaseAccount
{
    "defaultSearchable" : false,
    "data" : {
            "tier" : {
            "type" : "string",
            "maxLength" : 20000,
            "options" : [ "Gold", "Silver", "Bronze" ],
            "searchable" : true
        }
    },
    "abstract" : true
}

Example: CommercialAccount

In the example below, the CommercialAccount is configured specifically to meet the needs of a commercial insurance customer (as opposed to an individual consumer).

CommercialAccount
{
    "extend" : "BaseAccount",
    "numberingPlan": "numberingPlan2",
    "invoiceNumberingPlan": "numberingPlan3",
    "data" : {
        "companyName" : {
            "displayName" : "Company Name",
            "type" : "string",
            "maxLength" : 20000
        }
    },
    "abstract" : false
}

Example: ConsumerAccount

In the example below, the ConsumerAccount is configured specifically to meet the needs of an individual consumer (as opposed to a commercial entity).

ConsumerAccount
{
    "displayName" : "Personal",
    "extend" : "BaseAccount",
    "numberingPlan": "numberingPlan2",
    "invoiceNumberingPlan": "numberingPlan3",
    "data" : {
        "firstName" : {
            "displayName" : "First Name",
            "type" : "string",
            "maxLength" : 20000,
            "searchable" : true
        },
        "middleName" : {
            "displayName" : "Middle Name",
            "type" : "string?",
            "maxLength" : 20000,
            "searchable" : false
        },
        "lastName" : {
            "displayName" : "Last Name",
            "type" : "string",
            "minLength" : 2,
            "maxLength" : 20000,
            "searchable" : true
        }
    },
    "abstract" : false
}

Account states

An account can exist in one of two states. The table below list the two states and whether they can be used to validate quotes and/or quick quotes.

Account state

Description

Can quote?

Can quick quote?

draft
A draft account is mutable without restriction.
No
Yes
validated
A validated account is an account that’s been validated according to the tenant configuration and any other custom validation rules.

Once an account is validated, it can’t revert to a draft state.

It’s possible to update an account, but the updates must also be validated according to the tenant configuration. If validation fails, the changes won’t be saved.

Yes

Yes

Limiting products to certain account types

On an insurance product, the eligibleAccountTypes property can be configured to restrict its usage to certain account types.

For example, an insurance product intended only for individual consumers could be limited to a ConsumerAccount.

Note

If the eligibleAccountTypes for an insurance product is left unspecified, all account types are considered eligible for the product.

Extension data

Accounts are extensible with data in a similar way to other entities. See the Data Extensions topic for more details.

See also