Skip to main content

@wildix/wda-insights-client > CreateDashboardCommand

CreateDashboardCommand class

Creates a new dashboard with specified configuration.

Signature:

export declare class CreateDashboardCommand extends CreateDashboardCommand_base 

Extends: CreateDashboardCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { WdaInsightsClient, CreateDashboardCommand } from "@wildix/wda-insights-client"; // ES Modules import
// const { WdaInsightsClient, CreateDashboardCommand } = require("@wildix/wda-insights-client"); // CommonJS import
const client = new WdaInsightsClient(config);
const input = { // CreateDashboardInput
name: "STRING_VALUE", // required
description: "STRING_VALUE",
company: "STRING_VALUE",
user: "STRING_VALUE",
access: { // DashboardAccess
visibility: "explicit" || "organization",
grants: [ // DashboardGrantList
{ // DashboardGrant
permission: "view" || "edit", // required
principal: { // DashboardPrincipal Union: only one key present
userId: "STRING_VALUE",
groupId: "STRING_VALUE",
},
},
],
},
definition: { // DashboardDefinition
sheets: [ // DashboardSheetList
{ // DashboardSheet
id: "STRING_VALUE", // required
name: "STRING_VALUE", // required
visuals: [ // DashboardVisualsList // required
{ // DashboardVisual
id: "STRING_VALUE", // required
position: { // DashboardVisualGrid
x: Number("int"),
y: Number("int"),
w: Number("int"),
h: Number("int"),
},
component: "DOCUMENT_VALUE", // required
filter: { // ListConversationsFilter
id: [ // ListConversationsFilterIdList
{ // ConversationTarget Union: only one key present
call: { // CallConversationTarget
callId: "STRING_VALUE", // required
flowIndex: Number("int"), // required
},
conference: { // ConferenceConversationTarget
conferenceId: "STRING_VALUE", // required
},
chat: { // ChatConversationTarget
chatId: "STRING_VALUE", // required
},
},
],
entity: { // ListConversationsFilterEntity
call: true || false,
conference: true || false,
chat: true || false,
},
participants: [ // ListConversationsFilterParticipantList
{ // ListConversationsFilterParticipant Union: only one key present
email: "STRING_VALUE",
phone: "STRING_VALUE",
extension: "STRING_VALUE",
},
],
participantsToInclude: [
{// Union: only one key present
email: "STRING_VALUE",
phone: "STRING_VALUE",
extension: "STRING_VALUE",
},
],
participantsToExclude: [
{// Union: only one key present
email: "STRING_VALUE",
phone: "STRING_VALUE",
extension: "STRING_VALUE",
},
],
service: [ // ListConversationsFilterKeyword
"STRING_VALUE",
],
group: [
"STRING_VALUE",
],
department: [
"STRING_VALUE",
],
tag: [
"STRING_VALUE",
],
pbx: [
"STRING_VALUE",
],
trunk: "<ListConversationsFilterKeyword>",
queue: "<ListConversationsFilterKeyword>",
country: "<ListConversationsFilterKeyword>",
location: "<ListConversationsFilterKeyword>",
phases: [ // ListConversationsFilterPhases
"STRING_VALUE",
],
language: "<ListConversationsFilterKeyword>",
duration: { // ListConversationsFilterNumber
from: Number("int"),
to: Number("int"),
},
interaction: { // ListConversationsFilterInteraction
talkRatio: {
from: Number("int"),
to: Number("int"),
},
wordsPerMinute: {
from: Number("int"),
to: Number("int"),
},
interruptions: {
from: Number("int"),
to: Number("int"),
},
patience: { // ListConversationsFilterFloat
from: Number("float"),
to: Number("float"),
},
longestMonologue: {
from: Number("int"),
to: Number("int"),
},
longestCustomerStory: "<ListConversationsFilterNumber>",
},
recorded: true || false,
transcribed: true || false,
direction: { // ListConversationsFilterDirection
inbound: true || false,
outbound: true || false,
internal: true || false,
},
insights: [ // ListConversationsFilterInsightsList
{ // ListConversationsFilterInsight
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
match: "STRING_VALUE",
matchAny: [ // StringList
"STRING_VALUE",
],
},
],
channel: { // ListConversationsFilterChannel
sms: true || false,
whatsapp: true || false,
kite: true || false,
},
date: { // ListConversationsFilterDate Union: only one key present
absolute: { // ListConversationsFilterAbsoluteDate
from: "STRING_VALUE",
to: "STRING_VALUE",
timeZone: "STRING_VALUE",
},
predefined: { // ListConversationsFilterPredefinedDate
type: "THIS_QUARTER" || "THIS_MONTH" || "THIS_WEEK" || "TODAY" || "YESTERDAY" || "PREVIOUS_WEEK" || "PREVIOUS_MONTH" || "LAST_30_DAYS", // required
timeZone: "STRING_VALUE",
},
},
present: [ // ListConversationsFilterFieldsList
{ // ListConversationsFilterField Union: only one key present
direction: true || false,
service: true || false,
group: true || false,
department: true || false,
tag: true || false,
pbx: true || false,
trunk: true || false,
queue: true || false,
country: true || false,
location: true || false,
language: true || false,
projection: { // ListConversationsFilterProjectionField
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
},
},
],
absent: [
{// Union: only one key present
direction: true || false,
service: true || false,
group: true || false,
department: true || false,
tag: true || false,
pbx: true || false,
trunk: true || false,
queue: true || false,
country: true || false,
location: true || false,
language: true || false,
projection: {
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
},
},
],
},
},
],
filter: {
id: [
{// Union: only one key present
call: {
callId: "STRING_VALUE", // required
flowIndex: Number("int"), // required
},
conference: {
conferenceId: "STRING_VALUE", // required
},
chat: {
chatId: "STRING_VALUE", // required
},
},
],
entity: {
call: true || false,
conference: true || false,
chat: true || false,
},
participants: [
{// Union: only one key present
email: "STRING_VALUE",
phone: "STRING_VALUE",
extension: "STRING_VALUE",
},
],
participantsToInclude: [
{// Union: only one key present
email: "STRING_VALUE",
phone: "STRING_VALUE",
extension: "STRING_VALUE",
},
],
participantsToExclude: "<ListConversationsFilterParticipantList>",
service: "<ListConversationsFilterKeyword>",
group: "<ListConversationsFilterKeyword>",
department: "<ListConversationsFilterKeyword>",
tag: "<ListConversationsFilterKeyword>",
pbx: "<ListConversationsFilterKeyword>",
trunk: "<ListConversationsFilterKeyword>",
queue: "<ListConversationsFilterKeyword>",
country: "<ListConversationsFilterKeyword>",
location: "<ListConversationsFilterKeyword>",
phases: [
"STRING_VALUE",
],
language: "<ListConversationsFilterKeyword>",
duration: "<ListConversationsFilterNumber>",
interaction: {
talkRatio: "<ListConversationsFilterNumber>",
wordsPerMinute: "<ListConversationsFilterNumber>",
interruptions: "<ListConversationsFilterNumber>",
patience: {
from: Number("float"),
to: Number("float"),
},
longestMonologue: "<ListConversationsFilterNumber>",
longestCustomerStory: "<ListConversationsFilterNumber>",
},
recorded: true || false,
transcribed: true || false,
direction: {
inbound: true || false,
outbound: true || false,
internal: true || false,
},
insights: [
{
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
match: "STRING_VALUE",
matchAny: [
"STRING_VALUE",
],
},
],
channel: {
sms: true || false,
whatsapp: true || false,
kite: true || false,
},
date: {// Union: only one key present
absolute: {
from: "STRING_VALUE",
to: "STRING_VALUE",
timeZone: "STRING_VALUE",
},
predefined: {
type: "THIS_QUARTER" || "THIS_MONTH" || "THIS_WEEK" || "TODAY" || "YESTERDAY" || "PREVIOUS_WEEK" || "PREVIOUS_MONTH" || "LAST_30_DAYS", // required
timeZone: "STRING_VALUE",
},
},
present: [
{// Union: only one key present
direction: true || false,
service: true || false,
group: true || false,
department: true || false,
tag: true || false,
pbx: true || false,
trunk: true || false,
queue: true || false,
country: true || false,
location: true || false,
language: true || false,
projection: {
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
},
},
],
absent: [
{// Union: only one key present
direction: true || false,
service: true || false,
group: true || false,
department: true || false,
tag: true || false,
pbx: true || false,
trunk: true || false,
queue: true || false,
country: true || false,
location: true || false,
language: true || false,
projection: {
projectionId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
},
},
],
},
},
],
filter: "<ListConversationsFilter>",
},
};
const command = new CreateDashboardCommand(input);
const response = await client.send(command);
// { // CreateDashboardOutput
// dashboard: { // Dashboard
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// id: "STRING_VALUE", // required
// createdAt: "STRING_VALUE", // required
// createdBy: "STRING_VALUE", // required
// createdByName: "STRING_VALUE", // required
// updatedAt: "STRING_VALUE",
// metadata: { // DashboardMetadata
// predefined: true || false,
// removable: true || false,
// sortable: true || false,
// },
// access: { // DashboardAccess
// visibility: "explicit" || "organization",
// grants: [ // DashboardGrantList
// { // DashboardGrant
// permission: "view" || "edit", // required
// principal: { // DashboardPrincipal Union: only one key present
// userId: "STRING_VALUE",
// groupId: "STRING_VALUE",
// },
// },
// ],
// },
// definition: { // DashboardDefinition
// sheets: [ // DashboardSheetList
// { // DashboardSheet
// id: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// visuals: [ // DashboardVisualsList // required
// { // DashboardVisual
// id: "STRING_VALUE", // required
// position: { // DashboardVisualGrid
// x: Number("int"),
// y: Number("int"),
// w: Number("int"),
// h: Number("int"),
// },
// component: "DOCUMENT_VALUE", // required
// filter: { // ListConversationsFilter
// id: [ // ListConversationsFilterIdList
// { // ConversationTarget Union: only one key present
// call: { // CallConversationTarget
// callId: "STRING_VALUE", // required
// flowIndex: Number("int"), // required
// },
// conference: { // ConferenceConversationTarget
// conferenceId: "STRING_VALUE", // required
// },
// chat: { // ChatConversationTarget
// chatId: "STRING_VALUE", // required
// },
// },
// ],
// entity: { // ListConversationsFilterEntity
// call: true || false,
// conference: true || false,
// chat: true || false,
// },
// participants: [ // ListConversationsFilterParticipantList
// { // ListConversationsFilterParticipant Union: only one key present
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// ],
// participantsToInclude: [
// {// Union: only one key present
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// ],
// participantsToExclude: [
// {// Union: only one key present
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// ],
// service: [ // ListConversationsFilterKeyword
// "STRING_VALUE",
// ],
// group: [
// "STRING_VALUE",
// ],
// department: [
// "STRING_VALUE",
// ],
// tag: [
// "STRING_VALUE",
// ],
// pbx: [
// "STRING_VALUE",
// ],
// trunk: "<ListConversationsFilterKeyword>",
// queue: "<ListConversationsFilterKeyword>",
// country: "<ListConversationsFilterKeyword>",
// location: "<ListConversationsFilterKeyword>",
// phases: [ // ListConversationsFilterPhases
// "STRING_VALUE",
// ],
// language: "<ListConversationsFilterKeyword>",
// duration: { // ListConversationsFilterNumber
// from: Number("int"),
// to: Number("int"),
// },
// interaction: { // ListConversationsFilterInteraction
// talkRatio: {
// from: Number("int"),
// to: Number("int"),
// },
// wordsPerMinute: {
// from: Number("int"),
// to: Number("int"),
// },
// interruptions: {
// from: Number("int"),
// to: Number("int"),
// },
// patience: { // ListConversationsFilterFloat
// from: Number("float"),
// to: Number("float"),
// },
// longestMonologue: {
// from: Number("int"),
// to: Number("int"),
// },
// longestCustomerStory: "<ListConversationsFilterNumber>",
// },
// recorded: true || false,
// transcribed: true || false,
// direction: { // ListConversationsFilterDirection
// inbound: true || false,
// outbound: true || false,
// internal: true || false,
// },
// insights: [ // ListConversationsFilterInsightsList
// { // ListConversationsFilterInsight
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// match: "STRING_VALUE",
// matchAny: [ // StringList
// "STRING_VALUE",
// ],
// },
// ],
// channel: { // ListConversationsFilterChannel
// sms: true || false,
// whatsapp: true || false,
// kite: true || false,
// },
// date: { // ListConversationsFilterDate Union: only one key present
// absolute: { // ListConversationsFilterAbsoluteDate
// from: "STRING_VALUE",
// to: "STRING_VALUE",
// timeZone: "STRING_VALUE",
// },
// predefined: { // ListConversationsFilterPredefinedDate
// type: "THIS_QUARTER" || "THIS_MONTH" || "THIS_WEEK" || "TODAY" || "YESTERDAY" || "PREVIOUS_WEEK" || "PREVIOUS_MONTH" || "LAST_30_DAYS", // required
// timeZone: "STRING_VALUE",
// },
// },
// present: [ // ListConversationsFilterFieldsList
// { // ListConversationsFilterField Union: only one key present
// direction: true || false,
// service: true || false,
// group: true || false,
// department: true || false,
// tag: true || false,
// pbx: true || false,
// trunk: true || false,
// queue: true || false,
// country: true || false,
// location: true || false,
// language: true || false,
// projection: { // ListConversationsFilterProjectionField
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// },
// },
// ],
// absent: [
// {// Union: only one key present
// direction: true || false,
// service: true || false,
// group: true || false,
// department: true || false,
// tag: true || false,
// pbx: true || false,
// trunk: true || false,
// queue: true || false,
// country: true || false,
// location: true || false,
// language: true || false,
// projection: {
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// },
// },
// ],
// },
// },
// ],
// filter: {
// id: [
// {// Union: only one key present
// call: {
// callId: "STRING_VALUE", // required
// flowIndex: Number("int"), // required
// },
// conference: {
// conferenceId: "STRING_VALUE", // required
// },
// chat: {
// chatId: "STRING_VALUE", // required
// },
// },
// ],
// entity: {
// call: true || false,
// conference: true || false,
// chat: true || false,
// },
// participants: [
// {// Union: only one key present
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// ],
// participantsToInclude: [
// {// Union: only one key present
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// ],
// participantsToExclude: "<ListConversationsFilterParticipantList>",
// service: "<ListConversationsFilterKeyword>",
// group: "<ListConversationsFilterKeyword>",
// department: "<ListConversationsFilterKeyword>",
// tag: "<ListConversationsFilterKeyword>",
// pbx: "<ListConversationsFilterKeyword>",
// trunk: "<ListConversationsFilterKeyword>",
// queue: "<ListConversationsFilterKeyword>",
// country: "<ListConversationsFilterKeyword>",
// location: "<ListConversationsFilterKeyword>",
// phases: [
// "STRING_VALUE",
// ],
// language: "<ListConversationsFilterKeyword>",
// duration: "<ListConversationsFilterNumber>",
// interaction: {
// talkRatio: "<ListConversationsFilterNumber>",
// wordsPerMinute: "<ListConversationsFilterNumber>",
// interruptions: "<ListConversationsFilterNumber>",
// patience: {
// from: Number("float"),
// to: Number("float"),
// },
// longestMonologue: "<ListConversationsFilterNumber>",
// longestCustomerStory: "<ListConversationsFilterNumber>",
// },
// recorded: true || false,
// transcribed: true || false,
// direction: {
// inbound: true || false,
// outbound: true || false,
// internal: true || false,
// },
// insights: [
// {
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// match: "STRING_VALUE",
// matchAny: [
// "STRING_VALUE",
// ],
// },
// ],
// channel: {
// sms: true || false,
// whatsapp: true || false,
// kite: true || false,
// },
// date: {// Union: only one key present
// absolute: {
// from: "STRING_VALUE",
// to: "STRING_VALUE",
// timeZone: "STRING_VALUE",
// },
// predefined: {
// type: "THIS_QUARTER" || "THIS_MONTH" || "THIS_WEEK" || "TODAY" || "YESTERDAY" || "PREVIOUS_WEEK" || "PREVIOUS_MONTH" || "LAST_30_DAYS", // required
// timeZone: "STRING_VALUE",
// },
// },
// present: [
// {// Union: only one key present
// direction: true || false,
// service: true || false,
// group: true || false,
// department: true || false,
// tag: true || false,
// pbx: true || false,
// trunk: true || false,
// queue: true || false,
// country: true || false,
// location: true || false,
// language: true || false,
// projection: {
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// },
// },
// ],
// absent: [
// {// Union: only one key present
// direction: true || false,
// service: true || false,
// group: true || false,
// department: true || false,
// tag: true || false,
// pbx: true || false,
// trunk: true || false,
// queue: true || false,
// country: true || false,
// location: true || false,
// language: true || false,
// projection: {
// projectionId: "STRING_VALUE", // required
// fieldId: "STRING_VALUE", // required
// },
// },
// ],
// },
// },
// ],
// filter: "<ListConversationsFilter>",
// },
// },
// };