IC.connect()

Connect to an Interaction Center® server

Usage

Hover over inputs/exits for more info.

var IC = require('machinepack-ic');


// Connect to an Interaction Center® server

IC.connect({

server: 'cic.acme.com',

applicationName: 'My Client Application',

userID: 'operator',

password: '1234',

protocol: 'https',

port: 8019,

marketPlaceApplicationLicenseName: 'ACME',

marketPlaceApplicationCode: '{{UUID}}',

language: 'en-US',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

missingProperty: function (result) {

 

},

invalidProperty: function (result) {

 

},

deprecatedResource: function (result) {

 

},

notAcceptingConnections: function (result) {

 

},

serverUnavailable: function (result) {

 

},

icws_error: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

server required

The Interaction Center server to connect to

'cic.acme.com'
applicationName required

Associate the given Application to a Session

'My Client Application'
userID required

The Interaction Center user ID to log in with

'operator'
password required

The Interaction Center password for the supplied user ID

'1234'
protocol

The protocol (http, https) to use to connect to the Interaction Center server

'https'
port

The Interaction Center port to connect to

8019
marketPlaceApplicationLicenseName

The Interactive Intelligence application's license name

'ACME'
marketPlaceApplicationCode

The Interactive Intelligence application code

'{{UUID}}'
language

The language to use with the Interaction Center server

'en-US'

Exits

error

An unexpected error occurred.

missingProperty
{ name: 'property_name', message: 'Human readable error text' }
invalidProperty
{ name: 'property_name', message: 'Human readable error text' }
deprecatedResource
{ name: 'resource_name', message: 'Human readable error text' }
notAcceptingConnections
{ alternateHosts: [ 'server1', 'server2' ],
  message: 'Human readable error text' }
serverUnavailable
{ alternateHosts: [ 'server1', 'server2' ],
  message: 'Human readable error text' }
icws_error
success

OK.

{ url: 'url to use',
  icserver: 'the connected Interaction Center server',
  id: '{{A session identifier}}',
  token: '{{A complex blob string}}',
  cookie: '{{A web cookie}}',
  alternateHosts: [ 'server1', 'server2' ],
  user: { id: 'userid', display: 'display name' },
  language: 'en-US' }