Profile History
The history feature is provided to allow a client user to see which changes have been made to a given profile’s data over time, and by whom. History records the difference between the old and new versions of a profile. History is a simple, flat log of changes made to each data of a given profile. It does not inherently provide any means for reverting to previous versions of or previous data in the profile. It is simply a method to record changes made to the profile data.
The profile history feature does not include tracking changes made to the hierarchy, field groups, tags, or templates that could be associated to a profile. Profile history includes only changes made to profile data (e.g., name, status, preferences, contracts, contacts, accounting references, commissions) and field data.
Note: Fixed field data changes are captured for profiles of type agency to agent, plus traveler group and agency group. Custom field data changes are captured for all profile types.
There is no history service. Rather, the triggering and logging of history data is done automatically in the database upon creation and modification of profiles or field data. Profile history (both the old value and new value) is recorded and stored in the database in XML format only. History tables will store the data ID of each history entry when the change is to a fixed or custom field.
Schema
Profile History is within uProfile.xsd. See the following transactions for Profile History:
- ProfileRetrieveHistoryReq
- For ProfileRetrieveHistoryRsp, refer directly to the uProfile schema.
History Information
History is supported for all profiles. History captures the following information:
-
The unique ID of the profile to which the history is related (i.e., the ID of the traveler or account)
-
Event type that triggered the history record (create/modify/delete)
-
Agent ID who made the change
-
Date/Time of the change (in GMT)
-
Old and new values of each field modified, if applicable
-
Data instance ID (Key value)
-
Descriptor of the data (e.g., payment address rather than alternate contact address)
-
If the data that is stored in history was encrypted, the data is stored in history as encrypted.
Note: The API does not store in history any information about the template at the time the history is captured. This means, for example, that the history will not store the masking pattern applied to a custom field at the time the associated profile data was captured in history. The API would therefore use the current masking pattern defined for the field to determine how to return the data in the retrieve response. Similarly, it means the API would not store the label of the template field at the time the associated profile data was captured in history. The client application would therefore use the current label of the template field to display the history data to the user.
Retrieve History
The API will provide a service to allow a client to retrieve all or part of the history of a given profile.
-
The user can retrieve all history of one profile in a single request.
-
The profile ID is always required.
-
The history of a deleted profile cannot be retrieved.
-
The entire history is retrieved. Currently, no filters are available to return a subset of a profile's history.
-
History is returned with the newest modifications listed first.
Optional Retrieve Parameters
The following parameters can be used to narrow the data returned in the history to only data matching the information requested. The history retrieve response always returns the entry for the profile’s creation, whether or not that entry meets the parameters specified in the request.
Note: The Universal API returns history entries that match all parameters specified in the request (i.e., an "AND" search, not an "OR" search). For example, if the agent ID and a date range are specified, then only changes made by the specified agent during the specified date range are returned.
-
Unique agent ID returns all changes made by the user specified.
-
Template field/field group ID of the profile data
-
If a field ID is specified, then only changes made to that specific field are returned.
-
If a field group ID is specified, then changes made to any child field or field group of the specified group will be returned. For example, if the ID for the FOP group is specified, then all changes made to the credit card number or expiration date, the billing address, and the name on the credit card will be specified.
-
The ID(s) of the data value’s parent data field group(s), to the root.
-
Field/field group type, meaning the profile data element (not template field) of the data. Examples: Contract, Contact, Accounting Reference, Profile Info (which typically includes Name, Status, Provisioning Code plus other attributes specific to the type of profile), Commission, Service Fee, Loyalty Program Enrollment, etc.).
-
The date or date range during which the change was captured to history.
Note: Date ranges will be inclusive. That is, if history is requested for 1/1/10-2/1/10, then changes made on 1/1/20 and on 2/1/10 will be returned, as well as changes for any date in between.
-
Field group type. The field group type will typically represent the type of element whose history is to be retrieved (e.g., Address, Phone, ServiceFee, AlternateContact, Alternate Address).
External Identifier:To retrieve ExternalIdentifier information, specify ProfileHistoryRetrieveCriteria @FieldGroupType="ExternalIdentifier".
Note: Data that is masked is retrieved from history as masked, unless the user retrieving the history has permissions to view the masked data (i.e., ShowDataUnmasked=true).
Response
OtherStateProvince may be included in the response in Address, AlternateContactAddress, PaymentAddress, or TravelDocumentAddress. Note the following:
- State and OtherStateProvince are mutually exclusive, and only one can exist in the database.
- When OtherStateProvince is stored using the UProfile v8.0 schema version, OtherStateProvince is not returned in a response that uses an old schema.
- If State data is passed using an older schema version, Universal API overrides OtherStateProvince if it is present.