API Definition - My Country Mobile

API Definition, Flex can be actually a multi-channel contact center. We encourage quite a few stations out of the box and therefore are regularly adding additional. Due to version 1.0, we encourage that the Subsequent Indigenous stations:

Voice

SMS (no press )

Webchat

Facebook Messenger (no press )

What’s App

LINE (no press )

RCS (no press )

With all the job Channel Definition API you might also increase custom made stations and reevaluate the behavior of present kinds.

Measures to Bring a Personalized station

To Bring a Personalized station, you Ought to Make adjustments from These areas:

Insert a Personalized station in TaskRouter

Bring about the Custom Made station to be hauled into the broker

redefine the Method by Which the Custom Made station is left from the UI using Undertaking Channel Definition API

Undertaking Channel Definition API

All undertaking stations which Flex handles are all well defined and enrolled from the duty Channels API. Flex enrolls its default option undertaking Channel definitions (see under ), however, plugins and users may enroll their particular personal. Once task-based parts are left hand, the very first fitting station definition to get any particular endeavor is going to be properly used.

When there’s more than just 1 station definition game to get an endeavor, then the newest enrollee definition is going to be properly used. This lets one enroll an even more special channel definition to reevaluate the behavior of an overall 1.

The call back receives an activity within the debate and has to return boolean authentic in case that respect is also utilized to manage the specified undertaking.

At a job channel definition It’s Possible to define:

Call Back to Discover Which jobs are related

strings (templates) to Utilize in various Flex elements predicated on job standing

colors to Be Apply in activity listing predicated on job standing

icons to be revealed at activity listing tabs, along with canvases predicated on job standing

Customized elements to be inserted into endeavor established elements in case station is related

Customized elements should be substituted at activity establish elements in case station is related

Pre-defined undertaking Channels definitions are offered by means of My Country Mobile.Flex.DefaultTaskChannels items such as mention. Stations which are characterized by default:

Telephone – My Country Mobile.Flex.DefaultTaskChannels.Call

Speak – My Country Mobile.Flex.DefaultTaskChannels.Chat

SMS  Speak – My Country Mobile.Flex.DefaultTaskChannels.charms

Line Speak – My Country Mobile.Flex.DefaultTaskChannels.ChatLine

Messenger Speak – My Country Mobile.Flex.DefaultTaskChannels.ChatMessenger

What’s App Speak- My Country Mobile.Flex.DefaultTaskChannels.ChatWhatsApp

Default – My Country Mobile.Flex.DefaultTaskChannels.Default

It isn’t advisable to alter My Country Mobile.Flex.DefaultTaskChannels at perform. You have to produce your own personal definition and then enroll instead.

Channel Media Kind

Tasks might be the left base which websites sort they encourage. We’ve Got helper capabilities to specify Custom Made stations which encourage These media form:

Telephone – voice telephone established

speak – messaging predicated like web-chat, SMS, Facebook Messenger, etc..

Common – not any press

Producing Custom Made station definitions using assistant works

Flex includes got the subsequent helper works to produce station definitions together with default option worth for discussion, telephone, as well as also generic.

Speak station development together with default option templates:

Icon: series | React.ReactNode =”concept”, iconActive: series | React.ReactNode =”MessageBold”, shade: series = defaultChannelColors.chat): TaskChannelDefinition

Telephone station development with default option templates:

Telephone station definition utilizes callbacks to Fix the pub and colors (according to telephone condition and Vacation Destination to leave )

Common channel development with default option templates:

Icon: series | React.ReactNode =”GenericTask”, iconActive: series | React.ReactNode =”GenericTaskBold”, shade: series = defaultChannelColors.custom): TaskChannelDefinition

Registering custom made stations

To enroll a job channel definition utilize:

Flex.TaskChannels.register(expression: TaskChannelDefinition, mergeWithDefaultChannel = authentic );

You have to enroll your station definitions previous to Flex endings initializing.

As an instance:

(job ) => task.taskChannelUniqueName ===”discussion” &task.attributes.somethingSpecial ===”myCustom”); // may alter myOwnChatChannel Right Here Flex.TaskChannels.register(myOwnChatChannel);

Additional API capacities

Flex.TaskChannels.unregister(myOwnChatChannel); – to unregister formerly enrolled station

Flex.TaskChannels.getRegistered(); – to – Find everything enrolled job stations

Flex.TaskChannels.getForTask(job: It-ask ); – for Find a fitting job station definition to get a job

Entire port of TaskChannelDefinition

Give enum TaskChannelCapability undefined

export style TaskCallbackType = (

    undertaking: it-ask,

    componentType: React.ComponentType,. . undefined;

export kind TaskStatusBasedType =

    | TaskStatusBasedTypeBase;

export kind TaskChannelApplicableCb = (job: It-ask ) => boolean;

 

export style TaskChannelComponentRemoveRequest = undefined;

/ / **

 * Defines a project station *

 @export

 * @interface TaskChannelDefinition

 */

export port TaskChannelDefinition undefined

of Use cases

Including a Interface into habit station

MyCallChannel.addedComponents = [

undefined

];

Fixing a part (e.g. TaskInfoPanel or MessagingCanvas)

Const MyComponent = 

My Phone Task data Panel

;

MyCallChannel.replacedComponents = [

    undefined

];

Fixing a part conditionally

MyCallChannel.replacedComponents = [

undefined

];

Transform strings predicated on job kinds (e.g., for completion job button at the header):

myOwnChatChannel.templates.TaskCanvasHeader.endButton = undefined;

Getting Rid of a part conditionally (e.g., eliminate activity button in TaskListItem if job is still in condition”wrap”).

Voip providersVoip RoutesWholesale VoiceWholesale VoIP