Extension Schema
Purpose: Describes the schema for any service, state, or task extension.
|
Description
Describes one of the Extension 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
Profile Extension Schema
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
|
yes | Extensions come in the following forms:
|
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.
|
Service/State/Task Extension Schema
Name | 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. |
type | token
|
yes | Extensions come in the following forms:
|
attributes | Attribute Schema[] | yes | The attributes that define the extension. |
unique | string[] | no | Lists attributes (separated with commas) which are unique in the scope of a given service, state, or task. The resource cannot include several extension records with identical values for these 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" }
See Query State Extension Schema for further examples.
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} ]