Override Templates
Before Release 2.1 Universal API had a single template view, and all traveler profiles had the same structure, regardless of the parent to which they were attached. With Release 2.1, the Override Template services allow attributes and groups to be shown or hidden, made optional or mandatory, or made read-only at the Profile level.
Override templates can be used instead of the default template and can be modified by the agency.
Notes:
- Override templates with custom fields are not supported.
- Override templates are currently only available for Travelers.
- Data override is independent of template override, i.e., the data for applicable fields can be overridden regardless of whether the field itself is overridden in the Traveler template.
How Override Templates work with Default Templates
The implementation of Override Templates means that the Default Template is no longer the CURRENT TEMPLATE for a traveler. Although Universal API does not validate the traveler profile against the template definition, the following applies:
- Profile Creation: When a profile is created, the system checks the profile for an Override Template, based on where the traveler is connected in the hierarchy and applies the appropriate profile template. For example:
- If a traveler is assigned to an Account, the system checks the hierarchy for an Override Template in this order: Traveler Group level, Account level, Branch level, Branch Group level. The first Override Template that is found is applied. If no Override Template is found, the Default Agency Template for Travelers is used.
- If a traveler is not assigned to an Account, the system checks the Agent Context Branch and then the Branch Group for an Override Template. The first override template found is applied. If no override template is found, the system applies the Default Agency Template for Travelers.
- Profile Update/Retrieve: When a profile is modified or retrieved, the system checks the profile for an Override Template based on where the traveler is connected in the hierarchy and applies the appropriate profile template, following the creation logic. Additionally, if a traveler has multiple parent accounts, the system functions as it does currently and prompts the agent to select the parent account. After the parent is chosen, the system follows the same process as it does for the creation process and checks the hierarchy.
- Template Caching: Currently, Universal API caches the ID and version for the Default Template. Now, Universal API also caches the ID and version number for the overridden template.
Create Override Templates
The CreateOverrideTemplate service allows the creation of overridden templates. In addition to the Default Template, Override Templates can be created for Travelers at any of these levels:
- Branch Group
- Branch
- Account
- Traveler Group
Override Templates cannot be created at the Agency level because the Agency-level template isthe Default Template.
Note: The creation of Default Templates (Agency creation) remains unchanged.
The basic structure of an Override Template is same as that of the Default Template, with the following customization available:
- Labels can be changed for field and group.
- Fields and groups can be shown or hidden.
- Fields and groups can be marked as optional or mandatory.
- Fields and groups can be marked as read-only.
Only one overridden template can exist at one time for a corresponding owner profile. For example, if there are two Branch-level profiles, Branch1 and Branch2, an overridden template can be defined for each, but neither Branch1 nor Branch2 can have two overridden templates.
Overridden templates can be turned on and off.
Modify Override Templates
The ModifyOverrideTemplate service allows overridden templates to be modified.
Note: The service to modify Default Templates remains unchanged.
The following can be changed for Fields and Groups in an overridden template:
- The field or group level.
- Whether fields and groups are shown or hidden.
- Whether fields and groups are optional or mandatory.
- Whether fields are read-only.
Additionally, overridden fields and groups can be removed. If the removal is successful, the version of the overridden template is increased by 1.
Note: When a field or group is removed, the data for that field/group is retained in the Universal Profile database.
Retrieve Override Templates
The ProfileRetrieveTemplate service can be used to retrieve both Default and Override Templates. It includes the option to retrieve only the overridden fields in an Overridden Template. See Retrieve Templates for details.
Delete Override Templates
Overridden templates can be deleted using the ProfileDeleteOverrideTemplate service. The deletion of an overridden template has no effect on the profile data. I.e., the profile data is retained even if the overridden template used to create the profile is deleted.
Important! Default template cannot be deleted and that feature remains unchanged.