Jump to: navigation, search

createIdentificationKeysSchema

Purpose

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 phone_number attribute:

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

Imagine that the phone number is part of the "contacts" extension: the corresponding object is:

{ "name": "idPhone", "source": "contacts", "attributes": ["phone_number"]} 

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 non-unique across the calling customers. To make it unique, use the "unique" field of the identification key (see the Identification Key for further details).

URL

  • POST /metadata/identification-keys/

Request

HTTP Headers

Key ValueType Value Description Mandatory Unique Default
X-Genesys-TenantId Integer Integer value of tenant id false true
X-Genesys-Segment String Segment value (not to be provided by customer) false true

Body

Key ValueType Value Description Mandatory Unique Default
name String 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.) true true
source String 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.
false true profile
unique String false by default. Value true indicates that the given attributes of the profile or extension are unique across all customers. false true
attributes JsonArray The array names of one or more attributes of the extension or of the profile. true false

Sample

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

Responses

Success

ReturnCode ReturnString Description
201 Created The request has been fulfilled and resulted in a new resource being created

Error

FaultCode FaultString Description
400 Bad Request General error which can be one of the following reasons:
  • Missing required parameter.
  • Parameter value of unexpected type.
  • Invalid object syntax.
  • Missing required attribute
401 Not Authorized Credentials are missing or incorrect, or the given user is not allowed to execute a given service (such as an administrative service method that changes the profile schema).
403 Forbidden The operation is forbidden and the reason is specified in the error message. This error is returned in the following cases:
  • Attempt to alter the schema while the server is in Production Mode.
  • Attempt to add customer profiles prior to the definition of a profile schema.
404 Not Found The specified URI is invalid, or the requested resource (such as a customer, service, state, task, extension, or identification key) does not exist.
405 Method Not Allowed Returned when an unsupported operation is requested. For instance, if a resource supports only PUT and GET operations, a POST request on this resource returns this error.
415 Unsupported Media Type In the header of your request, Content-Type is not set to a valid value. Most operations of Context Services support only "application/json".

Sample

201 Created
 Content-Location	http://ucsserver.mycompany.com:8080/cms/profiles/extensions/Address
 {"name":"Address"}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 18, 2018, at 07:05.