Jump to: navigation, search

Profile Extension Schema

Important
Prerequisites: You need to enable profiles in UCS.
Purpose: Describes the schema for any service, state, or task extension.

Description

Describes one of the ProfileExtension resources.

  • Profile extensions are supported. Before your application can start adding extensions to a given profile, your application must define this extension's schema, which includes its nested attributes.
  • Service extensions are supported and multi-valued extensions are allowed.

Resource

Field Type Mandatory Description
name string yes The unique, case-insensitive name of the extension. 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).

type token
  • "single-valued"
  • "multi-valued"
  • "classifier"
yes Extensions come in the following forms:
  • Single-valued: a single extension record is associated with a given customer.
  • Multi-valued: multiple extension records can be associated with a given customer.
  • Classifier: the single-valued extension has no attribute.
attributes Attribute Schema[] no The array of zero or more attributes. Empty when type="classifier".
unique string[] no Lists attributes which are unique in the scope of a given customer. The customer profile cannot include several extension records with identical values for these attributes.


For example, let's consider a contact extension with the attributes "phone_num", "ext", "time_of_day". To ensure that a given customer does not have two contact extensions with the same phone number, set the following in the extension schema: unique = ["phone_num", "ext"] Each item of this array is either a single attribute, or an array of two or more attributes.

Examples

Schema of a Single-Valued Extension

 {
 "attributes": [
     {"name":"FeedbackType","type":"string","length":"10","mandatory":"true"},
     {"name":"rating","type":"integer","mandatory":"true"},
     {"name":"notes","type":"string","length":256,"mandatory":"false"}
     ],
 "name":"Feedback",
 "type":"single-valued"
 }

Schema of a Multi-valued Extension

   {
     "attributes": [
         {"name":"car type","type":"string","length":"50","mandatory":"true"},
         {"name":"price","type":"integer","mandatory":"true"},
         {"name":"seats","type":"integer"},
         {"name":"comments","type":"string","length":"1024"}
         ],
     "name":"Proposal",
     "type":"multi-valued"
   }
  

Schema of a Profile Extension

The following schema describes the 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}
      ]
This page was last edited on September 7, 2018, at 10:35.
Comments or questions about this documentation? Contact us for support!