En UCS 9.1.x RESTAPI Book
En UCS 9.1.x RESTAPI Book
Guide
Universal Contact Server 9.1.x
3/17/2020
Table of Contents
Universal Contact Server API Reference Guide 6
New/Changed Behaviors in UCS 9.1 9
Deprecated Methods 16
Callback 19
Close 20
Create 21
Update 23
Chat 24
Close 25
Create 26
Update 28
Contact 29
findOrCreate 30
Identify 32
Update 35
Index 37
GetIndexProperties 38
Search 40
Ixn 45
AssignToContact 46
StopProcessing 47
Metadata Web Service Methods 48
ProfileSchemaResource 49
queryProfileSchema 50
ProfileExtensionSchemaResource 54
deleteProfileExtensionSchema 55
queryProfileExtensionSchema 58
IdentificationKeysResource 61
deleteIdKeySchema 62
queryIdKeySchema 64
ProfileExtensionSchemasResource 67
createProfileExtensionsSchema 68
queryProfileExtensionsSchema 72
IdentificationKeysSchemasResource 75
queryIdentificationKeysSchema 76
createIdentificationKeysSchema 78
Metrics 82
GetAll 83
GetCore 85
GetTopTimers 87
OMContacts 89
ContactListGet 90
ContactListGetNextPage 101
ContactListRelease 103
Delete 104
GetAttributes 105
GetContacts 110
GetMergeDetail 113
IdentifyContact 117
Insert 120
MergeContacts 123
MergeListGet 126
MergeListGetNextPage 128
MergeListRelease 130
RemoveAllAttributes 131
UnMergeContacts 133
UpdateAttributes 135
OMFieldCodes 142
RenderFieldCodes 143
RenderMessageContent 147
ValidateFieldCodes 149
OMInteraction 151
Create 152
Update 154
OMInteractions 156
AddDocument 157
AssignInteractionToContact 159
CountInteractions 161
DeleteInteraction 163
FindOrCreatePhoneCall 164
GetAttachment 168
GetCategorizedInteractions 170
GetDocument 173
GetInteractionContent 175
GetInteractionsForContact 178
GetInteractionsWithStatus 184
GetUnCategorizedInteractions 186
InsertInteraction 189
InteractionListGet 200
InteractionListGetNextPage 207
InteractionListRelease 209
RemoveDocument 210
SetInteractionStatus 211
StopInteraction 213
UpdateDocument 215
UpdateInteraction 216
OMResponse 221
CheckForUpdates 223
GetAgentStdRespFavorites 225
GetAllGroups 227
GetAllRegEx 229
GetAllRules 231
GetAllTestMessage 234
GetCategory 236
GetCategoryAttribute 239
GetCategoryAttributes 241
GetDocument 243
GetFieldCode 245
GetFieldCodes 247
GetFieldValue 248
GetFieldValues 250
GetGroup 251
GetGroupContent 254
GetRegEx 256
GetRootCategories 258
GetRule 260
GetScreeningRule 263
GetScreeningRules 265
GetStandardResponse 267
GetStandardResponses 271
GetTestMessage 275
GetUpdates 277
ProfileService Methods 281
CustomerProfileResource 282
deleteCustomerProfile 283
queryCustomerProfile 285
updateCustomerProfile 288
ProfilesResource 292
createProfile 293
identifyProfiles 297
Profile ExtensionsResource 301
insertExtensionRecord 302
UpdateRecordInProfileExtension 305
updateRecordInProfileExtension 306
DeleteRecordInProfileExtension 309
deleteRecordInProfileExtension 310
ProfileService importProfileRecords 313
importProfileRecords 314
ProfileServiceMergeUnmerge 319
mergeProfiles 320
unmergeProfiles 323
unmergeProfilesAsSource 325
System Information 327
GetIdentifier 328
GetServerTime 329
GetSystemSettings 330
GetVersion 334
URS Service 335
UpdateInteraction 336
GetFAQObject 337
Data Segmentation 339
Universal Contact Server API Reference Guide
• ESP services and methods, which are accessed via Genesys PSDK.
Overview
HTTP Requests
An HTTP request needs the following elements:
• A header
• A URI (Uniform Resource Identifier) which identifies the resource upon which to apply the request
HTTP Responses
• Responses contain a list of '<key>:<value>' entries in JSON format.
• In the ESP protocol some UCS functions return some <key>:<value> entries in parameters and some others in user
data. When used through HTTP those functions return all <key>:<value> entries in a unique JSON document.
• Callback.Create
• Chat.Create
• Contact.findOrCreate
• Contact.Identify
• OMFieldCodes.RenderMessageContent
Methods
In UCS the following methods are used: POST, PUT, GET and DELETE.
URI Form
The URI is built as follows:
The optional base URL corresponds to the value of the option base-url in the http section.
{
"Parameters": {
"key1": value1,
"key2": value2
...
},
"UserData": {
"key3": value3,
"key4": value4,
...
}
}
where:
• "UserData" contains a JSON document with user data (not used by PSDK but used by ChatServer, URS and
IXNServer.)
And:
A value of type binary must be base64 encoded and provided with a key named ‘binary’. Here is an example
using InsertInteraction with a binary content:
{code}
{
"InteractionContent":{
"MimeType":"Base64",
"Content":{
"binary":"SGVsbG8gVW5pdmVyc2UgIQ=="
}
},
"InteractionAttributes":{
"Status":1,
"TenantId":101,
"TypeId":"Internal",
"EntityTypeId":7,
"MediaTypeId":"email"
}
}
{code}
In this case the request does not have a body, all parameters are provided in the URL. The parameters come after
the character '?'. They are key-value pairs separated with character '&'. The syntax for each parameter is
<key>=<value> except for the following:
In UCS 8.5 there was no minimum attribute set for those media.
To configure the same behavior in UCS 9.1.x as UCS 8.5, add the following option in the Annex tab of the media:
• OMInteractions.InsertInteraction
• OMInteractions.FindOrCreatePhoneCall
• Chat.Create
if (providedParentId.exists()){
if (providedParentId.CanBeParent==true)
{
new_ixn.ThreadId = providedParent.ThreadId
new_ixn.ParentId = providedParent.Id
}
else{
Return error:
FaultCode=204
FaultString=Incorrect value for parameter 'ParentId', expected 'Parent Interaction with CanBeParent=true' but was 'Interaction '" + pr
}
}else{
Return error:
FaultCode=510
FaultString=Msg: Interaction 'providedParent.Id' not found in database
}
}
OMContacts/UpdateAttributes
OMContacts/UpdateAttributes inserting an attribute specified as primary (index 0 in the request) is now successful even if there is already a primary attribute. The new
attribute is set as primary and the previously primary attribute is kept as secondary. Previously (in 8.5), the request would fail.
OMContactsdon't allow binary attribute (attribute having a binary value) though it was possible with UCS 8.
OMContact.UpdateInteraction
Where a contact has already an email address, if you use OMContacts.UpdateInteraction to insert an address specified as primary (index 0 in the request) the
request is successful. The former primary adress has IsPrimary set to false and the new email address is the primary one.
UCS 9.1 supports such a request, which in UCS 8.x was rejected.
OMInteractions.InteractionListGet
In UCS 8.5 OMInteractions.InteractionListGet and OMInteractions.GetInteractionsForContact needed the parameters EntityTypeId to search
the tables EmailIn, EmailOut, Callback, Chat, PhoneCall. With no EntityTypeId only the Interaction table could be searched.
In UCS 9.1 the EntityTypeId is no longer needed. This allows queries across several media. For example a query with criteria like StartDate <=
2015-10-21T16:30:00.000Z will search matching interactions in EmailIn and EmailOut. In UCS 8.5, two requests were needed to do this.
Important
Note that it is still possible to filter data by EntityTypeId, thus keeping backward compatibility.
AddDocument method
Previously in UCS 8 there were two modes for the AddDocument method:
• Link creation mode—The required parameters were InteractionId and DocumentId (to link an interaction to an existing document).
Chat.Update/Close
Important
This behavior has not changed in UCS 9.1 but was previously undocumented in UCS 8.
The following mechanism in Chat.Update and Chat.Close prevents two (or more) instances of ChatServer from updating the transcript of the same chat record
simultaneously:
• If VerifyCreatorId = true, UCS includes CreatorId in the condition to update the record.
• If VerifyCreatorId = false UCS uses the condition without CreatorId to update the record.
Example
1. Consider the following extension schema:
{
"name": "Subscription",
"type": "multi-valued",
"attributes": [
{
"name": "title",
"type": "string"
},
{
"name": "duration",
"type": "integer"
},
{
"name": "price",
"type": "double"
},
{
"name": "is_payed",
"type": "boolean"
},
{
"name": "new_offers",
"type": "boolean"
},
{
"name": "category",
"type": "integer"
}
]
}
2. .....and the identification key built on the attributes 'category' and 'new_offers':
{
"source": "Subscription",
"name": "IdSubscription",
"attributes": [
"category",
"new_offers"
]
}
GET /profiles?Subscription.category=5?scription.new_offers=true&id_key=IdSubscription∈clude_profile=yes&extensions=Subscription
4. ...but the following request should fail in UCS 9.1 whereas it works in UCS 8 (this is due to a Cassandra limitation):
GET /profiles?Subscription.category=5&id_key=IdSubscription∈clude_profile=yes&extensions=Subscription
Note that the following request fails in both UCS 8 and UCS 9.1:
GET /profiles?Subscription.new_offers=true&id_key=IdSubscription∈clude_profile=yes&extensions=Subscription
Service=Index
Method=Search
Parameters={
IndexName="contact"
Query="CreatedDate:2015*"
}
This syntax is no longer possible with UCS 9.1. The following should be used:
Service=Index
Method=Search
Parameters={
IndexName="contact"
Query="CreatedDate:[2015-01-01T00:00:00.000Z TO 2015-12-31T23:59:59.000Z]"
TenantId=101
}
Searching for contact attributes of type date without the TenantId parameter will not find any result. Note that if TenantId is provided as part of the Lucene query, UCS will
use it, for example:
Service=Index
Method=Search
Parameters={
IndexName="contact"
Query="TenantId:101 AND LCA_TimeStamp_voice:[2015-01-01T00:00:00.000Z TO 2015-12-31T23:59:59.000Z]"
}
Also, if UCS has only one tenant, this tenant will be used by default.
Deprecated Methods
The following methods that were available in previous releases of UCS are deprecated in release 9.1:
• AddAgentStdResponseFavorite
• AddCategory
• AddCategoryAttribute
• AddCategoryRoot
• AddCategoryStatistics
• AddConfusionMatrix
• AddDocument
• AddEmailClassificationResult
• AddFAQObject
• AddFAQObjectCategories
• AddFieldCode
• AddFieldValue
• AddGlobalStatistics
• AddGroup
• AddModel
• AddRegex
• AddModel
• AddRule
• AddRuleToGroup
• AddScreeningRule
• AddStandardResponse
• AddStdReponseUsage
• AddTestMessage
• AddTestingResult
• AddTrainingDataObject
• AddTrainingEmail
• AddTrainingJob
• CompareAndSwapStatusOfTrainingJob
• CreateStandardResponseRevision
• DeleteAgtStdResponseFavorite
• DeleteCategory
• DeleteCategoryAttribute
• DeleteCategoryRoot
• DeleteCategoryStatistics
• DeleteConfusionMatrix
• DeleteEmailClassificationResult
• DeleteFAQObject
• DeleteFAQObjectCategories
• DeleteFieldCode
• DeleteFieldValue
• DeleteGlobalStatistics
• DeleteGroup
• DeleteModel
• DeleteRegex
• DeleteRule
• DeleteRuleFromGroup
• DeleteScreeningRule
• DeleteStandardResponse
• DeleteTestMessage
• DeleteTestingResult
• DeleteTrainingDataObject
• DeleteTrainingEmail
• DeleteTrainingJob
• MoveCategory
• MoveStandardResponse
• RemoveDocument
• RestoreStandardResponseRevision
• TrainingEmailListRelease
• UpdateCategory
• UpdateCategoryAttribute
• UpdateCategoryStatistics
• UpdateConfusionMatrix
• UpdateEmailClassificationResult
• UpdateFAQObject
• UpdateFAQObjectCategories
• UpdateFieldCode
• UpdateFieldValue
• UpdateGlobalStatistics
• UpdateGroup
• UpdateModel
• UpdateRegex
• UpdateRule
• UpdateRuleFromGroup
• UpdateScreeningRule
• UpdateStandardResponse
• UpdateTestMessage
• UpdateTestingResult
• UpdateTrainingDataObject
• UpdateTrainingEmail
• UpdateTrainingJob
Callback
• Close
• Create
• Update
Close
Purpose
For Callback
URL
• PUT /Callback/Close/
Request
Parameters
Success
Parameters
Create
Purpose
Creates a Callback.
URL
• POST /Callback/Create/
Request
Parameters
Success
Parameters
Update
Purpose
For Callback
URL
• PUT /Callback/Update/
Request
Parameters
Success
Parameters
Chat
• Close
• Create
• Update
Close
Purpose
Closes a Chat record.
URL
• PUT /Chat/Close/
Request
Parameters
Success
Parameters
Create
Purpose
Creates a Chat record.
URL
• POST /Chat/Create/
Request
Parameters
UserData
Success
Parameters
Update
Purpose
Updates a Chat record.
URL
• PUT /Chat/Update/
Request
Parameters
Success
Parameters
Contact
• findOrCreate
• Identify
• Update
findOrCreate
Purpose
Find or create a Contact record.
URL
• POST /Contact/findOrCreate/
Request
Parameters
UserData
Success
Parameters
Error
Error
Identify
Purpose
This method is intended for identifying a Contact based on user data values. If one or more Contact is found, the
Contact identifiers are returned. If no matching Contact is found, a new Contact may be created.
URL
• POST /Contact/Identify/
Request
Parameters
UserData
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
Update
Purpose
Update (and insert) primary attributes of a Contact.
URL
• PUT /Contact/Update/
Request
Parameters
UserData
Error
FaultCode FaultString Description
TenantId was not provided but is a
201 Missing parameter 'TenantId'
required parameter.
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
ContactId was not provided but is a
201 Missing parameter 'ContactId'
required parameter.
Missing parameter UseDataFromParameters was not
201
'UseDataFromParameters' provided but is a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
Index
• GetIndexProperties
• Search
GetIndexProperties
Purpose
This service aims to return the configured indexes' searchable fields.
URL
• GET /Index/GetIndexProperties/
Success
Parameters
Fields KVList
Fields KVList
Search
Purpose
A generic interface used for searching UCS indexing service. The Indexing service is configurable to parse and
index content of SRLs, Contacts or Interactions. In this document, those three different types of UCS objects will be
called 'Documents'.
UCS should use event-based indexing (modified properties in documents will be re-indexed). This interface only
reflects the interface used for querying UCS Documents: it does not describe configuration of the indexing service.
URL
• GET /Index/Search/
Request
Parameters
• srl
• contact
• interaction
Max number
MaxResults Integer of returned false true UCS default
Documents.
Default fields
to be
searched for.
This is an
optional
parameter. It
enables
default
querying.These
queries are
identical:
String such as
• Query =
DefaultFields String "FirstName, false true None
"john",
LastName"
DefaultFields
=
"EmailAddress,
FirstName"
• Query =
"EmailAddress:john
OR
FirstName:john",
no
DefaultFields.
**Important**:
Added in 8.5.0
The
subscriber
(i.e. line of
SubscriberId String business) false true
within the
tenant to
which the
contact
belongs
• Query parameter: the way of indexing can change what data is indexed and whether it is indexed, thus changing the
potential results. Refer to UCS indexing configuration for options to be set during indexing process.
Sample
IndexName contact
MaxResults 2
Query EmailAddress:hotmail
Success
Other types of Query parameter to set in Search request: ? Contact:
? "kristina" (DefaultFields="FirstName, LastName" optional parameter needs to be set), this is the same query as
"FirstName: kristina+LastName:kristina"
? "FirstName: john AND LastName: castro
? SRL:
? "Body: madam
? "MyCustomAttribute: reference" (some config need to be done to configure analyzer for this field)
? Interaction:
? "StructuredText: contract"
Note: GetIndexProperties provides the key field names that are searchable.
Parameters
DocumentData KVList
KVList
Sample
FoundDocuments 10
ReturnedDocuments 2
Documents 0 DocumentType Contact
BoostFactor 1.0
Id UCSIDXXXXXXXXXXX
EmailAddress mrs.brown@hotmail.com
...
1 DocumentType Contact
BoostFactor 1.0
Id UCSIDXXXXXXXXXXX
EmailAddress mr.brown@hotmail.com
...
...
Error/Event3rdSeverFault
FaultCode FaultString Description
Indexing is disabled (change
950 Applies only for a given index.
configuration options).
Index searching is disabled (change
951 Applies only for a given index.
configuration options).
Index is not available or not
952 Incorrect IndexName specified: '{0}'.
configured.
953 Unable to parse query: '{0}'.
Ixn
• AssignToContact
• StopProcessing
AssignToContact
Purpose
For ESJ.
URL
• PUT /Ixn/AssignToContact/
Request
Parameters
StopProcessing
Purpose
For ESJ.
URL
• PUT /Ixn/StopProcessing/
Request
Parameters
UserData
• queryProfileSchema
• ProfileExtensionSchemaResource
• deleteProfileExtensionSchema
• queryProfileExtensionSchema
• IdentificationKeysResource
• deleteIdKeySchema
• queryIdKeySchema
• ProfileExtensionSchemasResource
• createProfileExtensionSchema
• queryProfileExtensionsSchema
• IdentificationKeysSchemasResource
• queryIdentificationKeysSchema
• createIdentificationKeysSchema
ProfileSchemaResource
• queryProfileSchema
queryProfileSchema
URL
• GET /metadata/profiles/
Request
HTTP Headers
Responses
Body
Success
Error
Sample
200 OK
[{"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"},
{"encrypt":false,"name":"Title","length":256,"type":"string"},
{"encrypt":false,"name":"PIN","length":256,"type":"string"},
{"encrypt":false,"name":"ContactId","length":256,"type":"string"},
{"encrypt":false,"name":"homeaddress","length":256,"type":"string"},
{"encrypt":false,"name":"EmailAddress","length":256,"type":"string"},
{"encrypt":false,"name":"PhoneNumber","length":256,"type":"string"},
{"encrypt":false,"name":"AccountNumber","length":256,"type":"string"},
{"encrypt":false,"name":"LastName","length":256,"type":"string"},
{"encrypt":false,"name":"FirstName","length":256,"type":"string"},
{"encrypt":false,"name":"CustomerSegment","length":256,"type":"string"},
{"encrypt":false,"name":"LastCalledAgent_EmployeeID","length":256,"type":"string"},
{"encrypt":false,"name":"LastCalledAgent_TimeStamp","length":0,"type":"datetime"},
{"encrypt":false,"name":"PreferredAgent_EmployeeID","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_workitem","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_workitem","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_workitem","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_auxwork","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_auxwork","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_auxwork","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_imchat","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_imchat","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_imchat","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_outboundpreview","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_outboundpreview","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_outboundpreview","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_vmail","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_vmail","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_vmail","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_smail","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_smail","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_smail","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_cobrowsing","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_cobrowsing","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_cobrowsing","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_webform","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_webform","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_webform","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_busevent","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_busevent","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_busevent","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_voice","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_voice","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_voice","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_appsharing","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_appsharing","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_appsharing","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_email","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_email","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_email","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_chat","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_chat","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_chat","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_any","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_any","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_any","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_fax","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_fax","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_fax","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_video","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_video","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_video","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_whiteboard","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_whiteboard","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_whiteboard","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_alert","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_alert","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_alert","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_voip","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_voip","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_voip","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_sms","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_sms","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_sms","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_EmplID_callback","length":256,"type":"string"},
{"encrypt":false,"name":"LCA_TimeStamp_callback","length":0,"type":"datetime"},
{"encrypt":false,"name":"Pref_EmplID_callback","length":256,"type":"string"}]
ProfileExtensionSchemaResource
•
•
deleteProfileExtensionSchema
URL
• DELETE /metadata/profiles/extensions/{extension_name}
Request
URL Parameters
HTTP Headers
Sample
DELETE /metadata/profiles/extensions/Address
Responses
Success
Error
queryProfileExtensionSchema
URL
• GET /metadata/profiles/extensions/{extension_name}
Request
URL Parameters
HTTP Headers
Sample
• GET /metadata/profiles/extensions/Phone
Responses
Body
Success
Error
Sample
200 OK
{
"name":"Phone",
"type":"multi-valued",
"attributes": [
{"name":"PhoneType","type":"integer","default":0,"mandatory":"true"},
{"name":"prefix","type":"string","length":"3","default":"555",},
{"name":"PhoneNumber","type":"integer","length":15,"mandatory":"true"},
{"name":"description","type":"string","length":32,"mandatory":"true"},
{"name":"start_availability","type":"datetime"},
{"name":"end_availability","type":"datetime", "mandatory":"false"}
]
}
IdentificationKeysResource
Handle methods for Identification-Key schema manipulation : Reading ID Key schema, Deleting existing schema
•
•
deleteIdKeySchema
URL
• DELETE /metadata/identification-keys/{key_name}
Request
URL Parameters
HTTP Headers
Sample
DELETE /metadata/identification-keys/idExtension
Responses
Success
Error
queryIdKeySchema
URL
• GET /metadata/identification-keys/{key_name}
Request
URL Parameters
HTTP Headers
Sample
GET /metadata/identification-keys/idExtension
Responses
Body
Success
Error
Sample
200 OK
{"name": "idExtension", "attributes": ["ext.code","ext.date"], "unique": true}}
ProfileExtensionSchemasResource
Handle methods for profile extensions schema manipulation : Reading all schema, creating extension schema.
•
•
createProfileExtensionsSchema
URL
• POST /metadata/profiles/extensions/
Request
HTTP Headers
Body
• Single-
valued: a
single
extension
record is
associated
with a
"single-
given
type Token valued" or true true
customer.
"multi-valued"
• Multi-
valued:
multiple
extension
records
can be
associated
with a
given
customer.
Lists attributes
which are
unique in the
scope of a
given
customer. The
customer
profile cannot
include
several
extension
records with
identical
values for
unique StringList false true
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
The array of
attributes JsonArray zero or more false false
attributes.
Sample
POST http://ucsserver.mycompany.com:8080/cms/metadata/profiles/extensions
{
"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}
]
}
Responses
Success
Error
Sample
201 Created
Content-Location http://ucsserver.mycompany.com:8080/cms/profiles/extensions/Address
{"name":"Address"}
queryProfileExtensionsSchema
URL
• GET /metadata/profiles/extensions/
Request
HTTP Headers
Sample
GET /metadata/profiles/extensions/Phone
Responses
Success
Error
Sample
200 OK
[
{
"name":"Phone",
"type":"multi-valued",
"attributes": [
{"name":"PhoneType","type":"integer","default":0,"mandatory":"true"},
{"name":"prefix","type":"string","length":"3","default":"555",},
{"name":"PhoneNumber","type":"integer","length":15,"mandatory":"true"},
{"name":"description","type":"string","length":32,"mandatory":"true"},
{"name":"start_availabilty","type":"datetime"},
{"name":"end_availabilty","type":"datetime", "mandatory":"false"}
]
},
{
"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}
]
} ]
IdentificationKeysSchemasResource
Handle methods for ID Keys schema manipulation : Reading all schema, creating ID Keys schema.
•
•
queryIdentificationKeysSchema
URL
• GET /metadata/identification-keys/
Request
HTTP Headers
Sample
GET /metadata/identification-keys
Responses
Success
Error
Sample
[{"name": "idNameBD", "attributes": ["name", " birthdate"]},
{"name": "idExt", "attributes": ["external_id"], "unique": true},
{"name": "idPhone", "attributes": ["phone_number"]}
{"name": "idExtension", "attributes": ["ext.code","ext.date"]}]
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:
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:
Imagine that the phone number is part of the "contacts" extension: the corresponding object is:
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
Body
• "profile"
(default
value):
indicates
that the
attributes
specified
source String false true profile
in
parameter
"attribute"
belong to
the core
customer
profile.
• The
unique
name of
the given
Profile
Extension,
used to
create the
Identification
Key.
false by
default. Value
true indicates
that the given
unique String attributes of false true
the profile or
extension are
unique across
all customers.
The array
names of one
or more
attributes JsonArray attributes of true false
the extension
or of the
profile.
Sample
POST /metadata/identification-keys
{
"name": "idPhone",
"extension": "contacts",
"attributes": ["phone_number"]
}
Responses
Success
Error
Sample
201 Created
Content-Location http://ucsserver.mycompany.com:8080/cms/profiles/extensions/Address
{"name":"Address"}
Metrics
• GetAll
• GetCore
• GetTopTimers
GetAll
Purpose
This method retrieve a list of Key Performance Indicators (KPI) to monitor UCS performance and health.
URL
• GET /Metrics/GetAll/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
GetCore
Purpose
Core metrics is a reduced list of KPIs that represent a summary of UCS performance.
• sys.mem.heap.usage.gge—Memory usage in %: constant increase to values close to 1 can show a memory leak.
• sys.mem.heap.committed.gge—Current size of the memory heap in bytes. Will only grow up to XMX (512MB by
default).
• esp.pending.gge—Number of pending ESP request: increasing value can mean server is not able to cope with
client request.
• TopTimers—The list (2 by default) of longest executing timers. High values can show a bottleneck.
URL
• GET /Metrics/GetCore/
Request
Sample
TenantId 102
Attributes EmailAddress 0 AttrValue john.doe@genesys.com
1 AttrValue alice.doe@genesys.com
LastName 0 AttrValue Doe
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
GetTopTimers
Purpose
A list (default 2) of the longest-executing timers.
URL
• GET /Metrics/GetTopTimers/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
OMContacts
• ContactListGet
• ContactListGetNextPage
• ContactListRelease
• Delete
• GetAttributes
• GetContacts
• GetMergeDetail
• IdentifyContact
• Insert
• MergeContacts
• MergeListGet
• MergeListGetNextPage
• MergeListRelease
• RemoveAllAttributes
• UnMergeContacts
• UpdateAttributes
ContactListGet
Purpose
This method is intended for building a ScrollableList object based on provided constraints. There is no general rule.
Results depend on the filter used, and on the database used. Note also that the data returned by the lookup request
comes from the Contact table only. In the same way, the ordering of the Contacts returned is done using Contact
table data only.
URL
• GET /OMContacts/ContactListGet/
Request
Parameters
The value
type of this
parameter
depends on
the Contact
Attribute type
declared in
Configuration
Server
(settings/
type). If type
is set to:
AttrValue String String (default):
false true
value must be a
String Max.
length: 256
characters date:
value must be a
String formatted
with the pattern:
"yyyy-MM-
ddTHH:mm:ss.SSSZ"
binary: This is an
error! Binary
values cannot be
used in search
constraints
(Operator) = NOT || AND || OR KVList value detail conforms to SimpleConstraint or ComplexConstraint KVList
definition
KVList value
• A Contact
object
attribute
name: 'Id',
'TenantId',
'IsExternalResource',
'CreatedDate',
'ModifiedDate',
'MergeId';
or;
• A sortable
Contact
Attribute
system
AttrName String name. true true
Configuration
note—to make a
Contact Attribute
sortable, it is
necessary to
configure this
Contact Attribute
as sortable
(settings/is-
sortable) in
ConfigServer
(EmailAddress,
PhoneNumber,
FirstName &
LastName are
sortable by
default). (Notice
the number of
sortable Contact
Attributes is
limited !) Max.
length: 256
characters
AttributeList KVList
• A Contact
object
attribute
name: 'Id',
'TenantId',
'IsExternalResource',
'CreatedDate',
'ModifiedDate',
'MergeId';
or;
• A sortable
Contact
Attribute
system
name.
AttrName String Configuration false false
note—to make a
Contact Attribute
sortable, it is
necessary to
configure this
Contact Attribute
as sortable
(settings/is-
sortable) in
Configuration
Server
(EmailAddress,
PhoneNumber,
FirstName &
LastName are
sortable by
default) (Note that
the number of
sortable Contact
Attributes is
limited.) If
AttributeList
KVList is empty,
all attributes are
returned. Max.
length: 256
characters
Sample
TenantId 102
SearchCriteria AND EQUAL AttrName FirstName
AttrValue John
AND NOT_EQUAL AttrName LastName
AttrValue Doe
SortCriteria 0 Operator ASC AttrName LastName
1 Operator DSC AttrName FirstName
AttributeList AttrName EmailAddress
AttrName PhoneNumber
Sample
TenantId 101
SearchCriteria EQUAL ESQuery FirstName:C*
AttributeList AttrName FirstName
AttrName LastName
Sample
TenantId 101
ESQuery LastName:C*
AttributeList AttrName FirstName
AttrName LastName
Sample
TenantId 101
{"from":0,"size":5,"query":{"query_string":{"query":"+LastName:Cassandra
ESQuery
+FirstName:C*"}},"sort":[{"FirstName":{"order":"asc"}}]}
AttributeList AttrName FirstName
AttrName LastName
Sample
TenantId 101
{"from":0,"size":5,
ESQuery
"query":{"fuzzy":{"LastName":{"value":"Cassandra","fuzziness":2}}},"sort":[{"FirstName":{"order":"desc"}}]}
Success
Parameters
ContactData KVList
(Contact Index) is a string representation of an integer index used to maintain Contacts ordering
KVList value
KVList value
• TenantId(Integer),
IsExternalResource(String
true/
false),
CreatedDate(formatted
String with
(AttributeName) String Date true true
pattern),
ModifiedDate(formatted
String with
Date
pattern),
MergeId(String)
• SortableContactAttributes(String,
or
formatted
StringDate
with Date
pattern).
When all
attributes
have been
requested
from the
Contact
table
(input
parameter
AttributeList
was null
or empty),
the
(AttributeName)
key is
equal to
StrAttributeXX
or
DateAttributeXX
if the
column is
not
currently
associated
to a
sortable
ContactAttribute
as
declared
in
ConfigServer.
• Date
values are
returned
as String
with the
pattern"yyyy-
MM-
ddTHH:mm:ss.SSSZ")
The type
depends on
the Attribute:
CreatedDate(formatted
String with
Date
pattern),
ModifiedDate(formatted
String with
Date
pattern),
MergeId(String)
• SortableContactAttributes(String,
or
formatted
StringDate
with Date
pattern).
When all
attributes
have been
requested
from the
Contact
table
(input
parameter
AttributeList
was null
or empty),
the
(AttributeName)
key is
equal to
StrAttributeXX
or
DateAttributeXX
if the
column is
not
currently
associated
to a
sortable
ContactAttribute
as
declared
in
ConfigServer.
• Date
values are
returned
as String
with the
pattern
"yyyy-
MM-
ddTHH:mm:ss.SSSZ")
(AttributeName) is the system name of the Attribute (as defined in Configuration Server.)
Sample
ScrollId 1234567890123456
PageSize 2
HasNext false
ContactData 0 Id 1234567890123456
Attributes EmailAddress john@rivers.com
PhoneNumber 1257566
1 Id ABCDEFJIOQJDLHDEC
Attributes EmailAddress john@cole.com
PhoneNumber 354535432
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
533 Invalid ES Query Provided ESQuery is malformed
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
ContactListGetNextPage
Purpose
This method is intended for delivering the next portion of the contact objects, previously found by some constraints.
The method provides unidirectional scrolling of selected contacts—there is no backward scrolling or jumping to the
record with arbitrary number.
URL
• GET /OMContacts/ContactListGetNextPage/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database ScrollableList does not exist
ContactListRelease
Purpose
This method is intended for releasing of a previously created ScrollableList.
URL
• PUT /OMContacts/ContactListRelease/
Request
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database ScrollableList does not exist
Delete
Purpose
This method is intended for deletion of the contact by its Id.
URL
• DELETE /OMContacts/Delete/
Request
Parameters
Error
FaultCode FaultString Description
Contact with Id=(ContactId) is not
510 {0} not found in database
found in database
GetAttributes
Purpose
This method is intended for obtaining the complete list of contact attributes. This method is used to return all
Contact Attribute objects associated to this Contact. Contact Attribute objects must be declared in Configuration
Server in the Contact Attribute enumerator. This configuration is Tenant specific. By default, existing Contact
Attributes are:
• AccountNumber
• ContactId
• CustomerSegment
• EmailAddress
• FirstName
• LastName
• PhoneNumber
• PIN
• Title.
Contact Attribute objects are stored in the dedicated MCR DB column ContactAttribute.
URL
• GET /OMContacts/GetAttributes/
Request
Parameters
AttributeList KVList
Success
Parameters
Attributes KVList
KVList
KVList
Applicable for
binary
MimeType String false true
contentReturned
only if not null.
This is the
description
that can be
attached to
the contact
attribute.Returned
Description String only if not null. false true
For example,
EmailAddress
can be
described as
"(home)" or
"(office)", etc
Sample
Error
FaultCode FaultString Description
Contact with Id=(ContactId) is not
510 {0} not found in database
found in database
GetContacts
Purpose
This method is intended for delivering specific range of contacts based on search and sort criteria.
URL
• GET /OMContacts/GetContacts/
Request
Parameters
Sample
ContactCount true
TenantId 102
IndexOfFirst 2000
MaxCount 2
SearchCriteria AND EQUAL AttrName FirstName
AttrValue John
AND NOT_EQUAL AttrName LastName
AttrValue Doe
SortCriteria 0 Operator ASC AttrName LastName
AttributeList AttrName EmailAddress
AttrName PhoneNumber
Success
Parameters
Sample
TotalCount 800000
CurrentCount 2
ContactData 0 Id 1234567890123456
Attributes EmailAddress john@rivers.com
PhoneNumber 1257566
1 Id ABCDEFJIOQJDLHDEC
Attributes EmailAddress john@cole.com
PhoneNumber 354535432
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
GetMergeDetail
Purpose
Returns details about a previous merge operation.
URL
• GET /OMContacts/GetMergeDetail/
Request
Parameters
Success
Parameters
must be a byte
array
Applicable for
binary content
MimeType String false true
Max. length: 256
characters
Description to
be set for this
contact
attributes. For
example,
Description String EmailAddress false true
can be
described as
"(home)" or
"(office)", and
so on.
IdentifyContact
Purpose
This method is intended for identifying a Contact based on user data values. If one or more Contact is found, the
Contact identifiers are returned. If no matching Contact is found, a new Contact may be created.
URL
• POST /OMContacts/IdentifyContact/
Sample
POST /ucs/v1/OMContacts/IdentifyContact json:{"Parameters": {"TenantId":101,"FirstName":"Constance","MemberId":"
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
Insert
Purpose
This method is intended for contact creation. No specific limitations related to "required" attributes are introduced
here but they can be introduced at the client application level.
URL
• POST /OMContacts/Insert/
Request
Parameters
Attributes KVList
KVList value
KVList value
Applicable for
binary
content,
MimeType String false true
Max. length: 256
characters
Description to
be set for this
contact
attribute. For
example,
Description String false true null
EmailAddress
can be
described as
"(home)" or
"(office)", etc
Sample
TenantId 102
Attributes EmailAddress 0 AttrValue john.doe@genesys.com
1 AttrValue alice.doe@genesys.com
LastName 0 AttrValue Doe
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
MergeContacts
Purpose
This method is intended for merging of two existing contacts.
• The contact attributes of previous contact are merged into contact attributes of new contact. All primary attributes of
new contact are kept primary while primary attributes of old contact are changed to not primary.
• A record is inserted in the table MergedContact, with Id = sourceContactId and MergeId = destinationContactId.
URL
• PUT /OMContacts/MergeContacts/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
(SourceContactId) was not found in
510 (Id) not found in database
database
MergeListGet
Purpose
This method is intended for building of UCS-wide MergeList or specific list for particular agent.
This service returns the list of Contacts that have been merged. Results are paginated and the size of the page can
be limited using PageMaxSize parameter. Once the caller has finished iterating the merge list, the list must be
closed with the method MergeListRelease. UCS will use an internal timer to close the list if no activity is detected.
URL
• GET /OMContacts/MergeListGet/
Request
Parameters
Success
Parameters
Number of
MergeId
RecordCount Integer records in true true
MergeData
list.
true if more
HasNext Integer true or false records are true true
available
Each merge
data pair is a
sub-list,
MergeData KVList false true
representing
one merge
data record.
A contact id
MergeListGetNextPage
Purpose
This method is intended for delivering the next portion of the merge records from the previously built MergeList.
Method provides unidirectional scrolling of selected records, no backward scrolling or jumping to the record with
arbitrary number.
URL
• GET /OMContacts/MergeListGetNextPage/
Request
Parameters
Success
Parameters
Number of
MergeId
RecordCount Integer true true
records in
MergeData list
true if more
HasNext Integer true or false records are true true
available
Each merge
data pair is a
sub-list,
MergeData KVList false true
representing
one merge
data record
MergeListRelease
Purpose
This method is intended for releasing of previously created MergeList.
URL
• PUT /OMContacts/MergeListRelease/
Request
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database ScrollableList does not exist
RemoveAllAttributes
Purpose
This method is intended for removing all contact attributes.
URL
• PUT /OMContacts/RemoveAllAttributes/
Request
Parameters
Sample
ContactId KHS46XC46GK
TenantId 102
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
Contact with Id=(ContactId) is not
510 {0} not found in database
found in database
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
UnMergeContacts
Purpose
This method is intended for rolling back of the previous contact merge.
• All modifications made to the Contact (new/updated/deleted attributes) after the merge operation are lost.
• Interactions created and associated to a Contact before the merge operation are assigned back to this Contact.
URL
• PUT /OMContacts/UnMergeContacts/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
No merged contact was found with
510 Not found in database
this Id
UpdateAttributes
Purpose
This method is intended for updating contact attributes. New attributes can be added or existing attributes can be
updated or removed.
URL
• PUT /OMContacts/UpdateAttributes/
Request
Parameters
InsertAttributes KVList
KVList
KVList
Description to
be set for this
contact
attribute. For
example,
Description String false true null
EmailAddress
can be
described as
"(home)" or
"(office)", etc),
UpdateAttributes KVList
KVList
KVList
Applicable for
binary content
MimeType String false true
Max. length: 256
characters
Description to
be set for this
contact
attributes. For
example,
Description String false true
EmailAddress
can be
described as
"(home)" or
"(office)", etc
DeleteAttributes KVList
KVList
Sample
ContactId KHS46XC46GK
TenantId 102
InsertAttributes EmailAddress 0 AttrValue alice.doe@genesys.com
LastName 0 AttrValue Doe
UpdateAttributes EmailAddress 1 AttrId JH8BVJH5J48KL59
AttrValue john.doe@genesys.com
DeleteAttributes EmailAddress AttrId SDF3S5435SDF5S3
AttrId GD6H5D4D6DF562X
Success
Parameters
Attributes KVList
KVList
KVList
Applicable for
binary
MimeType String false true
contentReturned
only if not null.
Error
FaultCode FaultString Description
Contact with Id=(ContactId) is not
510 {0} not found in database
found in database
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
OMFieldCodes
• RenderFieldCodes
• RenderMessageContent
• ValidateFieldCodes
RenderFieldCodes
Purpose
The purpose is to replace the field codes with the current values in a template text.
URL
• POST /OMFieldCodes/RenderFieldCodes/
Request
Parameters
Interaction KVList
Contact KVList
Agent KVList
CustomProperties KVList
Sample
Success
Parameters
RenderMessageContent
Purpose
Renders the message content.
URL
• POST /OMFieldCodes/RenderMessageContent/
Request
Parameters
Success
Parameters
ValidateFieldCodes
Purpose
Validates the specified stencil.
URL
• POST /OMFieldCodes/ValidateFieldCodes/
Request
Parameters
Success
Parameters
Errors KVList
OMInteraction
• Create
• Update
Create
Purpose
For OpenMedia Services (GIS/MIL/IRD).
URL
• POST /OMInteraction/Create/
Request
Parameters
UserData
Update
Purpose
For OpenMedia Services (GIS/MIL/IRD).
URL
• PUT /OMInteraction/Update/
Request
Parameters
UserData
OMInteractions
• AddDocument
• AssignInteractionToContact
• CountInteractions
• DeleteInteraction
• FindOrCreatePhoneCall
• GetAttachment
• GetCategorizedInteractions
• GetDocument
• GetInteractionContent
• GetInteractionsForContact
• GetInteractionsWithStatus
• GetUnCategorizedInteractions
• InsertInteraction
• InteractionListGet
• InteractionListGetNextPage
• InteractionListRelease
• RemoveDocument
• SetInteractionStatus
• StopInteraction
• UpdateDocument
• UpdateInteraction
AddDocument
Purpose
This method is intended to add a document to an Interaction. This method can be used in 2 modes:
• Link creation mode—UCS only creates an Attachment record to associate an existing Interaction(defined by the
InteractionId parameter)to an existing Document(defined by the DocumentId parameter).
• Document creation mode—UCS creates an Attachment record and a Document record and associates them to an
existing Interaction (defined by the InteractionId parameter) .
The Document record is created using the parameters MimeType, TheName, Description, TheSize, Content. UCS
returns the DocumentId in response.
UCS automatically works in "Link creation mode" when a parameter "DocumentId" is present in the request.
URL
• POST /OMInteractions/AddDocument/
Request
Parameters
Max. length:
256
characters
MimeType String false true
Mandatory in link
creation mode
Max. length:
Description String 256 false true
characters
Optional, if not
populated it
will be
TheSize Integer false true
calculated
from content
size
Content Binary false true
Success
Parameters
AssignInteractionToContact
Purpose
This method is intended for assigning a thread of Interactions to a Contact.
The indicated interaction will be set as the root parent interaction, and all children will be assigned to the same
thread and same ContactId.
URL
• PUT /OMInteractions/AssignInteractionToContact/
Request
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
The provided contactId doesn't match
510 Contact not found in database an existing contact within the
subtenant.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
CountInteractions
Purpose
Counts the number of interactions. Search Criteria are the same as for InteractionListGet.
URL
• GET /OMInteractions/CountInteractions/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
DeleteInteraction
Purpose
Deletes interactions from UCS.
URL
• DELETE /OMInteractions/DeleteInteraction/
Request
Parameters
FindOrCreatePhoneCall
Purpose
Finds an existing PhoneCall object or, if no matching record is found, creates a new one.
URL
• POST /OMInteractions/FindOrCreatePhoneCall/
Request
Parameters
Formatted
String using
Date pattern
(in format
"yyyy-MM-
ddTHH:mm:ss.SSSZ") Current UCS
StartDate String false true
date
This attribute is
mandatory in
MCR DB but UCS
provides a default
value if no value
is provided
Must be one
of 0 (NEW), 1
Status Integer (PENDING), 2 true true
(IN_PROCESS),
3 (STOPPED)
Timeshift Integer false true
Max. length:
CategoryId String false true
16 characters
Interaction
Sub Type
SubtypeId String value (must false true
be declared in
ConfigServer)
Max length: 32
characters
Max length:
ExternalId String 256 false true
characters
Max length:
ThreadId String false true
16 characters
Max length:
Subject String 512 false true
characters
Value can be
IsCategoryApproved
String false true
true or false
Max. length:
StoppedReason String false true
64 characters
Max. length:
ContactId String false true
16 characters
Max. length:
ParentId String false true
16 characters
Max. length:
Lang String false true
64 characters
Max. length:
QueueName String false true
64 characters
Value can be
IsSpam String false true
true or false
Max. length:
WebSafeEmailStatus
String false true
32 characters
TheComment String false true
Formatted
String using
Date pattern
EndDate String false true
(in format
"yyyy-MM-
ddTHH:mm:ss.SSSZ")
User data key/
AllAttributes KVList false true
value pairs
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
GetAttachment
Purpose
This method is intended for delivering the binary content of a document. It is identical to GetDocument but with a
different name. This is needed for PSDK because PSDK cannot have two messages with the same name, even in
different services.
URL
• GET /OMInteractions/GetAttachment/
Request
Parameters
If set to true,
Content is
returned.
Otherwise,
IncludeBinaryContent
String true or false Content is not false true true
returned to
save IO and
memory
consumption.
Success
Parameters
Error
FaultCode FaultString Description
Document with Id=(DocumentId) is
510 {0} not found in database
not found in database
GetCategorizedInteractions
URL
• GET /OMInteractions/GetCategorizedInteractions/
Request
Parameters
Success
Parameters
Number of
element
PageSize Integer true true
returned in the
page
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetDocument
Purpose
This method is intended for delivering the binary content of a document. In 9.0 the Datasource parameter is
ignored.
URL
• GET /OMInteractions/GetDocument/
Request
Parameters
If set to true,
Content is
returned.
Otherwise,
IncludeBinaryContent
String true or false Content is not false true true
returned to
save IO and
memory
consumption.
DataSource String Ignored in 9.0 false false
Success
Parameters
Error
FaultCode FaultString Description
Document with Id=(DocumentId) is
510 {0} not found in database
not found in database
GetInteractionContent
Purpose
This method is intended for delivering the binary content of the interaction.
URL
• GET /OMInteractions/GetInteractionContent/
Request
Parameters
If set to true,
Content &
MimeType are
returned.
Otherwise,
IncludeBinaryContent
String true or false Content & false true false
MimeType are
not returned
to save IO
and memory
consumption.
If set to true,
Attachments
are returned.
Otherwise,
IncludeAttachments
String true or false false true false
Attachments
are not
returned to
save IO and
Success
Parameters
Binary
content.
KVList format
described in
InsertInteraction.
InteractionContentKVList Binary content false true
is only
returned if
IncludeBinaryContent
parameter is
set to true.
Attachments
are only
returned if
Attachments KVList false true
IncludeAttachments
parameter is
set to true.
Attachments KVList
(DocumentId) KVList
Error
FaultCode FaultString Description
Interaction with Id=(InteractionId) is
510 {0} not found in database
not found in database
GetInteractionsForContact
Purpose
This method is intended for delivering of all of or some (depending on the filtering) of the interactions for the contact
in question.The aim of this method is to provide the Interaction history.
It returns only attributes from the Interaction table. This is because it is not possible to get MediaServer specific
attributes (which are scattered in multiple tables) in one request. Specific MediaServer attributes can be retrieved
individually by calling the GetInteractionContent method.
URL
• GET /OMInteractions/GetInteractionsForContact/
Request
Parameters
SimpleConstraint KVList
KVList
ComplexConstraint KVList
(Operator) = NOT, AND or OR KVList value detail is conform to SimpleConstraint or ComplexConstraint KVList
definition
SortCriteria KVList
KVList
AttributeList KVList
Sample
ContactId KHS46XC46GK
AttributeList AttrName Id
AttrName TypeId
AttrName SubtypeId
SearchCriteria AND EQUAL AttrName Status
AttrValue 2
AND NOT_EQUAL AttrName ThreadId
AttrValue WX345SBGA34TFGGS
SortCriteria 0 Operator ASC
AttrName StartDate
Success
Parameters
ContactInteractions KVList
KVList
Attributes KVList
Sample
ContactInteractions 0 Id (InteractionId-1)
Attributes (AttributeName-1) AttributeValue1
(AttributeName-2) AttributeValue2
1 Id (InteractionId-2)
Attributes (AttributeName-1) AttributeValue
(AttributeName-2); AttributeValue2
GetInteractionsWithStatus
Purpose
This method is intended for delivering the set of interactions with requested status.
URL
• GET /OMInteractions/GetInteractionsWithStatus/
Request
Parameters
Configuration
declared
Interaction
InteractionType String Type true true
Max length: 32
characters
Configuration
declared
Interaction
InteractionSubtype
String SubType false true
Max length: 32
characters
Application
SubmittedBy String name as false true
specified in
UserData
Success/Request3rdServerResponse
Parameters
IdList KVList
Sample
IdList Id ABCDEFJIOQJDLHDE
Id LKJ3456987SDFGLD
Id KJ870345LKJHFVLK
GetUnCategorizedInteractions
URL
• GET /OMInteractions/GetUnCategorizedInteractions/
Request
Parameters
Success
Parameters
Number of
element
PageSize Integer true true
returned in the
page
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
InsertInteraction
Purpose
This method is intended for the creation of new interactions in UCS.
URL
• POST /OMInteractions/InsertInteraction/
Request
Parameters
InteractionAttributes
This attribute
is mandatory
CanBeParent String false true true
in MCR DB
but UCS
Formatted
String using
Date pattern
(in format
"yyyy-MM-
ddTHH:mm:ss.SSSZ") Current UCS
StartDate String false true
date
This attribute is
mandatory in
MCR DB but UCS
provides a default
value if no value
is provided
Must be one
of 0 (NEW), 1
Status Integer (PENDING), 2 true true
(IN_PROCESS),
3 (STOPPED)
Max. length: UCS
Id String false true
16 characters generated Id
Timeshift Integer false true null
Max. length:
CategoryId String false true
16 characters
Max. length:
SubtypeId String false true
32 characters
Max. length:
ExternalId String 256 false true
characters
Must conform
to RFC
FromPersonal String false true
Max length: 256
characters
Must conform
to RFC
ReplyToAddress String false true
Max length: 256
characters
Must conform
ToAddresses String false true
to RFC
Must conform
CcAddresses String false true
to RFC
Must conform
BccAddresses String false true
to RFC
Formatted
with pattern
SentDate String false true
"yyyy-MM-
ddTHH:mm:ss.SSSZ"
Max. length:
Mailbox String 256 true true
characters
Max. length:
WhichRuleMatched
String false true
16 characters
Max. length:
EmailOutId String false true
16 characters
Comma-
separated
attributes
names as
NullAttributes String false true
described
above, such
as "Text,
StructuredText"
InteractionContent
Comma-
NullAttributes String separated false true
attributes
InteractionContentSentReceived KVList
8.1.1
Attachments KVList
KVList
Mandatory in
document
creation mode
MimeType String false true
Max. length: 256
characters
Mandatory in
TheName String document false true
creation mode
Max. length:
Description String 256 false true
characters
TheSize Integer false true
Mandatory in
Content Binary document false true
creation mode
Success
Parameters
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
Contact with Id={0} and The provided contactId doesn't match
510 SubscriberId={1} not found in an existing contact within the
database subtenant.
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
InteractionListGet
Purpose
This method provides a ScrollableList of interactions, filtered by constraints and sorted using criteria.
URL
• GET /OMInteractions/InteractionListGet/
Request
Parameters
KVList
(Operator) = NOT, AND or OR KVList value detail is conform to SimpleConstraint or ComplexConstraint KVList
definition
SortCriteria KVList
KVList
AttributeList KVList
specified, only
default
"AttributeList" is
returned.
Sample
TenantId 102
SearchCriteria AND EQUAL AttrName Status
AttrValue 2
AND NOT_EQUAL AttrName ThreadId
AttrValue WX345SBGA34TFGGS
SortCriteria 0 Operator ASC
AttrName StartDate
AttributeList AttrName Id
AttrName TypeId
AttrName SubtypeId
Sample
TenantId 102
Segment Airbnb
SearchCriteria EQUAL AttrName ESQuery
+ThreadId:WX345SBGA34TFGGS
AttrValue
+Status:2
AttributeList AttrName Id
AttrName TypeId
AttrName SubtypeId
Sample
TenantId 102
Segment Airbnb
+ThreadId:WX345SBGA34TFGGS
ESQuery
+Status:2
AttributeList AttrName Id
AttrName TypeId
AttrName SubtypeId
Sample
TenantId 102
Segment Airbnb
{ "query" : { "bool" : {"must" : { "term" :
{ "ThreadId" :
ESQuery "WX345SBGA34TFGGS" }
},"must_not" : { "range" : { "Status" : {
"from" : 1, "to" : 3 } }} } }
AttributeList AttrName Id
AttrName TypeId
AttrName SubtypeId
Success
Parameters
The number
of Contacts
PageSize Integer true true
available in
this page
Indicates
more records
are available
(using method
LookupNextPage).
If true:
CloseLookup
method is to be
HasNext String true or false true true
called after
iteration If false:
UCS
automatically
closes the list and
there is no need
to call
CloseLookup
method
InteractionData KVList
KVList
KVList
Error
FaultCode FaultString Description
SubscriberId was not provided but is
201 Missing parameter 'SubscriberId'
a required parameter.
533 Invalid ES Query Provided ESQuery is malformed
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
SubscriberId '{0}' is invalid or not The provided SubscriberId is not
921
active. valid.
InteractionListGetNextPage
Purpose
This method allow to scroll through next page of interactions previously found using InteractionListGet.
URL
• GET /OMInteractions/InteractionListGetNextPage/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database ScrollableList does not exist
InteractionListRelease
Purpose
This method will release a previously created ScrollableList from InteractionGet.
URL
• PUT /OMInteractions/InteractionListRelease/
Request
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database ScrollableList does not exist
RemoveDocument
Purpose
This method is intended to remove a document. If the related Document is no more referenced by any Attachment
(no more associated to any Interaction or StandardResponse), the Document record is also removed from
database.
URL
• DELETE /OMInteractions/RemoveDocument/
Request
Parameters
SetInteractionStatus
Purpose
This method is intended for changing interaction status.
URL
• PUT /OMInteractions/SetInteractionStatus/
Request
Parameters
Reason for
status change
StoppedReason String false true No change
Max length: 64
characters
Error
FaultCode FaultString Description
Interaction with Id=(InteractionId) is
510 {0} not found in database
not found in database
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
StopInteraction
Purpose
This method is intended for stopping an interaction.
URL
• PUT /OMInteractions/StopInteraction/
Request
Parameters
• InteractionId
(other user
StringIntegerKVList • ParentId false false
data)
• ExternalId
• MediaType
• Type
• Subtype
• State
• StagingArea
• SubmittedBy
• TenantId
• ReceivedAt
• SubmittedAt
• DeliveredAt
• PlacedInQueueAt
• WorkbinAgentId
• WorkbinAgentGroupId
• WorkbinPlaceId
• WorkbinPlaceGroupId
• Queue
UpdateDocument
Purpose
This method is intended to update a document.
URL
• PUT /OMInteractions/UpdateDocument/
Request
Parameters
UpdateInteraction
Purpose
This method is intended for updating of interaction attributes and binary content.
URL
• PUT /OMInteractions/UpdateInteraction/
Request
Parameters
The list of
Entity specific
attributes and
their values,
which have to
be updated.
KVList format
described in
OMInteractions
/
InsertInteraction.
Attributes
which are
EntityAttributes KVList false true
declared as
mandatory in
InsertInteraction
method
description
must have a
not null value
if passed in
UpdateInteraction.
Mandatory if
EntityTypeId =
0, 1, 2, 3, 5, or
6.
Information to
InteractionContentKVList update binary false true
content.
[RG]UCS will distinguish between:(AttributeName) key not present (meaning no update required for this
attribute)and (AttributeName)= null(meaning this attribute must be updated with a null value-the attribute must be
nullable!)
InteractionAttributes
Formatted
String using
Date pattern Current UCS
StartDate String false true
(in format date
"yyyy-MM-
ddTHH:mm:ss.SSSZ")
Formatted
String using
Date pattern
EndDate String false true
(in format
"yyyy-MM-
ddTHH:mm:ss.SSSZ")
TheComment String false true
Subject String false true
CanBeParent String false true
ContactId String false true
CreatorAppId Integer false true
Must be one
of 0 (NEW), 1
Status Integer (PENDING), 2 false true
(IN_PROCESS),
3 (STOPPED)
Timeshift Integer false true
Max. length:
CategoryId String false true
16 characters
Error
FaultCode FaultString Description
Interaction with Id=(InteractionId) is
510 {0} not found in database
not found in database
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
OMResponse
• CheckForUpdates
• GetAgentStdRespFavorites
• GetAllCategoryStatistics
• GetAllFAQObjectCategories
• GetAllGlobalStatistics
• GetAllGroups
• GetAllRegEx
• GetAllRules
• GetAllTestMessage
• GetCategory
• GetCategoryAttribute
• GetCategoryAttributes
• GetCategoryStatistics
• GetConfusionMatrices
• GetConfusionMatrix
• GetDocument
• GetEmailClassificationResult
• GetEmailClassificationResults
• GetFAQObjects
• GetFAQObjectCategories
• GetFieldCode
• GetFieldCodes
• GetFieldValue
• GetFieldValues
• GetGlobalStatistics
• GetGroup
• GetGroupContent
• GetModel
• GetModels
• GetRegEx
• GetRootCategories
• GetRule
• GetScreeningRule
• GetScreeningRules
• GetStandardResponse
• GetStandardResponses
• GetTestMessage
• GetTestingResult
• GetTestingResults
• GetTrainingDataObject
• GetTrainingDataObjects
• GetTrainingEmail
• GetTrainingEmails
• GetTrainingJob
• GetTrainingJobs
• GetUpdates
• TrainingEmailListGet
• TrainingEmailListNext
CheckForUpdates
Purpose
This method is intended for checking whether standard responses were updated or not since the time, provided as
a time-stamp.
URL
• GET /OMResponse/CheckForUpdates/
Request
Parameters
Time-stamp
from the last
update (in
LastUpdate String true true
format "yyyy-
MM-
ddTHH:mm:ss.SSSZ").
Success
Parameters
GetAgentStdRespFavorites
Purpose
Get the list of all Standard Response Favorites of an agent.
URL
• GET /OMResponse/GetAgentStdRespFavorites/
Request
Parameters
Success
Parameters
Sample
StdResp 00001a39C4C9001H
StdResp 00001a39C4C9001J
StdResp 00001a39C4C9001K
GetAllGroups
Purpose
This method is intended for downloading of all PII Groups in specific tenant/SubscriberId.
URL
• GET /OMResponse/GetAllGroups/
Request
Parameters
Success
Parameters
Group KVList
GroupId KVList
Error
FaultCode FaultString Description
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetAllRegEx
Purpose
This method is intended for downloading of all PII RegEx in specific tenant/SubscriberId.
URL
• GET /OMResponse/GetAllRegEx/
Request
Parameters
Success
Parameters
RegEx KVList
RegExId KVList
Error
FaultCode FaultString Description
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetAllRules
Purpose
This method is intended for downloading of all PII rules in a specific tenant/SubscriberId.
URL
• GET /OMResponse/GetAllRules/
Request
Parameters
Success
Parameters
Rules KVList
RuleId KVList
Reg Ex Detail
associated.Only
RegEx KVList true true
if
ReturnChildObjects=true
Pattern to use
ReplacementPattern
String for false true
replacement
Pattern to use
Actions String for false true
replacement
TenantId Integer true true
RegEx KVList
Error
FaultCode FaultString Description
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetAllTestMessage
Purpose
This method is intended for downloading of all PII TestMessages in a specific tenant/SubscriberId.
URL
• GET /OMResponse/GetAllRules/
Request
Parameters
Type of
Object
associated
with the
RelatedObjectType
String message false true
"Mandatory if
RelatedObjectId
is not provided\n"
Success
Parameters
TestMessages KVList
TestMessageId KVList
Error
Error
GetCategory
Purpose
This method is intended for downloading of the Category, and category sub-tree, from server to client. Only Id,
StandardResponseId and TheName attributes are returned for each SRL. The GetStandardResponse method is
used to get each SR detailed information.
URL
• GET /OMResponse/GetCategory/
Request
Parameters
Success
CategoryId KVList
ChildrenCategories KVList
ChildrenStdResponses KVList
StandardResponseId
Error
FaultCode FaultString Description
510 {0} not found in database Record is not found in database
GetCategoryAttribute
URL
• GET /OMResponse/GetCategoryAttribute/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetCategoryAttributes
Purpose
GetCategoryAttributes used without parameter returns all the elements.
URL
• GET /OMResponse/GetCategoryAttributes/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetDocument
URL
• GET /OMResponse/GetDocument/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
{0} with name {1} already exists in
114 Object already exists in database
database
No language {0} defined in
201 Incorrect language parameter
configuration for Tenant {1}
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetFieldCode
URL
• GET /OMResponse/GetFieldCode/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetFieldCodes
URL
• GET /OMResponse/GetFieldCodes/
Request
• Service name: OMResponse
Success
Parameters
GetFieldValue
URL
• GET /OMResponse/GetFieldValue/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetFieldValues
URL
• GET /OMResponse/GetFieldValues/
Success
Parameters
GetGroup
URL
• GET /OMResponse/GetGroup/
Request
Parameters
Name of the
group to
retrieve.
255 chars
Name String false true
max Mandatory with
TenantID if Id is
not provided
Return details
ReturnChildObjects
String true or false of associated false true false
object
The tenant ID
of Group to
retrieve.
TenantId Integer false true
Mandatory with
Name if Id is not
provided
**Important**:
The
subscriber
SubscriberId String (i.e. line of false true
business)
within the
tenant
Success
Parameters
Rules KVList
RuleId KVList
Reg Ex Detail
associated.Only
RegEx KVList true true
if
ReturnChildObjects=true
Pattern to use
ReplacementPattern
String for false true
replacement
RegEx KVList
Error
FaultCode FaultString Description
201 Missing parameter {0} Mandatory parameter missing
510 {0} not found in database Record is not found in database
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetGroupContent
URL
• GET /OMResponse/GetGroupContent/
Request
Parameters
ID of the
group.
GroupId String 16 chars false true
Mandatory if Id is
not provided
Success
Parameters
GroupContent KVList
GroupContentId KVList
Error
FaultCode FaultString Description
510 {0} not found in database Record is not found in database
GetRegEx
URL
• GET /OMResponse/GetRegEx/
Request
Parameters
Name of the
expression
255 chars
Name String Mandatory with false true
max
TenantId if Id is
not provided
The tenant ID
of RegEx to
retrieve
TenantId Integer false true
Mandatory with
Name if Id is not
provided
**Important**:
The
subscriber
SubscriberId String (i.e. line of false true
business)
within the
tenant
Success
Parameters
Error
FaultCode FaultString Description
201 Missing parameter {0} Mandatory parameter missing
510 {0} not found in database Record is not found in database
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetRootCategories
Purpose
This method is intended for downloading of the Root Categories information.
URL
• GET /OMResponse/GetRootCategories/
Request
Parameters
Success
Parameters
Categories KVList
CategoryId KVList
Error
FaultCode FaultString Description
Provided tenant is not configured in
732 Invalid Tenant {0}
UCS
GetRule
URL
• GET /OMResponse/GetRule/
Request
Parameters
Name of the
expression
255 chars
Name String Mandatory with false true
max
TenantId if Id is
not provided
Return details
ReturnChildObjects
String true or false of associated false true false
object
The tenant ID
of Rule to
retrieve
TenantId Integer false true
Mandatory with
Name if Id is not
provided
**Important**:
The
subscriber
SubscriberId String (i.e. line of false true
business)
within the
tenant
Success
Parameters
Reg Ex Detail
associated.Only
RegEx KVList true true
if
ReturnChildObjects=true
Pattern to use
ReplacementPattern
String for false true
replacement
Pattern to use
Actions String for false true
replacement
TenantId Integer true true
RegEx KVList
Error
FaultCode FaultString Description
201 Missing parameter {0} Mandatory parameter missing
510 {0} not found in database Record is not found in database
Provided tenant is not configured in
732 Invalid Tenant {1}
UCS
GetScreeningRule
URL
• GET /OMResponse/GetRule/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetScreeningRules
URL
• GET /OMResponse/GetScreeningRules/
Request
Parameters
Success
Parameters
GetStandardResponse
Purpose
This method is intended for downloading of the Standard Response content from server to client. No attachment
content is returned, only Name, MimeType, Description, and Size.
URL
• GET /OMResponse/GetStandardResponse/
Request
Parameters
The
Versions are StandardResponse
version to get.
- 0: current - 1 or If no Version
Version Integer more: each false true
successive
get the
version Version=0.
(Introduced in
8.1.3)
When
specifying the
version, return
the
attachment
Attachments String true or false false true false
summaries
(without
content), if
any. (Added in
8.1.4)
Success
Parameters
Values are
- "Automatic", -
AgentDesktopUsageType
String true true
"Manual", - "Not
Used"
Attachments KVList
KVList
Error/Event3rdServerResponse
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
No such Standard Response defined:
StandardResponseId =
510 Record is not found in database
'(standardResponseId)' not found in
database
GetStandardResponses
Purpose
This method is intended for downloading of all the versions of a Standard Response content for a standard
response ID from server to client. No attachment content is returned, only Name, MimeType, Description, and Size.
URL
• GET /OMResponse/GetStandardResponses/
Request
Parameters
Success
Parameters
Versions KVList
Values are
- "Automatic", -
AgentDesktopUsageType
String true true
"Manual", - "Not
Used"
Attachments KVList
KVList
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
GetTestMessage
URL
• GET /OMResponse/GetTestMessage/
Request
Parameters
Success
Parameters
Error
FaultCode FaultString Description
510 {0} not found in database Record is not found in database
GetUpdates
Purpose
This method cannot filter by tenantID because it is possible to receive events from other tenants. This is a technical
limitation of the UCS event system and there is no workaround. Because GetUpdates can be a blocking operation,
there is a limit of 10 concurrent blocking calls, to prevent usage of all UCS connections.
URL
• GET /OMResponse/GetUpdates/
Request
Parameters
• Category
• CategoryAttribute
• CategoryStructure
Empty means
• EmRoute all monitored
EventType String • TrainingJob false true Persistent
names will be
• Model returned.
• StandardResponse
• PIIRule
• PIIRegEx
• PIIGroup
• PIIGroupContent
• PIITestMessage
Will retrieve
all updates
since that
date. Time is
Date in
UCS time.
Since String ISO8601 Date false true
You can use
Format
GetServerTime
to retrieve it or
use a returned
date.
If present,
request will
block until an
event occurs
or timeout
Value is in expires. You
PoolTimeout Integer false true
minutes must set your
ESP client
timeout to a
value higher
than
PoolTimeout.
Success
Parameters
• Category
• CategoryAttribute
• CategoryStructure
See above for
• EmRoute KVList false true
description
• TrainingJob
• Model
• PIIRule
• PIIRegEx
• PIIGroup
• PIIGroupContent
• PIITestMessage
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
Too many 'blocking getUpdates' in 10 blocking get updates request are
739
use, request rejected. currently in progress.
ProfileService Methods
• ProfileServiceCustomerProfileResource
• deleteProfile
• queryCustomerProfile
• updateCustomerProfile
• ProfileServiceProfilesResource
• createProfile
• identifyProfiles
• ProfileServiceProfileExtensionsResource
• insertExtensionRecord
• ProfileServiceUpdateRecordInProfileExtension
• updateRecordInProfileExtension
• ProfileServiceDeleteRecordInProfileExtension
• deleteRecordInProfileExtension
• ProfileServiceimportProfileRecords
• importProfileRecords
• ProfileMergeUnmerge
• mergeProfiles
• unmergeProfiles
• unmergeProfilesAsSource
CustomerProfileResource
Handle methods for profile manipulation: Reading a profile (GET), Updating a profile (PUT).
• deleteProfile
• queryCustomerProfile
• updateCustomerProfile
deleteCustomerProfile
URL
• DELETE /profiles/{customer_id}
Request
URL Parameters
HTTP Headers
Key ValueType Value Description Mandatory Unique Default
X-Genesys- Integer value
Integer false true
TenantId of tenant id
Segment
X-Genesys- value (not to
String false true
Segment be provided
by customer)
Responses
Success
Error
queryCustomerProfile
URL
• GET /profiles/{customer_id}
Request
URL Parameters
HTTP Headers
Key ValueType Value Description Mandatory Unique Default
X-Genesys- Integer value
Integer false true
TenantId of tenant id
Segment
X-Genesys- value (not to
String false true
Segment be provided
by customer)
Parameters
Key ValueType Value Description Mandatory Unique Default
extensions String extensions false false
Sample
GET /profiles/0004Va58A92T0017
Responses
Success
Error
Sample
200 OK
{ "customer_id": "0004Va58A92T0017 ",
"name": "Doe, John",
"birthdate": "1976-05-10",
"EmailAddress": [
"john.doe@genesyslab.com",
"jd34@hotmail.dom"],
"contacts": [
{"phone": "408-555-1234", "ext": "1234"},
{"phone": "408-832-7712"} ],
"preferences": { "newsletter": "y", "new_offers": "n", "email": "html" }
updateCustomerProfile
Purpose
Overrides the attributes of the customer profile—prior attribute values are lost and replaced with the attribute list
specified in the body of the request. This operation uses the standard convention for HTTP PUT, which requires you
to update the profile with the complete profile to avoid losing information. Your application should use this operation
in conjunction with the Query Customer Profile operation:
Extensions can be part of the profile used for the update: If your application does not include any extensions in the
body, no modification occurs on extensions. If your application specifies extension values, extension information is
overridden. Your application must specify the complete extension set to avoid losing data.
URL
• PUT /profiles/{customer_id}
Request
URL Parameters
HTTP Headers
Body
Extensions,
where
(extension n)
corresponds
to the unique
name of the
profile
extension
resource.
extension n String false true
Note: If you
specify
extensions,
extensions are
overridden. If you
wish to modify an
extension value,
this
representation
must contain all
the profile
extensions,
including those
that were not
modified.
Sample
PUT http://ucsserver.mycompany.com:8080/path/profiles/00027a52JCGY000M
Content-Location /profiles/00027a52JCGY000M
Content-Type: application/json
{
"FirstName": "Bruce",
"LastName": "Banner",
"DOB": "1962-05-10",
"EmailAddress": [
"bruce.banner@marvelous.com",
"b.banner@hulk.dom"
],
"Address": { "Type":1, "Address":"21 JumpStreet", "City":"Hollywood",
"County":"Santa Barbara", "PostCode":"555", "Country":"United States" }
}
Responses
Success
Error
ProfilesResource
Identifies a customer based on the Identification Key information submitted with the query. In addition to the
identified customer ID, your application can retrieve profile and extension information based on the query fields.
Query strings should be URL Encoded. If the "id_key" parameter is not specified, then UCS uses the following
algorithm:
1. Starting with the identification key with the lowest ID, UCS determines the number of attributes in the key which are
covered by the data specified in the "expr" parameter.
2. If all attributes are covered, then use this key. Otherwise, record the number of sequential attributes covered, starting
from the left. For example, if key 1 consists of attributes (a, b, c), and "expr" contains (a, b) then the score is 2.
3. If no key is selected after iterating through all the defined keys, choose the key with the highest score from Step 2. In
the event of a tie, UCS selects the key with the smallest ID.
• createProfile
• identifyProfiles
createProfile
Purpose
Creates a Customer Profile and returns the ID created by UCS. Profiles are built on top of legacy UCS Contact
Attributes. They are multi-valued and support the primary attributes. If an attribute has several values, the first value
in the JSON array is the primary attribute and additional values are non-primary attributes. Standard multi-valued
extensions are available.
URL
• POST /profiles
Request
HTTP Headers
Body
• For single-
valued
extensions,
the
extension's
value is a
extension StringList single false true
extension
object
(see
Extension).
• For multi-
valued
extensions,
the
extension's
value is
an array
of zero or
more
Extensions.
Sample
POST /profiles/
{
"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_availability":"2009-12-18T18:30:00.000Z",
"end_availability":"2009-12-18T21:40:00.000Z"
},
{
"PhoneType":2,
"prefix":"+33",
"PhoneNumber":"6543210",
"description":"business calls only, no sales",
"start_availability":"2009-12-18T09:30:00.000Z",
"end_availability":"2009-12-18T17:45:00.000Z"
},
{
"PhoneType":5,
"prefix":"+33",
"PhoneNumber":"951357456",
"description":""
}
]
}
Responses
Success
Error
Sample
201 Created
Content-Location http://ucsserver.mycompany.com:8080/path/profiles/00038b5SCVPU0007
{"customer_id":"0004Va58A92T0017"}
identifyProfiles
URL
• GET /profiles
Request
HTTP Headers
Parameters
• "no"
(default)
to return
the list of
customers
IDs
without
their
profile
include_profile String "yes" or "no" false false no
attributes.
• "yes" to
return all
the profile
attributes
of the
identified
customers.
• "always"
(default)
to return
the
extensions
specified
with the
field
"extension"
if one or
more
customers
"always" or are
include_extensions
String false false always
"unique" identified.
• "unique" to
return the
extensions
identified
in
parameter
"extensions"
if a unique
customer
is
identified.
The names of
the extension
to return with
A comma the customer
separated list profiles. Your
extensions String false false
of extension application
names can specify
multiple
values
separated
Sample
GET /profiles/contacts.phone_number=408-888-3214&extensions=contacts,purchases∈clude_profile=yes
∈clude_extensions=unique
Responses
Success
Error
Sample
200 OK
[{"customer_id": "2DC255C02AF", "name": "Doe, John", "birthdate": "1976-05-10"},
{"customer_id": "DDF295802AF", "name": "Doe, Jane", "birthdate": "1978-02-25"}]
200 OK
[{ "customer_id": "0004Va58A92T0017 ",
"name": "Doe, John",
"birthdate": "1976-05-10",
"EmailAddress": [
"john.doe@genesyslab.com",
"jd34@hotmail.dom"],
"contacts": [
{"phone": "408-555-1234", "ext": "1234"},
{"phone": "408-832-7712"} ],
"preferences": { "newsletter": "y", "new_offers": "n", "email": "html" }
}]
Profile ExtensionsResource
This operation inserts one or more extension records, which replace former records if they already exist.
• insertExtensionRecord
insertExtensionRecord
Purpose
This operation inserts one or more extension records, which replace former records if they already exist.
URL
• POST /profiles/{customer_id}/extensions
Request
URL Parameters
HTTP Headers
Body
• For single-
valued
extensions,
the
extension's
value is a
single
extension
object
(see
Extension).
• For multi-
valued
extensions,
the
extension's
value is
an array
of zero or
more
Extensions.
Sample
POST /profiles/0004Va58A92T0017/extensions
{
"Phone": [
{"PhoneType":0,
"prefix":"+33",
"number":"3145926535",
"description":"family phone",
"start_availability":"2009-12-18T18:30:00.000Z",
"end_availability":"2009-12-18T21:40:00.000Z"},
{"PhoneType":2,
"prefix":"+33",
"number":"6543210",
"description":"business calls only, no sales",
"start_availability":"2009-12-18T09:30:00.000Z",
"end_availability":"2009-12-18T17:45:00.000Z"},
{"PhoneType":5,
"prefix":"+33",
"number":"951357456",
"description":"",
} ]
}
Responses
Success
Error
UpdateRecordInProfileExtension
Update Record In Profile Extension (PUT).
• updateRecordInProfileExtension
updateRecordInProfileExtension
Purpose
Updates the content of a single record in a multi-valued extension. The attributes which are part of the 'unique' list
specified at the Extension Schema creation are passed in the body and used to find the correct record to update.
This update cannot change the values of the attributes which are part of the 'unique' list of the Extension Schema;
'unique' attributes are used as identifiers for the given record.
Workaround: If you wish to update a value for an attribute stamped as unique, you must delete the concerned
record, then recreate this record with its correct values.
URL
• PUT /profiles/{customer_id}/extensions/{extension_name}/by/unique
Request
URL Parameters
HTTP Headers
Body
Sample
PUT /profiles/0000Sb5U97XE000Y/extensions/Phone/by/unique
"PhoneType":0,
"prefix":"+33",
"PhoneNumber":"3145926535",
"description":"family phone",
"start_availability":"2009-12-18T18:30:00.000Z",
"end_availability":"2009-12-18T21:40:00.000Z"
}
Responses
Success
Error
DeleteRecordInProfileExtension
Deletes a single record in a multi-valued extension (PUT).
• deleteRecordInProfileExtension
deleteRecordInProfileExtension
Purpose
Deletes a single record in a multi-valued extension. You must specify the list of 'unique' attributes which identify the
record to delete.
URL
• PUT /profiles/{customer_id}/extensions/{extension_name}/delete/by/unique
Request
URL Parameters
HTTP Headers
Body
Sample
PUT /profiles/0000Sb5U97XE000Y/extensions/Phone/delete/by/unique
{"PhoneType":0,
"prefix":"+33",
"PhoneNumber":"3145926535",
"description":"family phone",
"start_availability":"2009-12-18T18:30:00.000Z",
"end_availability":"2009-12-18T21:40:00.000Z"
}
Responses
Success
Error
ProfileService importProfileRecords
Import customer profiles in a single operation.
• importProfileRecords
importProfileRecords
Purpose
Imports several customer profiles in a single operation. Your application should use this operation if you need to
import a large number of profiles into the UCS database. Note that TenantId and Segment columns are not
compulsory. If omitted, default values are used.
URL
• POST /profiles/import
Request
HTTP Headers
Body
A valid
identification
key." If
specified, the
server checks
to see
whether the
profile already
id-key String exists prior to false true
the insertion.
If the profile does
exist in the
database, the
record containing
the duplicate
profile is skipped.
Defines the
character
used to
separate the
delimiter String submitted false true
profiles:
The number
of errors to
allow before
ending the
bulk load.
An error can
indicate that a
max-errors String false true
given record was
not parsed
correctly, or that
an ambiguity
exists with an
existing customer
record (see
response below).
Encoding
character to
encoding String false true
use for file
import.
Default is
UTF-8<ref>
UTF-8 without
BOM, see related
bug
The record
start-from- number from
String false true
index which to start
importing.
This flag turns
extended
import results
logging on or
off.
The log data is
written to an
create-log Boolean false true
output file that
has the same
name as the input
file, with an
extension of .log
appended. The
default value is
false.
Sample
POST /profiles/import
--zaHf8xb3LfVOXZ0o2KUyqWD4Zlfumh0R9uyMN
Content-Disposition: form-data; name="description"
Content-Type: application/json; charset=UTF-8
Content-Transfer-Encoding: 8bit
{"delimiter":",","profiles":"D:/successContentProfiles.csv","format":"csv","max-errors":20}
--zaHf8xb3LfVOXZ0o2KUyqWD4Zlfumh0R9uyMN--Example of CSV content:
TenantId,Segment,FirstName,LastName,PhoneNumber[2],PhoneNumber[1],EmailAddress,Address.AddressType,Address.PostCode,Address.Address,Address.County,Address.
Responses
Success
Error
ProfileServiceMergeUnmerge
•
•
•
mergeProfiles
Purpose
Merges two profiles together, transferring all data from one to the other (attributes and extensions).
URL
• PUT /profiles/{customer_id}/merge/{source_id}
Request
URL Parameters
HTTP Headers
Body
Sample
PUT /profiles/00001b8BBKDX000D/merge/00001b8BBKDX000H
{ }
Responses
Success
Error
unmergeProfiles
Purpose
Split one profile into two profiles that were previously merged.
• Contact objects—All modifications made to the Contact (new/updated/deleted attributes) after the merge operation are
lost.
• Interaction objects—Interactions created and associated to a Contact before the merge operation are assigned back to
this Contact.
URL
• PUT /profiles/{customer_id}/unmerge/
URL Parameters
HTTP Headers
Sample
PUT /profiles/00001b8BBKDX000H/unmerge/
{ }
Responses
Success
Error
unmergeProfilesAsSource
Purpose
Split one profile in two profiles, that were previously merged.
• Contact objects—All modifications made to the Contact (new/updated/deleted attributes) after the merge operation are
lost.
• Interaction objects—Interactions created and associated to a Contact before the merge operation are assigned back to
this Contact.
URL
• PUT /profiles/{customer_id}/unmerge/as_source
URL Parameters
Key ValueType Value Description Mandatory Unique Default
Id of the
successfully
customer_id String merged true true
contact
destination.
HTTP Headers
Key ValueType Value Description Mandatory Unique Default
X-Genesys- Integer value
Integer false true
TenantId of tenant id
Segment
X-Genesys- value (not to
String false true
Segment be provided
by customer)
Sample
PUT /profiles/00001b8BBKDX000H/unmerge/as_source
{ }
Responses
Success
Error
System Information
• GetIdentifier
• GetServerTime
• GetSystemSettings
• GetVersion
GetIdentifier
Purpose
Get a new UCS Id.
URL
• GET /SystemInformation/GetIdentifier/
Success
Parameters
GetServerTime
Purpose
Retrieve the current time on UCS' server in ISO8601 Date Format.
URL
• GET /SystemInformation/GetServerTime/
Success
Parameters
Sample
Time 2013-04-11T10:06:56.646Z
GetSystemSettings
Purpose
The purpose is to provide available options. This particular service aims at providing users with a picture of UCS
information, regardless of which client is connected behind a proxy.
URL
• GET /SystemInformation/GetServerTime/
Success
Parameters
Host
Ports
(PortId)
DatabaseInfo attributes
DAPName
Possible values
are: Main, Archive
GetVersion
Purpose
This method retrieves the UCS version from the server.
URL
• GET /SystemInformation/GetVersion/
Success
Parameters
URS Service
• UpdateInteraction
UpdateInteraction
Purpose
For URS
URL
• PUT /URSService/UpdateInteraction/
Request
Parameters
GetFAQObject
URL
• GET /OMResponse/GetFAQObject/
Parameters
Key ValueType Value Description Mandatory Unique Default
The
Id String true true
FAQObject Id
Success
Parameters
Error
FaultCode FaultString Description
Incorrect value for parameter {0},
204 Incorrect value for parameter
expected {1} but was {2}
510 {0} not found in database Record is not found in database
Data Segmentation
Important
Other Genesys applications such as ESJ or ChatServer don't currently support segmentation. This
article is relevant to users developing their own applications.
When segmentation is enabled, it allows the restriction of searches to a particular segment. Contact identification
also follows segmentation, identify on the same email address will create different contacts for different segments.
The segment is immutable—it is not possible to reassign the segment of a contact or an interaction. UCS also
prevents mixing segments—a contact created in segment "A" can't be associated with an interaction in segment
"B".
Accessing a contact or an interaction by its Id does not require a SubscriberId or Segment. UCS does not support
authentication so it's not possible to prevent a client with an Id from accessing data from a particular segment.
Filtering should be enforced on the application side. Note that SubscriberId/Segment is always a parameter and is
never returned to the client application, even when using wildcards.
When segmentation is disabled or if a segment is not provided, the value will default to "not-applicable".
UCS Options
• [subtenant]/enabled
• Default value—false
• [subtenant]/subscriberid-required
• Default value—true
• Description—Specifies whether SubscriberId is required for segmentation. If the parameter is missing, UCS rejects
the request.
Creating Segments
Segment are created dynamically on the General tab of the Transaction folder of a tenant. The segment's name
must follow this format:
ContactCenterSettings.<name>
and the segment's type should be Attribute. The example below shows the creation of a Support segment:
• [subtenant/enabled] = true
• [subtenant/subscriberid-required] = false
identifyContact1.setOtherFields(fields1);
Id = esp156Id1r1
Type = Response
AppName = UCS
AppType = UCS
Service = OMContacts
Method = IdentifyContact
Parameters =
FirstName [utf] = "Buffy"
LastName [utf] = "Summers"
EmailAddress [utf] = "buffy.summers@sunnydale.univ"
ContactIdList [utf] = "1000AE9YfdHYpsPK"
NumberOfContactsFound [int] = 0
ContactCreated [utf] = "true"
ContactId [utf] = "1000AE9YfdHYpsPK"
*/
identifyContact2.setOtherFields(fields2);
/*
11:03:45.722 Trc 21125 [SvcSrvW-3 ] RequestLogger <esp158Id3r3> Response:
Id = esp158Id3r3
Type = Response
AppName = UCS
AppType = UCS
Service = OMContacts
Method = IdentifyContact
Parameters =
FirstName [utf] = "Buffy"
LastName [utf] = "Summers"
EmailAddress [utf] = "buffy.summers@sunnydale.univ"
ContactIdList [utf] = "1000AE9YfdHYAPPq"
NumberOfContactsFound [int] = 0
ContactCreated [utf] = "true"
ContactId [utf] = "1000AE9YfdHYAPPq"
*/
Thread.sleep(1000); //Wait for Elasticsearch refresh, not needed when accessing data by Id or using identify requests
search.add(searchRequest);
contactListGet.setSearchCriteria(search);
Method = ContactListGet
Parameters =
TotalCount [int] = 1
PageSize [int] = 1
ContactData [lst] =
0 [lst] =
Id [utf] = "1000AE9YfdHYpsPK"
Attributes [lst] =
TenantId [int] = 101
FirstName [utf] = "Buffy"
CreatedDate [utf] = "2019-02-05T10:03:45.462Z"
LastName [utf] = "Summers"
ModifiedDate [utf] = "2019-02-05T10:03:45.462Z"
EmailAddress [utf] = "buffy.summers@sunnydale.univ"
HasNext [utf] = "FALSE"
*/
//SubscriberId is not mandatory to removing it will find both contacts, by default segment is set to "not-applicable"
contactListGet.setSubscriberId(null);
contactList = (EventContactListGet) ucsClient.request(contactListGet);
System.out.println("Finds both contacts:" + contactList);
//When segment is not required it is still possible to use it in regular queries including wildcard searches.
//Segment column is analysed in ES using Keyword analyser, it means it is possible to use path in segments.
//For example /emea/europe/france when inserting contacts and interactions making it possible to filter by /emea/europe/*
contactListGet.setSubscriberId(null);
searchRequest.setAttrValue("AttributeValues.FirstName:buffy AND Segment:Supp*");
contactList = (EventContactListGet) ucsClient.request(contactListGet);
System.out.println("Finds contact in Support segment:" + contactList);
//Interactions
RequestInsertInteraction insertInteraction = RequestInsertInteraction.create();
InteractionAttributes interactionAttributes = new InteractionAttributes();
interactionAttributes.setTenantId(tenantId);
interactionAttributes.setSubscriberId("Support");
interactionAttributes.setContactId(contactIdSupport);
interactionAttributes.setTypeId("Inbound");
interactionAttributes.setSubtypeId("InboundNew");
interactionAttributes.setCanBeParent(true);
interactionAttributes.setEntityTypeId(EntityTypes.EmailIn);
interactionAttributes.setMediaTypeId("email");
interactionAttributes.setStartDate(new Date());
interactionAttributes.setStatus(Statuses.New);
interactionAttributes.setSubject("Requesting assistance for customer billing");
insertInteraction.setInteractionAttributes(interactionAttributes);
searchIxn.add(searchIxnRequest);
interactionListGet.setSearchCriteria(searchIxn);
/*
14:38:27.686 Trc 21125 [SvcSrvW-7 ] RequestLogger <esp162Id7r7> Response:
Id = esp162Id7r7
Type = Response
AppName = UCS
AppType = UCS
Service = OMInteractions
Method = InteractionListGet
Parameters =
PageSize [int] = 1
InteractionData [lst] =
0 [lst] =
Id [utf] = "1000AE9YffYzRJYI"
*/
//Using ES JSON DSL, UCS takes care of wrapping segment constraint, query requests text highlighting that will in ES metadata
searchIxnRequest.setAttrValue("{\"query\":{\"wildcard\":{\"Text\":\"buff*\"}},\"highlight\":{\"fields\":{\"Text\":{}}}}");
ixnListGet = (EventInteractionListGet) ucsClient.request(interactionListGet);
System.out.println("Finds the interaction from the first contact:" + ixnListGet);
/* In below partial log, ES metadata found in ESQuery column contains the highlighted match of the wildcard query to substitute in a UI
15:00:36.979 Trc 21125 [SvcSrvW-8 ] RequestLogger <esp163Id7r8> Response:
Id = esp163Id7r8
Type = Response
AppName = UCS
AppType = UCS
Service = OMInteractions
Method = InteractionListGet
Parameters =
PageSize [int] = 1
InteractionData [lst] =
0 [lst] =
Id [utf] = "1000AE9Yfgd5qXCM"
Attributes [lst] =
AllAttributes [lst] =[]
ContactId [utf] = "1000AE9Yfgd4txXG"
...
ESQuery [lst] =
...
highlight [lst] =
//UCS ensures that it is not possible to associate a contact and an interaction in different segments
interactionAttributes.setSubscriberId("VIP");
Message error = ucsClient.request(insertInteraction);
System.out.println(error);
//FaultString = 10:03:46.162 Server: UCS Msg: Contact '1000AE9YfdHYpsPK on tenant 101/VIP' not found in database