CIM
- Former user (Deleted)
- Former user (Deleted)
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
Type | Name | Description | Schema |
---|---|---|---|
Path | name | name of user that we want to find | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | List retrieved successfully |
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
Type | Name | Description | Schema |
---|---|---|---|
Body | search | Search terms for the contact the we want to search. Any number of properties can be included here in search criteria |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | List retrieved successfully |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | last_id | Id of the last contact object received in the list | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | List retrieved successfully |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | contact_id | ID of user that we want to find | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | User is found |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | contact_id | ID of user that we want to find | string |
Body | contact | User with new values of properties |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | User is updated |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | contact_id | ID of user that we want to find | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | User is deleted |
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 Code | Description | Schema |
---|---|---|
200 | List retrieved successfully |
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
Type | Name | Description | Schema |
---|---|---|---|
Body | contact | User that we want to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | New user is created |
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 Code | Description | Schema |
---|---|---|
200 | Ok |
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
Type | Name | Description | Schema |
---|---|---|---|
Body | schema | Attribute name that we want to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | New attribute has been added for contact object |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | schema_id | ID of attribute that we want to delete | string |
Body | schema | User with new values of properties |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | User is updated |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | schema_id | ID of attribute that we want to delete | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
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
Type | Name | Description | Schema |
---|---|---|---|
Body | mapping | Attribute name that we want to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | Condition’s been added in search criteria |
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 Code | Description | Schema |
---|---|---|
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
Type | Name | Description | Schema |
---|---|---|---|
Path | id | ID of the condition that we want to delete | string |
Body | mapping | condition with new values of properties |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | condition is updated |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | id | ID of the condition that we want to delete | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
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
Type | Name | Description | Schema |
---|---|---|---|
Path | id | ID of the contact for which interactions need to be loaded | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | List retrieved successfully |
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
Type | Name | Description | Schema |
---|---|---|---|
Path | call_Id | ID of the contact for which interactions need to be loaded | string |
Body | interactionObject | condition with new values of properties |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | Interaction object is created |
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
Name | Description | Schema |
---|---|---|
first_name | Example : | string |
last_name | Example : | string |
phone1 | Example : | string |
3.2. contacts
Type : < contactObject > array
3.3. interactionData
Name | Description | Schema |
---|---|---|
ani | Example : | string |
call_Id | Example : | string |
interaction | Example : |
3.4. interactionObject
Name | Description | Schema |
---|---|---|
agentId | Example : | string |
call_disposition | Example : | string |
call_duration | Example : | string |
call_id | Example : | string |
csq | Example : | string |
interaction_type | Example : | string |
ivr_trail | in case of IVR type of interaction | string |
start_time | Example : | string |
team_name | Example : | string |
type | Example : | string |
wrap_up | Example : | string |
3.5. interactions
Name | Description | Schema |
---|---|---|
call_Id | Example : | string |
interactions | Example : | < interactionObject > array |
phone_number | Example : | string |
3.6. schema
Type : < schemaObject > array
3.7. schemaObject
Name | Description | Schema |
---|---|---|
key | Example : | string |
label | Example : | string |
type | Example : | string |
3.8. searchConditions
Type : < searchCriteria > array
3.9. searchCriteria
Name | Description | Schema |
---|---|---|
callVar | Example : | string |
callVariable | Example : | string |
key | Example : | string |
varNumber | Example : | string |
3.10. searchOptions
Name | Description | Schema |
---|---|---|
first_name | Example : | string |
phone | Example : | string |
On this page