1.2.5 • Published 2 years ago

videoengager-api v1.2.5

Weekly downloads
-
License
Unlicense
Repository
github
Last release
2 years ago

VideoEngager Javascript SDK

License Version TypeScript JavaScript NodeJS ReactJS AngularJS VueJS ReactNative Ionic Cordova Ember.js NextJS Nest.js vite

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

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

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

  • tenantId (required) - TYPE: string - Tennant ID
  • scheduleId (required) - TYPE: string - Schedule ID

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

NameTypeDescriptionNotes
tokenstringoptional
token_expirationnumberoptional

AuthenticatePartner400Response

Properties

NameTypeDescriptionNotes
errorstringoptional

CallbackObject

Properties

NameTypeDescriptionNotes
genesysCallbackObjectGenesysoptional
videoengagerCallbackObjectVideoengageroptional
icsCalendarDatastringics Data, can be downloaded as ics file, and then send as attachment in the mailoptional
emailSentbooleanwether notification email has been send to visitor or notoptional

CallbackObjectGenesys

Properties

NameTypeDescriptionNotes
scriptIdstringoptional
queueIdstringoptional
conversationCallbackObjectGenesysConversationoptional

CallbackObjectGenesysConversation

Properties

NameTypeDescriptionNotes
idstringdefault to undefined

CallbackObjectVideoengager

Properties

NameTypeDescriptionNotes
autoAnswerbooleandefault to undefined
customerIDstringoptional
namestringvisitor Namedefault to undefined
emailstringvisitor Emaildefault to undefined
phonestringvisitor Phonedefault to undefined
subjectstringsubjectdefault to undefined
meetingUrlstringVisitor Join Meeting URLdefault to undefined
codestringShort URL Code for generating short URLdefault to undefined
datenumberscheduled Timedefault to undefined
agentUrlstringAgent Meeting URL, Only Available upon creationoptional
createdstringCreated Atdefault to undefined
durationnumberDuration of callback in minutesdefault to undefined
scheduleIdstringscheduleIddefault to undefined
activebooleanwether this callback is active or canceleddefault to undefined

CallbackUpdateError

Properties

NameTypeDescriptionNotes
errorstringoptional

CallbackUpdateRequest

Properties

NameTypeDescriptionNotes
datestringDate to update callback to (ISO 8601 format), Note that date should be in the future and not more than 30 days from nowdefault to undefined

CallbacksList

Properties

NameTypeDescriptionNotes
dataArray<CallbackObject>optional
countnumberoptional
pagenumberoptional
pageSizenumberoptional
orderBystringoptional
ascnumberoptional

CreateCallbackRequest

Properties

NameTypeDescriptionNotes
preferedAgentstringused to add agent ID preferred routing, MUST exist if callbackOwned is True;optional
callbackOwnedbooleanused to give prefered Agent ownership of the callback, will not work without prefered Agent IDoptional
firstnamestringdefault to undefined
lastnamestringoptional
customer_emailstringdefault to undefined
creatorstringIdentify the creater of the scheduled meeting.optional
_customer_numberstringdefault to undefined
_desired_timestringdefault to undefined
veSubjectstringoptional
customer_subjectstringoptional
customerIDstringused to add custom customer ID Field to the callbackoptional
scriptIdstringused to add script ID to the callback (if not provided, default script in settings will be used)optional
queueIdstringused to add queue ID to the callback (if not provided, default script in settings will be used)optional

ExternalInteraction

Properties

NameTypeDescriptionNotes
eventTypestringoptional
requestUrlstringoptional
svInteractionIdstringoptional
tenantIdstringoptional
callerEmailstringoptional
pinstringoptional
reasonstringoptional
shortUrlstringoptional
callDurationnumberoptional
participantIdstringoptional
externalInteractionIdstringoptional
timestampnumberoptional

GetInteractionsForAgent200Response

Properties

NameTypeDescriptionNotes
dataArray<Interaction>optional
pagenumberoptional
pageSizenumberoptional
totalCountnumberoptional

Interaction

Properties

NameTypeDescriptionNotes
_idInteractionIdoptional
totalCallsnumberoptional
videoCallsnumberoptional
chatCallsnumberoptional
screenCallsnumberoptional
startnumberoptional
endnumberoptional
successCallsnumberoptional
unsuccessCallsnumberoptional
callsArray<string>optional
expandedRecordingsArray<object>optional
expandedCallsInteractionExpandedCallsoptional

InteractionExpandedCalls

Properties

NameTypeDescriptionNotes
foundArray<object>optional
notFoundArray<string>optional

InteractionId

Properties

NameTypeDescriptionNotes
interactionIdstringoptional
tenantstringoptional
agentIdstringoptional

TimeserieByAgent

Properties

NameTypeDescriptionNotes
_idTimeserieByAgentIdoptional
totalInteractionsnumberoptional
totalCallsnumberoptional
videoCallsnumberoptional
chatCallsnumberoptional
screenCallsnumberoptional
startnumberoptional
endnumberoptional
successCallsnumberoptional
unsuccessCallsnumberoptional
avgDurationnumberoptional

TimeserieByAgentId

Properties

NameTypeDescriptionNotes
timestampnumberoptional
tenantstringoptional
agentIdstringoptional

TimeserieByTenant

Properties

NameTypeDescriptionNotes
_idTimeserieByTenantIdoptional
totalInteractionsnumberoptional
totalCallsnumberoptional
videoCallsnumberoptional
chatCallsnumberoptional
screenCallsnumberoptional
startnumberoptional
endnumberoptional
successCallsnumberoptional
unsuccessCallsnumberoptional
avgDurationnumberoptional

TimeserieByTenantId

Properties

NameTypeDescriptionNotes
timestampnumberoptional
tenantstringoptional
1.2.5

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

0.2.2

2 years ago

0.0.6

2 years ago

0.0.2-alpha

2 years ago

0.0.1-alpha

2 years ago

1.0.0

2 years ago