Jump to: navigation, search

Create Identification Key

POST /metadata/identification-keys

Important
Prerequisites: You need to enable profiles in UCS.

Description

Creates the key used to identify customers. Your application must define the Identification Key prior to any customer identification attempt. You can build identification keys as a combination of attributes:

  • One or more attributes of the customer profile.
  • One or more attributes of an extension.
Important
Your application cannot create Identification keys with a blend of profile attributes and extension attributes.

The following identification key representation identifies customers based on the PhoneNumber attribute.

 { "name": "idPhone",
  "attributes": ["PhoneNumber "]}

Let's imagine that the phone number is part of the contactExt extension; the corresponding object is:

 { "name": "idPhone",
  "source": "contactExt",
  "attributes": ["PhoneNumber "]}

This example assumes that one or more customers can share the same phone number, which could apply to members of a family for instance, and makes the identification key not unique across the calling customers. To make it unique, use the "unique" field of the identification key (see the Identification Key for further details).

Operation

Prerequisites: The server is in Maintenance mode.

Information.png Use the Set Server Mode operation to switch modes.

Create Identification Key
ID CV.WS.PROF.META.7
Method POST
URL /metadata/identification-keys
Parameter   Type   Mandatory Description
Body: Includes the identification key to create. This body contains the Identification Key resource.
name string yes The unique, case-insensitive name of the key. The name must start with a letter, and can be followed with letters, numbers, or underscores. The name is restricted to a maximum of 26 characters. (Maximum RDBMS shared limit on creation of index.)
source string no Can take on one of the following values:
  • "profile" (default value): indicates that the attributes specified in parameter "attribute" belong to the core customer profile.
  • The unique name of the given Profile Extension, used to create the Identification Key.
attributes string[] yes The array names of one or more attributes of the extension or of the profile.
unique bool no
  • "false" by default.
  • "true" to indicate that the given attributes of the profile or extension are unique across all customers.

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 201
HTTP message Created
Header Location: metadata/identification-keys/${key-name}

where:

  • ${key-name} is the name specified in the submitted identification key resource.
Body {"name": "${key-name}"}

where:

  • ${key-name} is the name of the created key.

Example

The following sample creates a key which identifies the customer based on the provided phone ID. After this key is created, the further profile creations are indexed based on the Customer Phone ID.

Operation

POST /metadata/identification-keys
{ 
  "name": "idPhone",
  "extension": "contactExt",
  "attributes": ["PhoneNumber"]
}

Result

 HTTP 201 Created
 {"name": "idPhone"}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 7 September 2018, at 03:34.