Document toolboxDocument toolbox

CIM

1. Overview

Customer interaction managent module’s API documentation

1.1. Version information

Version : 1.0.0

1.2. License information

License : EF
License URL : http://www.expertflow.com/
Terms of service : null

1.3. URI scheme

Host : localhost:3000
Schemes : HTTP, HTTPS

1.4. Tags

  • Contacts : API for contacts in the system

  • Schema : API to change Contact object attributes

  • Mapping : API to define search criteria for contact

  • Interactions : APIs to load or save interactions against a contact

1.5. Consumes

  • application/json

1.6. Produces

  • application/json

2. Resources

2.1. Contacts

API for contacts in the system

2.1.1. Get Contacts by Name

GET /contacts/getContactByName/{name}
Description

Get the searched contacts from database

Parameters
TypeNameDescriptionSchema

Path

name
required

name of user that we want to find

string

Responses
HTTP CodeDescriptionSchema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path
/contacts/getContactByName/string
Example HTTP response
Response 200
{ }

2.1.2. Get contact by search term

POST /contacts/getContactsBySearchTerms
Description

Get list of contacts from database

Parameters
TypeNameDescriptionSchema

Body

search
optional

Search terms for the contact the we want to search. Any number of properties can be included here in search criteria

searchOptions

Responses
HTTP CodeDescriptionSchema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path
/contacts/getContactsBySearchTerms
Request body
{
  "phone" : "string",
  "first_name" : "string"
}
Example HTTP response
Response 200
{ }

2.1.3. Load more contacts

GET /contacts/loadMore/{last_id}
Description

Get the searched contacts from database

Parameters
TypeNameDescriptionSchema

Path

last_id
required

Id of the last contact object received in the list

string

Responses
HTTP CodeDescriptionSchema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path
/contacts/loadMore/string
Example HTTP response
Response 200
{ }

2.1.4. Get user with given ID

GET /contacts/{contact_id}
Parameters
TypeNameDescriptionSchema

Path

contact_id
required

ID of user that we want to find

string

Responses
HTTP CodeDescriptionSchema

200

User is found

contactObject

Example HTTP request
Request path
/contacts/string
Example HTTP response
Response 200
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}

2.1.5. Update user with give ID

PUT /contacts/{contact_id}
Parameters
TypeNameDescriptionSchema

Path

contact_id
required

ID of user that we want to find

string

Body

contact
optional

User with new values of properties

contactObject

Responses
HTTP CodeDescriptionSchema

200

User is updated

contactObject

Example HTTP request
Request path
/contacts/string
Request body
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}
Example HTTP response
Response 200
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}

2.1.6. Delete user with given ID

DELETE /contacts/{contact_id}
Parameters
TypeNameDescriptionSchema

Path

contact_id
required

ID of user that we want to find

string

Responses
HTTP CodeDescriptionSchema

200

User is deleted

contactObject

Example HTTP request
Request path
/contacts/string
Example HTTP response
Response 200
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}

2.1.7. Get list of Contacts

GET /getContactList
Description

Get list of contacts from database

Responses
HTTP CodeDescriptionSchema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path
/getContactList
Example HTTP response
Response 200
{ }

2.1.8. Create a new contact

POST /saveContact
Description

Create new contact in system

Parameters
TypeNameDescriptionSchema

Body

contact
optional

User that we want to create

contactObject

Responses
HTTP CodeDescriptionSchema

200

New user is created

contactObject

Produces
  • application/json

Example HTTP request
Request path
/saveContact
Request body
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}
Example HTTP response
Response 200
{
  "phone1" : "string",
  "first_name" : "string",
  "last_name" : "string"
}

2.2. Schema

API to change Contact object attributes

2.2.1. List attributes of Contact Object

GET /getSchema
Description

List all the attributes of contact object

Responses
HTTP CodeDescriptionSchema

200

Ok

schema

Produces
  • application/json

Example HTTP request
Request path
/getSchema
Example HTTP response
Response 200
{ }

2.2.2. Add a new Attribute to Contact Object

POST /saveSchema
Description

Add new attribute to contact object

Parameters
TypeNameDescriptionSchema

Body

schema
optional

Attribute name that we want to create

schemaObject

Responses
HTTP CodeDescriptionSchema

200

New attribute has been added for contact object

schemaObject

Produces
  • application/json

Example HTTP request
Request path
/saveSchema
Request body
{
  "label" : "string",
  "key" : "string",
  "type" : "string"
}
Example HTTP response
Response 200
{
  "label" : "string",
  "key" : "string",
  "type" : "string"
}

2.2.3. Update attribute with give ID

PUT /schema/{schema_id}
Parameters
TypeNameDescriptionSchema

Path

schema_id
required

ID of attribute that we want to delete

string

Body

schema
optional

User with new values of properties

schemaObject

Responses
HTTP CodeDescriptionSchema

200

User is updated

schemaObject

Example HTTP request
Request path
/schema/string
Request body
{
  "label" : "string",
  "key" : "string",
  "type" : "string"
}
Example HTTP response
Response 200
{
  "label" : "string",
  "key" : "string",
  "type" : "string"
}

2.2.4. Delete attribute with given ID

DELETE /schema/{schema_id}
Parameters
TypeNameDescriptionSchema

Path

schema_id
required

ID of attribute that we want to delete

string

Responses
HTTP CodeDescriptionSchema

200

User is deleted

No Content

Example HTTP request
Request path
/schema/string

2.3. Mapping

API to define search criteria for contact

2.3.1. Add condition to search criteria

POST /mapping
Description

Add condition to search criteria

Parameters
TypeNameDescriptionSchema

Body

mapping
optional

Attribute name that we want to create

searchCriteria

Responses
HTTP CodeDescriptionSchema

200

Condition’s been added in search criteria

searchConditions

Produces
  • application/json

Example HTTP request
Request path
/mapping
Request body
{
  "callVar" : "string",
  "callVariable" : "string",
  "key" : "string",
  "varNumber" : "string"
}
Example HTTP response
Response 200
{ }

2.3.2. Get defined search criteria

GET /mapping
Description

Get defined search criteria

Responses
HTTP CodeDescriptionSchema

200

Successfully

No Content

Produces
  • application/json

Example HTTP request
Request path
/mapping

2.3.3. Update condition with give ID

PUT /mapping/{id}
Parameters
TypeNameDescriptionSchema

Path

id
required

ID of the condition that we want to delete

string

Body

mapping
optional

condition with new values of properties

searchCriteria

Responses
HTTP CodeDescriptionSchema

200

condition is updated

searchCriteria

Example HTTP request
Request path
/mapping/string
Request body
{
  "callVar" : "string",
  "callVariable" : "string",
  "key" : "string",
  "varNumber" : "string"
}
Example HTTP response
Response 200
{
  "callVar" : "string",
  "callVariable" : "string",
  "key" : "string",
  "varNumber" : "string"
}

2.3.4. Delete condition with given ID

DELETE /mapping/{id}
Parameters
TypeNameDescriptionSchema

Path

id
required

ID of the condition that we want to delete

string

Responses
HTTP CodeDescriptionSchema

200

condition has been removed from search criteria

No Content

Example HTTP request
Request path
/mapping/string

2.4. Interactions

APIs to load or save interactions against a contact

2.4.1. Get List of interactions

GET /interactions/loadInteractions/{id}
Description

Get list of interactions for a specific contact from database

Parameters
TypeNameDescriptionSchema

Path

id
required

ID of the contact for which interactions need to be loaded

string

Responses
HTTP CodeDescriptionSchema

200

List retrieved successfully

interactions

Produces
  • application/json

Example HTTP request
Request path
/interactions/loadInteractions/string
Example HTTP response
Response 200
{
  "interactions" : [ {
    "type" : "string",
    "agentId" : "string",
    "start_time" : "string",
    "call_duration" : "string",
    "ivr_trail" : "string",
    "call_id" : "string",
    "call_disposition" : "string",
    "team_name" : "string",
    "csq" : "string",
    "interaction_type" : "string",
    "wrap_up" : "string"
  } ],
  "call_Id" : "string",
  "phone_number" : "string"
}

2.4.2. Add a new interaction to a contact

POST /interactions/updateOrSaveInteractionTree/{call_Id}
Description

Add new interaction to contact object

Parameters
TypeNameDescriptionSchema

Path

call_Id
required

ID of the contact for which interactions need to be loaded

string

Body

interactionObject
optional

condition with new values of properties

interactionData

Responses
HTTP CodeDescriptionSchema

200

Interaction object is created

interactionObject

Produces
  • application/json

Example HTTP request
Request path
/interactions/updateOrSaveInteractionTree/string
Request body
{
  "interaction" : {
    "type" : "string",
    "agentId" : "string",
    "start_time" : "string",
    "call_duration" : "string",
    "ivr_trail" : "string",
    "call_id" : "string",
    "call_disposition" : "string",
    "team_name" : "string",
    "csq" : "string",
    "interaction_type" : "string",
    "wrap_up" : "string"
  },
  "call_Id" : "string",
  "ani" : "string"
}
Example HTTP response
Response 200
{
  "type" : "string",
  "agentId" : "string",
  "start_time" : "string",
  "call_duration" : "string",
  "ivr_trail" : "string",
  "call_id" : "string",
  "call_disposition" : "string",
  "team_name" : "string",
  "csq" : "string",
  "interaction_type" : "string",
  "wrap_up" : "string"
}

3. Definitions

3.1. contactObject

NameDescriptionSchema

first_name
optional

Example : "string"

string

last_name
optional

Example : "string"

string

phone1
optional

Example : "string"

string

3.2. contacts

Type : < contactObject > array

3.3. interactionData

NameDescriptionSchema

ani
optional

Example : "string"

string

call_Id
optional

Example : "string"

string

interaction
optional

Example : "interactionObject"

interactionObject

3.4. interactionObject

NameDescriptionSchema

agentId
optional

Example : "string"

string

call_disposition
optional

Example : "string"

string

call_duration
optional

Example : "string"

string

call_id
optional

Example : "string"

string

csq
optional

Example : "string"

string

interaction_type
optional

Example : "string"

string

ivr_trail
optional

in case of IVR type of interaction
Example : "string"

string

start_time
optional

Example : "string"

string

team_name
optional

Example : "string"

string

type
optional

Example : "string"

string

wrap_up
optional

Example : "string"

string

3.5. interactions

NameDescriptionSchema

call_Id
optional

Example : "string"

string

interactions
optional

Example : [ "interactionObject" ]

< interactionObject > array

phone_number
optional

Example : "string"

string

3.6. schema

Type : < schemaObject > array

3.7. schemaObject

NameDescriptionSchema

key
optional

Example : "string"

string

label
optional

Example : "string"

string

type
optional

Example : "string"

string

3.8. searchConditions

Type : < searchCriteria > array

3.9. searchCriteria

NameDescriptionSchema

callVar
optional

Example : "string"

string

callVariable
optional

Example : "string"

string

key
optional

Example : "string"

string

varNumber
optional

Example : "string"

string

3.10. searchOptions

NameDescriptionSchema

first_name
optional

Example : "string"

string

phone
required

Example : "string"

string


On this page