Skip to main content
Skip table of contents

Entity Domain

Across the system, there are a number of points where there is a loose hierarch or parent-child relationship between entire within the schema. Examples include the fact that a PartnerChannel has a parent Partner or a Product has a parent Supplier.

There are many cases where we require to provide customisation of user interfaces and product functionality or control certain metadata in the scope of these relationships.

The entity tables provide various data points that can be attached by virtue of a foreignId to any level within these loose hierarchies and our systems are structured to compute the disambiguate sum of all such data based on the context of the viewer.

The entity tables can provide data in the context against any of: “COMPANY”, “PARTNER”, “PARTNER_CHANNEL”, “PRODUCT“, “SUPPLIER”, “SOURCE”, “SOURCE_INSTANCE”, “BRAND” and “ORIGIN”.

It is NOT THE CASE that all of the above can be construed in a single hierarchy. However, typically any request to the API may resolve a viewer and request data that is linked to several entities.

COMPANY is a special case within the entity hierarchy. The word “company” represents “us” ie Holibob and as such is the highest level in the hierarchy. We can therefore expect that in the context of a given viewer if there is no most specific value for the same reference then the company values will be returned. Is some ways therefore these records represent default values.

Database Tables

The entity domain is headless: There is no Entity table in the schema. All entity tables include the following columns:

  • entityType - A reference to the table name of the entity that the record pertains to.

  • entityId - a reference to the Id of the record in the referenced table.

The following tables are defined in the entity domain:

Table Name

Purpose

EntityValue

Details of any value that is subject to translation.

The record uses entityKey to determine which value is represents and languageId to determine the language.

The isRootLanguage column will be set for only a single language and is used to determine that this record is the source for any machine translation

The isMachineTranslated indicates that the value resulted from machine translation and that is can be overwritten by the system in the event of the value of the rootLanguage changing. If the value has been reviewed by a linguist or directly entered by an administrator this will be set to false.

EntityConfiguration

Details any number of values for a given entity. The table includes a value column and a translationId column. Where translationId is set the resolved value will be from the Translation table and in the appropriate language. Where this is not set the value will be returned as a string. It is therefore expected that these two fields are mutually exclusive.

  • For Example: If the viewer comes from a given “ORIGIN”, is authenticated as a user of a “PARTNER_CHANNEL” then the system will consider values in the Entity tables for each of these entities including the default “COMPANY” level and then resolve the final set for the lowest level available. Thus if there are values in the EntityConfiguration table for a type of COPYWRITE_MESSAGE that should be displayed in the footer of a website, and records exist for each of "COMPANY", “PARTNER” and “PARTNER_CHANNEL” then the lowest level (ie “PARTNER_CHANNEL”) is the only value that will be returned. If there is no record at the PartnerChannel level then the Partner level record will be returned.

EntityProductPromotionScore

Details for any entity and for a given productId a type and score. This table is considered by the productList query when either of the isPromoted filter is applied or when the sortOrder is set to promotionScore.

EntityQuestion

Details any number of questions or options against an entity. This is used by the availabilityResolver or sourceIntergrationServices to append at runtime a disambiguated list of availabilityOption and bookingQuestion based on the context of the viewer.

EntityCommission

Details a rate of commission that is applied to an entity limited to:

  • Source

  • Supplier

  • Product

Commissions are date bound having a validFrom and validTo

At runtime the effectiveCommissionRate is resolved by considering all records that qualify by virtue of the valid dates and then applying an inheritance model selecting the rate linked directly to the Product is available and then via the Supplier or Source in that order.

EntityComment

Details of any comment that has been recorded against an entity.

EntityAttachment

EntityLink

EntityCancellationPenalty

Association Tables

EntitySystemTagAssociation

EntitySystemConfigurationAssociation

EntityActorAssociation

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.