Skip to main content

Item Attributes and Values

GPM item attributes are powered by the generic Foundation Extensible Fields (FND EFF) system using entity_type = 'GPM_ITEM'. This lets any domain — insurance, radiology, beauty — define typed attribute sets on items without schema changes, while sharing a single consistent model across the platform.

The pattern involves four layers:

  1. Categories (fnd_categories) — named groups of attributes scoped to entity_type = 'GPM_ITEM'
  2. Attribute definitions (fnd_category_attrs) — typed field definitions within a category
  3. Category assignments (fnd_category_assignments) — explicit links that attach a category to GPM items
  4. Attribute values (fnd_category_values) — per-item values keyed by entity_id (the GPM item UUID)

The GPM_ITEM entity type​

All GPM item categories use entity_type = 'GPM_ITEM' in fnd_categories. This is the stable identifier used by the generic FND EFF system to scope categories, assignments, and values to GPM items.

GET /persist/v2/fnd_categories?entity_type=eq.GPM_ITEM&active=eq.true

Attribute definitions​

Each attribute definition belongs to a category and has a unique code within it (e.g. BN_NATURAL_DISASTER). Definitions carry:

  • Data type — controls which value column is populated (see Supported data types)
  • Lookup type — optional reference to a pick-list for constrained values
  • Default value — applied when no explicit value is recorded
  • Required flag — whether a value must be provided
  • Display order — sort position within the category

Insurance attribute examples​

The standard insurance catalogue includes examples such as these:

CategoryAttributeNameData type
SettlementST_BASISSettlement BasisTEXT
SettlementST_ALTERNATIVE_SITEAlternative SiteCOVERAGE
Defined EventsEV_FIREFireCOVERAGE
Defined EventsEV_STORMStorm DamageCOVERAGE
BenefitsBN_NATURAL_DISASTERNatural DisasterCOVERAGE
BenefitsBN_TEMPORARY_ACCOMTemporary AccommodationCOVERAGE
Legal LiabilityLL_PUBLIC_LIABILITYPublic LiabilityCOVERAGE
FinancialFIN_STRENGTH_RATINGFinancial Strength RatingTEXT

Supported data types​

Data typeStored in columnTypical use
TEXTtext_valueShort strings, codes, free text
NUMBERnumber_valueCounts, measurements, monetary limits
DATEdate_valueTimestamps, expiry dates
BOOLEANboolean_valueFlags, capability indicators
LOOKUPtext_valueConstrained values from a lookup list
COVERAGEtext_valueInsurance coverage status with optional detail label

COVERAGE values​

COVERAGE is a GPM-specific data type that represents whether an insurance feature is active and at what level. The status code is stored in text_value using one of the standard coverage codes:

CodeMeaning
INCLUDEDThe feature is fully included in the policy
EXCLUDEDThe feature is explicitly excluded
LIMITEDThe feature is included subject to conditions or caps
OPTIONALThe feature can be added as an optional extra
NOT_LISTEDCoverage status is not declared for this product

A supplementary label (e.g. "Up to $500,000", "Excess applies") may accompany the status code and is stored in the attribute's description metadata where populated.

Explicit category assignments​

Before attribute values can be recorded for a GPM item, the relevant category must be explicitly assigned using fnd_category_assignments:

POST /persist/v2/fnd_category_assignments
{
"category_id": "<INS_DEFINED_EVENTS category id>",
"entity_type": "GPM_ITEM"
}

An assignment links the category to all GPM items. Once an assignment exists, values can be recorded in fnd_category_values for any item.

Attribute values​

Each value row in fnd_category_values links a specific GPM item to an attribute definition. The entity_id field holds the GPM item UUID:

POST /persist/v2/fnd_category_values
{
"assignment_id": "<assignment id>",
"attr_id": "<EV_FIRE attr id>",
"entity_id": "<gpm item UUID>",
"text_value": "INCLUDED"
}

Each item can have at most one value per attribute — the combination of entity_id and attr_id is unique.

Querying item attributes​

All attributes for an item​

To retrieve all extensible field values for a GPM item, join fnd_category_values with fnd_category_attrs:

GET /persist/v2/fnd_category_values?entity_id=eq.<item-uuid>&select=*,attr:fnd_category_attrs(attr_code,attr_name,data_type,display_order)

Attributes grouped by category​

To retrieve values alongside their category for a comparison or detail view:

GET /persist/v2/fnd_category_values?entity_id=eq.<item-uuid>&select=*,attr:fnd_category_attrs(attr_code,attr_name,data_type,category_id),assignment:fnd_category_assignments(category_id)

All items with a specific attribute value​

To find all GPM items where "Natural Disaster" coverage is INCLUDED:

GET /persist/v2/fnd_category_values?attr_id=eq.<BN_NATURAL_DISASTER attr id>&text_value=eq.INCLUDED&select=entity_id

Access control​

Attribute definitions and values follow the FND EFF access rules:

  • Unauthenticated marketplace reads — permitted via the existing marketplace RLS policy
  • Authenticated reads — permitted for all authenticated users
  • Writes — restricted to authorised organisation users

Compatibility during migration​

Coexistence period

During the migration period the legacy GPM-specific views (gpm_item_categories, gpm_item_category_attrs, gpm_item_attr_values, gpm_item_attribute_summary) remain available for read access. They are maintained as compatibility views over the generic FND EFF tables.

New consumers should use the FND EFF endpoints (fnd_categories, fnd_category_attrs, fnd_category_assignments, fnd_category_values) directly. The legacy views will be removed once all consumers have migrated.