videoengager-api v1.2.5
VideoEngager Javascript SDK
VideoEngager Javascript SDK - Javascript SDK for VideoEngager API
- API version: 1.0.0
- Package version: 1.2.5
The VideoEngager Javascript SDK implements the client-side libraries used by applications using VideoEngager API services. This SDK is distributed via:
Table of Contents
Installation
Install the package from npm:
npm install videoengager-api@latest --save
Browser
The package also works in the browser environment. The client is exposed as SmartVideoSdk
global variable when using from https://unpkg.com/videoengager-api@1.2.5/dist/browser/main.js
file.
<script src="https://unpkg.com/videoengager-api@1.2.5/dist/browser/main.js"></script>
<script>
var smartVideoSdk = SmartVideoSdk
</script>
You can also load VideoEngager Javascript SDK packages as script modules in browsers that support native ES modules.
<script type="module">
import * as smartVideoSdk from 'https://unpkg.com/videoengager-api@1.2.5/dist/esm/index.js';
</script>
Getting Started
Please follow the installation instruction and execute the following JS code:
var smartVideoSDK = require('videoengager-api');
const configuration = {
pak: '134124-5134123-52341-213',
basePath: 'https://prod.videoengager.com',
externalId: 'Home',
email: 'x@videoengager.com',
};
smartVideoSDK.initializeSmartVideoClient(configuration);
// .. do something with the client
initialization of the client generate token and store it to be used in all the requests. instead of generating accessToken using PAK and email, you can use your own accessToken.
var smartVideoSDK = require('videoengager-api');
const configuration = {
accessToken: 'yourAccessToken'
};
smartVideoSDK.initializeSmartVideoClient(configuration)
some of the requests are not required to be authenticated. to use the client without authentication, you can use the following code:
var smartVideoSDK = require('videoengager-api');
const configuration = {
basePath: 'https://prod.videoengager.com'
};
smartVideoSDK.initializeSmartVideoClient(configuration);
// .. do something with the client
Client API Reference
authentication
authenticatePartner
Authenticate Using Partner Access Key
This API will generate a token for the partner to use in the SDK
Requires Authentication: false
Parameters
- pak (required) - TYPE: string - Partner API Key
- externalId (required) - TYPE: string - External ID
email (required) - TYPE: string - partner email
const response = await smartVideoSDK.authentication.authenticatePartner({
pak,
externalId,
email
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<AuthenticatePartner200Response>
Example Response:
{ "token_expiration" : 0, "token" : "eyJhbGciOiJIUzI1NXssInR5cCI6IkpXVCJ9.eyJfaWQiOiI2M2UxODhlNFEcwTNjNTY4ODAzYTljZTYiLCJwYWsiOiJERVYyIiwiaWF0IjoxNjc1NzkwODI5LCJleHAiOjE2NzgzODI4Mjl9.wIz7qVBUaWMxfH-IDCSkSWWsmKtc2QYPQoHpLUtLlAM" }
callbacks
createCallback
Create New Genesys Callback
Notes. URL is required, transferID is needed if you want to be able to deactive it later, pin will not be applied if brokerage settings doesn\'t allow it, if code is not provided, code automatically will be generated.
Requires Authentication: true
Parameters
- createCallbackRequest (required) - TYPE: CreateCallbackRequest -
tenantId (required) - TYPE: string - Tennant ID
const response = await smartVideoSDK.callbacks.createCallback({
createCallbackRequest,
tenantId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbackObject>
Example Response:
{ "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }
deleteCallbackByConversationId
remove callback by conversation ID
used to deactive remove callback by conversation ID
Requires Authentication: true
Parameters
- tenantId (required) - TYPE: string - Tennant ID
conversationId (required) - TYPE: string - Conversation ID
const response = await smartVideoSDK.callbacks.deleteCallbackByConversationId({
tenantId,
conversationId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbackObject>
Example Response:
{ "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }
getCallbackByConversationId
Get Single Callback
used to retrieve callback by conversation id
Requires Authentication: true
Parameters
- tenantId (required) - TYPE: string - Tennant ID
conversationId (required) - TYPE: string - Conversation ID
const response = await smartVideoSDK.callbacks.getCallbackByConversationId({
tenantId,
conversationId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbackObject>
Example Response:
{ "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }
getTennantAvailability
Get Availablity of tennant for tennant
should return Object of dates strings with true or false
Requires Authentication: false
Parameters
- tenantId (required) - TYPE: string - Tennant ID
- numberOfDays (required) - TYPE: number - number of days to return
start (required) - TYPE: string - start date (Number, Date ISO String, or Date)
const response = await smartVideoSDK.callbacks.getTennantAvailability({
tenantId,
numberOfDays,
start
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<[{ key: string: number; }](#{ key: string: number; })>
Example Response:
{ "2023-02-13T15:59:22.684Z" : 1, "2023-02-13T16:59:22.684Z" : 1, "2023-02-13T17:59:22.684Z" : 0 }
getTennantCalendar
Get Calendar configuration of tennant
Calendar configuration of tennant can be set in Settings page
Requires Authentication: false
Parameters
tenantId (required) - TYPE: string - Tennant ID
const response = await smartVideoSDK.callbacks.getTennantCalendar({
tenantId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<string>
listCallbacks
List Callbacks for specific tennant.
Returns a list of callbacks for specific tenant and period with Server Side Pagination, Sorting and Filtering.
Requires Authentication: true
Parameters
- tenantId (required) - TYPE: string - Tenant ID
- from (required) - TYPE: string - start of the period
to (required) - TYPE: string - End of the period
preferedAgent - TYPE: string - filter result by preferred agent
- orderBy - TYPE: 'duration' | 'created' | 'date' | 'canceled'(#'duration' | 'created' | 'date' | 'canceled') - Order by (default is date)
- asc - TYPE: 0 | 1(#0 | 1) - Oder by ascending or descending
- pageSize - TYPE: number - Page size
- page - TYPE: number - Page number
- searchBy - TYPE: 'visitor.name' | 'visitor.email' | 'conversationId' | 'visitor.phone' | 'visitor.customerID'(#'visitor.name' | 'visitor.email' | 'conversationId' | 'visitor.phone' | 'visitor.customerID') - Search by specific field (will search in all fields if not specified)
- searchString - TYPE: string - Search string
- active - TYPE: boolean - Filter by active or inactive
- queueId - TYPE: string - Filter by queue
const response = await smartVideoSDK.callbacks.listCallbacks({
tenantId,
from,
to,
preferedAgent,
orderBy,
asc,
pageSize,
page,
searchBy,
searchString,
active,
queueId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbacksList>
Example Response:
{ "asc" : 1, "data" : [ { "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }, { "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }, { "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }, { "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }, { "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" } ], "count" : 52, "pageSize" : 100, "orderBy" : "date", "page" : 1 }
removeCallbackByScheduleId
remove callback by schedule ID
used to deactive remove callback by schedule ID
Requires Authentication: true
Parameters
const response = await smartVideoSDK.callbacks.removeCallbackByScheduleId({
tenantId,
scheduleId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbackObject>
Example Response:
{ "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }
updateCallbackByConversationId
Update Single Callback
used to update callback schedule time by conversation id
Requires Authentication: true
Parameters
- callbackUpdateRequest (required) - TYPE: CallbackUpdateRequest - callback object
- tenantId (required) - TYPE: string - Tennant ID
conversationId (required) - TYPE: string - Conversation ID
const response = await smartVideoSDK.callbacks.updateCallbackByConversationId({
callbackUpdateRequest,
tenantId,
conversationId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<CallbackObject>
Example Response:
{ "genesys" : { "queueId" : "a1731678-13f6-4ab0-ac6d-f82813b7abee", "scriptId" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "conversation" : { "id" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a" } }, "videoengager" : { "date" : 1676303962674, "code" : "k8DOH4", "subject" : "bla bla", "created" : "2023-02-13T15:59:22.684Z", "autoAnswer" : true, "active" : true, "meetingUrl" : "https://dev.videoengager.com/ve/k8DOH4", "duration" : 60, "phone" : "+971585194108", "customerID" : "950be2a3-65b7-461e-8ba2-f8fb62c2d95a", "name" : "Mamoun H", "agentUrl" : "https://dev.videoengager.com/ve/iqTF6W", "email" : "maamoon@callback.com", "scheduleId" : "82212b25-0976-2048-ed3e-6cb1fac47977" }, "emailSent" : true, "icsCalendarData" : "BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:adamgibbons/ics METHOD:REQUEST X-PUBLISHED-TTL:PT1H BEGIN:VEVENT UID:82212b25-0976-2048-ed3e-6cb1fac47977 SUMMARY:Video Meeting DTSTAMP:20230213T155700Z DTSTART:20230213T155900Z SEQUENCE:1 DESCRIPTION:Start your video meeting by opening URL in your browser URL:https://dev.videoengager.com/ve/k8DOH4 LOCATION:https://dev.videoengager.com/ve/k8DOH4 STATUS:CONFIRMED CREATED:20230213T155900Z ATTENDEE;RSVP=TRUE;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=Mamoun unde fined:mailto:maamoon@callback.com DURATION:PT60M END:VEVENT END:VCALENDAR" }
externalInteractions
externalInteractionId
Find external interactions by External Interaction Id
Returns the external interactions for the current authorised user\'s tenant for having the specified externalInteractionId.
Requires Authentication: true
Parameters
externalInteractionId (required) - TYPE: string - the interaction externalInteractionId
const response = await smartVideoSDK.externalInteractions.externalInteractionId({
externalInteractionId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<arrayExternalInteraction>
Example Response:
[ { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 }, { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 } ]
getExternalInteractions
Get external interactions for a given period.
Returns the external interactions for the current authorised user for a given time period.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
const response = await smartVideoSDK.externalInteractions.getExternalInteractions({
from,
to
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<arrayExternalInteraction>
Example Response:
[ { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 }, { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 } ]
svInteractionId
Find external interactions by SmartVideo Interaction Id
Returns the external interactions for the current authorised user\'s tenant for having the specified svInteractionId.
Requires Authentication: true
Parameters
svInteractionId (required) - TYPE: string - the interaction svInteractionId
const response = await smartVideoSDK.externalInteractions.svInteractionId({
svInteractionId
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<arrayExternalInteraction>
Example Response:
[ { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 }, { "svInteractionId" : "svInteractionId", "participantId" : "participantId", "reason" : "reason", "callDuration" : 0.8008281904610115, "pin" : "pin", "requestUrl" : "requestUrl", "shortUrl" : "shortUrl", "tenantId" : "tenantId", "eventType" : "eventType", "callerEmail" : "callerEmail", "externalInteractionId" : "externalInteractionId", "timestamp" : 6.027456183070403 } ]
interactions
getInteractionsForAgent
Get interactions.
Returns the interactions for the current authorised user for a given time period. The result is paginated.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
orderBy - TYPE: string - the field used for order the result, default is start
- asc - TYPE: number - ascending/descending the order. -1 for descending, 1 for ascending. default is ascending
- page - TYPE: number - The requested page of the paginated result. Default is 1 - the first page.
- pageSize - TYPE: number - Number of records per page of the paginated result. Default is 10.
- expandCalls - TYPE: boolean - Whether or not to return the preloaded call records for the interaction. Default is no.
- expandRecordings - TYPE: boolean - Whether or not to return the preloaded recordings data for the interaction. Default is no.
const response = await smartVideoSDK.interactions.getInteractionsForAgent({
from,
to,
orderBy,
asc,
page,
pageSize,
expandCalls,
expandRecordings
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<GetInteractionsForAgent200Response>
Example Response:
{ "data" : [ { "totalCalls" : 0, "chatCalls" : 1, "screenCalls" : 5, "unsuccessCalls" : 9, "expandedCalls" : { "found" : [ "{}", "{}" ], "notFound" : [ "notFound", "notFound" ] }, "videoCalls" : 6, "calls" : [ "calls", "calls" ], "start" : 5, "expandedRecordings" : [ "{}", "{}" ], "end" : 2, "_id" : { "interactionId" : "interactionId", "agentId" : "agentId", "tenant" : "tenant" }, "successCalls" : 7 }, { "totalCalls" : 0, "chatCalls" : 1, "screenCalls" : 5, "unsuccessCalls" : 9, "expandedCalls" : { "found" : [ "{}", "{}" ], "notFound" : [ "notFound", "notFound" ] }, "videoCalls" : 6, "calls" : [ "calls", "calls" ], "start" : 5, "expandedRecordings" : [ "{}", "{}" ], "end" : 2, "_id" : { "interactionId" : "interactionId", "agentId" : "agentId", "tenant" : "tenant" }, "successCalls" : 7 } ], "pageSize" : 2, "page" : 3, "totalCount" : 4 }
getInteractionsForTenant
Get interactions
Returns the interactions for the current authorised user\'s tenant for a given time period. The result is paginated.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
agent - TYPE: string - Filter the results for a specific agent, member of the tenant\'s organisation
- orderBy - TYPE: string - the field used for order the result, default is start
- asc - TYPE: number - ascending/descending the order. -1 for descending, 1 for ascending. default is ascending
- page - TYPE: number - The requested page of the paginated result. Default is 1 - the first page.
- pageSize - TYPE: number - Number of records per page of the paginated result. Default is 10.
- expandCalls - TYPE: boolean - Whether or not to return the preloaded call records for the interaction. Default is no.
- expandRecordings - TYPE: boolean - Whether or not to return the preloaded recordings data for the interaction. Default is no.
const response = await smartVideoSDK.interactions.getInteractionsForTenant({
from,
to,
agent,
orderBy,
asc,
page,
pageSize,
expandCalls,
expandRecordings
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<GetInteractionsForAgent200Response>
Example Response:
{ "data" : [ { "totalCalls" : 0, "chatCalls" : 1, "screenCalls" : 5, "unsuccessCalls" : 9, "expandedCalls" : { "found" : [ "{}", "{}" ], "notFound" : [ "notFound", "notFound" ] }, "videoCalls" : 6, "calls" : [ "calls", "calls" ], "start" : 5, "expandedRecordings" : [ "{}", "{}" ], "end" : 2, "_id" : { "interactionId" : "interactionId", "agentId" : "agentId", "tenant" : "tenant" }, "successCalls" : 7 }, { "totalCalls" : 0, "chatCalls" : 1, "screenCalls" : 5, "unsuccessCalls" : 9, "expandedCalls" : { "found" : [ "{}", "{}" ], "notFound" : [ "notFound", "notFound" ] }, "videoCalls" : 6, "calls" : [ "calls", "calls" ], "start" : 5, "expandedRecordings" : [ "{}", "{}" ], "end" : 2, "_id" : { "interactionId" : "interactionId", "agentId" : "agentId", "tenant" : "tenant" }, "successCalls" : 7 } ], "pageSize" : 2, "page" : 3, "totalCount" : 4 }
getSingleInteraction
Get single interaction with id.
Requires Authentication: true
Parameters
id (required) - TYPE: string - the interaction id
expandCalls - TYPE: boolean - Whether or not to return the preloaded call records for the interaction. Default is no.
- expandRecordings - TYPE: boolean - Whether or not to return the preloaded recordings data for the interaction. Default is no.
const response = await smartVideoSDK.interactions.getSingleInteraction({
id,
expandCalls,
expandRecordings
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<Interaction>
Example Response:
{ "totalCalls" : 0, "chatCalls" : 1, "screenCalls" : 5, "unsuccessCalls" : 9, "expandedCalls" : { "found" : [ "{}", "{}" ], "notFound" : [ "notFound", "notFound" ] }, "videoCalls" : 6, "calls" : [ "calls", "calls" ], "start" : 5, "expandedRecordings" : [ "{}", "{}" ], "end" : 2, "_id" : { "interactionId" : "interactionId", "agentId" : "agentId", "tenant" : "tenant" }, "successCalls" : 7 }
timeseries
getTimeseriesForAgentByDay
Get timeseries
Returns timeseries of activities for the current authorised user for a given time period calculated granulated by day. The result is in ascending order by time.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
const response = await smartVideoSDK.timeseries.getTimeseriesForAgentByDay({
from,
to
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<TimeserieByAgent>
Example Response:
{ "totalCalls" : 1, "chatCalls" : 5, "screenCalls" : 2, "unsuccessCalls" : 2, "videoCalls" : 5, "start" : 7, "end" : 9, "_id" : { "agentId" : "agentId", "tenant" : "tenant", "timestamp" : 0 }, "totalInteractions" : 6, "successCalls" : 3, "avgDuration" : 4.145608029883936 }
getTimeseriesForAgentByHour
Get timeseries
Returns the timeseries of activities for the current authorised user for a given time period calculated granulated by hour. The result is in ascending order by time.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
const response = await smartVideoSDK.timeseries.getTimeseriesForAgentByHour({
from,
to
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<TimeserieByAgent>
Example Response:
{ "totalCalls" : 1, "chatCalls" : 5, "screenCalls" : 2, "unsuccessCalls" : 2, "videoCalls" : 5, "start" : 7, "end" : 9, "_id" : { "agentId" : "agentId", "tenant" : "tenant", "timestamp" : 0 }, "totalInteractions" : 6, "successCalls" : 3, "avgDuration" : 4.145608029883936 }
getTimeseriesForTenantByDay
Get timeseries
Returns the timeseries of activities for the current authorised user\'s tenant for a given time period calculated granulated by day. The result is in ascending order by time.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
const response = await smartVideoSDK.timeseries.getTimeseriesForTenantByDay({
from,
to
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<TimeserieByTenant>
Example Response:
{ "totalCalls" : 1, "chatCalls" : 5, "screenCalls" : 2, "unsuccessCalls" : 2, "videoCalls" : 5, "start" : 7, "end" : 9, "_id" : { "tenant" : "tenant", "timestamp" : 0 }, "totalInteractions" : 6, "successCalls" : 3, "avgDuration" : 4.145608029883936 }
getTimeseriesForTenantByHour
Get timeseries
Returns the timeseries of activities for the current authorised user\'s tenant for a given time period calculated granulated by hour. The result is in ascending order by time.
Requires Authentication: true
Parameters
- from (required) - TYPE: number - start of the period
to (required) - TYPE: number - end of the period
const response = await smartVideoSDK.timeseries.getTimeseriesForTenantByHour({
from,
to
});
console.log(response.data); // response
Return Type
returns: AxiosPromise<TimeserieByTenant>
Example Response:
{ "totalCalls" : 1, "chatCalls" : 5, "screenCalls" : 2, "unsuccessCalls" : 2, "videoCalls" : 5, "start" : 7, "end" : 9, "_id" : { "tenant" : "tenant", "timestamp" : 0 }, "totalInteractions" : 6, "successCalls" : 3, "avgDuration" : 4.145608029883936 }
Objects Reference
AuthenticatePartner200Response
Properties
Name | Type | Description | Notes |
---|---|---|---|
token | string | optional | |
token_expiration | number | optional |
AuthenticatePartner400Response
Properties
Name | Type | Description | Notes |
---|---|---|---|
error | string | optional |
CallbackObject
Properties
Name | Type | Description | Notes |
---|---|---|---|
genesys | CallbackObjectGenesys | optional | |
videoengager | CallbackObjectVideoengager | optional | |
icsCalendarData | string | ics Data, can be downloaded as ics file, and then send as attachment in the mail | optional |
emailSent | boolean | wether notification email has been send to visitor or not | optional |
CallbackObjectGenesys
Properties
Name | Type | Description | Notes |
---|---|---|---|
scriptId | string | optional | |
queueId | string | optional | |
conversation | CallbackObjectGenesysConversation | optional |
CallbackObjectGenesysConversation
Properties
Name | Type | Description | Notes |
---|---|---|---|
id | string | default to undefined |
CallbackObjectVideoengager
Properties
Name | Type | Description | Notes |
---|---|---|---|
autoAnswer | boolean | default to undefined | |
customerID | string | optional | |
name | string | visitor Name | default to undefined |
string | visitor Email | default to undefined | |
phone | string | visitor Phone | default to undefined |
subject | string | subject | default to undefined |
meetingUrl | string | Visitor Join Meeting URL | default to undefined |
code | string | Short URL Code for generating short URL | default to undefined |
date | number | scheduled Time | default to undefined |
agentUrl | string | Agent Meeting URL, Only Available upon creation | optional |
created | string | Created At | default to undefined |
duration | number | Duration of callback in minutes | default to undefined |
scheduleId | string | scheduleId | default to undefined |
active | boolean | wether this callback is active or canceled | default to undefined |
CallbackUpdateError
Properties
Name | Type | Description | Notes |
---|---|---|---|
error | string | optional |
CallbackUpdateRequest
Properties
Name | Type | Description | Notes |
---|---|---|---|
date | string | Date to update callback to (ISO 8601 format), Note that date should be in the future and not more than 30 days from now | default to undefined |
CallbacksList
Properties
Name | Type | Description | Notes |
---|---|---|---|
data | Array<CallbackObject> | optional | |
count | number | optional | |
page | number | optional | |
pageSize | number | optional | |
orderBy | string | optional | |
asc | number | optional |
CreateCallbackRequest
Properties
Name | Type | Description | Notes |
---|---|---|---|
preferedAgent | string | used to add agent ID preferred routing, MUST exist if callbackOwned is True; | optional |
callbackOwned | boolean | used to give prefered Agent ownership of the callback, will not work without prefered Agent ID | optional |
firstname | string | default to undefined | |
lastname | string | optional | |
customer_email | string | default to undefined | |
creator | string | Identify the creater of the scheduled meeting. | optional |
_customer_number | string | default to undefined | |
_desired_time | string | default to undefined | |
veSubject | string | optional | |
customer_subject | string | optional | |
customerID | string | used to add custom customer ID Field to the callback | optional |
scriptId | string | used to add script ID to the callback (if not provided, default script in settings will be used) | optional |
queueId | string | used to add queue ID to the callback (if not provided, default script in settings will be used) | optional |
ExternalInteraction
Properties
Name | Type | Description | Notes |
---|---|---|---|
eventType | string | optional | |
requestUrl | string | optional | |
svInteractionId | string | optional | |
tenantId | string | optional | |
callerEmail | string | optional | |
pin | string | optional | |
reason | string | optional | |
shortUrl | string | optional | |
callDuration | number | optional | |
participantId | string | optional | |
externalInteractionId | string | optional | |
timestamp | number | optional |
GetInteractionsForAgent200Response
Properties
Name | Type | Description | Notes |
---|---|---|---|
data | Array<Interaction> | optional | |
page | number | optional | |
pageSize | number | optional | |
totalCount | number | optional |
Interaction
Properties
Name | Type | Description | Notes |
---|---|---|---|
_id | InteractionId | optional | |
totalCalls | number | optional | |
videoCalls | number | optional | |
chatCalls | number | optional | |
screenCalls | number | optional | |
start | number | optional | |
end | number | optional | |
successCalls | number | optional | |
unsuccessCalls | number | optional | |
calls | Array<string> | optional | |
expandedRecordings | Array<object> | optional | |
expandedCalls | InteractionExpandedCalls | optional |
InteractionExpandedCalls
Properties
Name | Type | Description | Notes |
---|---|---|---|
found | Array<object> | optional | |
notFound | Array<string> | optional |
InteractionId
Properties
Name | Type | Description | Notes |
---|---|---|---|
interactionId | string | optional | |
tenant | string | optional | |
agentId | string | optional |
TimeserieByAgent
Properties
Name | Type | Description | Notes |
---|---|---|---|
_id | TimeserieByAgentId | optional | |
totalInteractions | number | optional | |
totalCalls | number | optional | |
videoCalls | number | optional | |
chatCalls | number | optional | |
screenCalls | number | optional | |
start | number | optional | |
end | number | optional | |
successCalls | number | optional | |
unsuccessCalls | number | optional | |
avgDuration | number | optional |
TimeserieByAgentId
Properties
Name | Type | Description | Notes |
---|---|---|---|
timestamp | number | optional | |
tenant | string | optional | |
agentId | string | optional |
TimeserieByTenant
Properties
Name | Type | Description | Notes |
---|---|---|---|
_id | TimeserieByTenantId | optional | |
totalInteractions | number | optional | |
totalCalls | number | optional | |
videoCalls | number | optional | |
chatCalls | number | optional | |
screenCalls | number | optional | |
start | number | optional | |
end | number | optional | |
successCalls | number | optional | |
unsuccessCalls | number | optional | |
avgDuration | number | optional |
TimeserieByTenantId
Properties
Name | Type | Description | Notes |
---|---|---|---|
timestamp | number | optional | |
tenant | string | optional |