Jump to: navigation, search

Profiles and Identification

Important
Prerequisites: You need to enable profiles in UCS.

This page gives guidelines for managing Customer Profiles with Context Services. All customer resources and REST requests are redirected to UCS.

Learn about the Customer Profile and Associated Resources

The Customer Profile resource associates a customer ID with:

  • A list of attributes, built on top of the existing UCS Contact model.
  • A list of extensions, defined at runtime through Context Services

The attributes correspond to the core information defined in Universal Contact Server. Their schema are defined through the list of Business Contact Attributes that you can define in the Configuration Manager (see Configuration Options for additional details). The extensions are additional information that your application can create so that you can extend the profile at runtime, as explained in Extending the Customer Profile. Identification Keys define which attributes should be used to identify a customer in the database. For instance, the association of [LastName, Firstname], or the email address.

Attribute Values

Attributes and extension records can be either:

  • "single-valued"(for instance, LastName, FirstName, identifiers, and so on);
  • "multi-valued": values can be multiple (for instance, phone numbers, email addresses, and so on).

The following output presents a sample of Customer profile, where "FirstName", "LastName", and "DOB" (Date Of Birth) are single-valued contact attributes, and the other fields are multi-valued extension records created at runtime.

 
  {
     "FirstName": "Bruce", 
     "LastName": "Banner",
     "DOB": "1962-05-10",
     "EmailAddress": [
         "bruce.banner@marvelous.com",
         "b.banner@hulk.dom"
       ],
     "Phone": [
     {
        "PhoneType":0,
        "prefix":"+33",
        "PhoneNumber":"3145926535",
        "description":"family phone",
        "start_availabilty":"2009-12-18T18:30:00.000Z",
        "end_availabilty":"2009-12-18T21:40:00.000Z"
     },
     {
        "PhoneType":2,
        "prefix":"+33",
        "PhoneNumber":"6543210",
        "description":"business calls only, no sales",
        "start_availabilty":"2009-12-18T09:30:00.000Z",
        "end_availabilty":"2009-12-18T17:45:00.000Z"
     },
     {
        "PhoneType":5,
        "prefix":"+33",
        "PhoneNumber":"951357456",
        "description":""
     }
    ]
  }

Profile Content

The content of the Customer Profile follows a schema (a translation of the Business Contact Attributes), which describes its content with a list of Attribute Schema, apart from extension content, as shown in the following output example:

{"encrypt":false,"name":"PIN","length":256,"type":"string"},
{"encrypt":false,"name":"Title","length":256,"type":"string"},
{"encrypt":false,"name":"CustomerSegment","length":256,"type":"string"},
{"encrypt":false,"name":"LastName","length":256,"type":"string"},
{"encrypt":false,"name":"AccountNumber","length":256,"type":"string"},
{"encrypt":false,"name":"FirstName","length":256,"type":"string"},
{"encrypt":false,"name":"PhoneNumber","length":256,"type":"string"},
{"encrypt":false,"name":"ContactId","length":256,"type":"string"},
{"encrypt":false,"name":"EmailAddress","length":256,"type":"string"},
Important
The profile schema does not contain information related to extensions.

At runtime, your application can retrieve this schema through the Query Profile Schema operation. Your application cannot modify the profile schema through Context Services:

  • If you wish to modify the profile schema, make modifications to in Configuration Manager via the Business Attribute "ContactAttributes".
  • If you wish to add additional information to the profile at runtime, use the profile extensions.

Profile Extensions

Extensions related to customer profiles used to be described as extensions in former versions and they are now detailed on the Profile Extension page of the API reference. They are not flexible JSON data as extensions used in the services handled on the GMS side.

Extensions allow you to extend the content of a profile with additional records. Your application is fully responsible for the creation and management of this optional content. As stated in the Preliminary Steps to Using Profiles section, your application must define the extensions' content by creating a schema for the extension.

Once the schema is defined, your application can use the extensions by specifying extension information to the profile submitted with the operations' body, or by using dedicated operations, as presented below.

Identification Key

The identification key is a combination of attributes used to identify a customer. These attributes (one or more) belong to the customer profile and/or its extensions.

Important
Identification keys cannot be issued from both the profile and its extensions.

Some identification key samples:

  • An identification key consisting of the "name" and "birthdate" attributes from the profile.
  • A key based on the "pin" attribute of a single-valued extension used to hold customer pass codes.
  • A key based on the "number" attribute of a multi-valued extension used to record the phone numbers we have seen a customer call from.

When UCS receives a new customer profile and the associated extension data, it builds the indexing structures according to the specified identification keys, in order to ensure efficient customer identification.

Important
Read Identification Key for a resource example.

Preliminary Steps to Using Profiles

Before your application can start interacting with customers and recording their information by using Customer Profile resources, you must create certain types of information that enable you to manage these profiles. This includes the profile schema, extension schemas, and identification keys.

Creating Extension Schema (Optional)

If your application only needs to use the predefined profile attributes, you can use them as provided. But if you need to work with information that is not contained in the existing attributes -- for instance, for use as identification keys -- you can create extensions that contain this extra information by creating an extension schema for each additional piece of information.

Important
Your application cannot use an extension if the associated schema does not exist.

As for the profile schema, the profile extension schema is composed of Attribute Schema which define the schema content. The following output shows the definition of the single-valued "Address" extension.

"name":"Address",
  "type":"single-valued",    
  "attributes": [
      {"name":"AddressType","type":"integer","default":0},
      {"name":"Address","type":"string","length":256},
      {"name":"City","type":"string","length":32},
      {"name":"County","type":"string","length":32},
      {"name":"PostCode","type":"string", "length":10},
      {"name":"Country","type":"string","length":32}
      ]


The creation of the profile extension is possible through the Create Profile Extension Schema operation. See this example section for detailed information.

Creating Identification Keys (Mandatory)

Operations and resources cited in this section are part of Schema Operations

If your application does not specify identification keys, the only way to access customer information is to retrieve the customer profile with the customer ID. However, you can use the Create Identification Key operation to set up an Identification Key. You create these keys by using profile attributes. For example,you can use a single attribute, or a combination of attributes ("LastName" and "FirstName" for instance), or a combination of extension attributes if you have created a schema for a profile extension.


You can define as many identification keys as you need, but you should consider that creating too many identification keys will slow down creation, update, and removal operations. Once identification keys have been created, your application can continue to work with customer data, accessing it by means of the Get Identification Keys operation.

Important
Your application only needs to register these schemas and identification keys once.

Managing Profiles: Creation, Identification, Extensions

The Customer Profile and its extensions should only be created for the storage of customer-level information. You should use the results of interactions and dialogs with the customer to fill in service, state, and task information.

Managing a Profile

The Create Customer Profile operation creates an entry for the Customer Profile in UCS Database. This step must be completed prior to using the profile data in other operations such as:

Identify a Customer

Operations and resources in this section are part of Schema Operations.


The operation Identify Customer enables your application to retrieve customer profiles based on a few attribute values passed in as parameters, without specifying the customer ID, as shown in this example: GET /profiles/contacts.phone_number=408-888-3214&extensions=contacts,purchases&include_profile=yes &include_extensions=unique If no customer profile is returned, your application can create a new profile based on the current set of information available.

This lets your application to determine the customer's identity without having to gather as much information. For instance, if your application deals with calls by using a customer phone number, the customer is easy to identify if he or she calls back.

Extending the Customer Profile

As stated in the introduction sections, your application can add new types of information to the basic customer profile by using extensions. If your application needs to record a specific set of data (for instance, email addresses), your application can create a schema for this extension. Once an extension schema has been created in UCS, your application can use the new extension and create associated records. Your application can either:

  1. Insert Extension Records for a given customer, or
  2. Create Customer Profile or Update Customer Profile with extension records.

Importing Customer Profiles

The Bulk Profile Import operation enables to import a .csv file which contains a wide set of contacts. The .csv file must be compliant with RFC4180 and already available on the UCS local file system. Profiles must match metadata and can include extensions. An identification key can be set to avoid ambiguities with former profiles when updating the profile database. See Bulk Profile Import for examples and details.

References

<references />

This page was last edited on April 9, 2018, at 12:42.
Comments or questions about this documentation? Contact us for support!