+ All Categories
Home > Documents > Cube QuickCall Client API.pdf

Cube QuickCall Client API.pdf

Date post: 07-Feb-2016
Category:
Upload: parag-kapoor
View: 15 times
Download: 0 times
Share this document with a friend
Popular Tags:
28
Dialer Client External Application Integration Document ©Cube Software Pvt Ltd. B-8, Sector-60 Noida, UP-201301 +91-120-4057100
Transcript
Page 1: Cube QuickCall Client API.pdf

Dialer Client External ApplicationIntegration Document

©Cube Software Pvt Ltd.B-8, Sector-60

Noida, UP-201301+91-120-4057100

Page 2: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 2

Table of Contents

1. Introduction..................................................................................................................... 32. Dialer Client Messaging Structure................................................................................4

2.1 Login Message:...........................................................................................................42.2 LogOut Message:........................................................................................................ 52.3 Break Start Message:.................................................................................................. 62.4 Break End Message:................................................................................................... 72.5 New Call Message...................................................................................................... 82.6 Close Call Message.....................................................................................................92.7 IVRSDATA.............................................................................................................. 102.8 Agent Popup Status...................................................................................................112.9 Server DateTime....................................................................................................... 122.10 Agent Soft Phone Commands................................................................................ 132.11 Extension Status......................................................................................................142.12 Manual pass............................................................................................................ 152.13 Agent Phone............................................................................................................162.14 VoiceFile Information............................................................................................ 17

3. Clink Overview..............................................................................................................183.1 Methods.....................................................................................................................18

3.1.1 Initialize Method............................................................................................... 183.1.2 Request Method.................................................................................................193.1.3 Send Method......................................................................................................20

3.2 Clink Property...........................................................................................................223.2.1 ClearSendData Property....................................................................................223.2.2 NodeDescription................................................................................................223.2.3 NodeDescriptionList() Property........................................................................223.2.4 NodeName Property.......................................................................................... 233.2.5 NodeNameList() Property.................................................................................233.2.6 NodeTotal Property........................................................................................... 233.2.7 ReceivedData() Property...................................................................................243.2.8 ReceivedDataTotal Property............................................................................. 243.2.9 SendData() Property.......................................................................................... 243.2.10 SendDataTotal Property..................................................................................253.2.11 Timeout Property.............................................................................................25

3.3 CLink Events.............................................................................................................263.3.1 DataReceived.....................................................................................................263.3.2 RequestReceived Event.....................................................................................27

Page 3: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 3

1. IntroductionThis document defines the messaging structure used between dialer client application andexternal third party application. The message structure can be transmitted via TCP socketor text file or CubeLink.dll file. In all the cases the structure remainsthe same. Theformat of the message as defined below.

<Message type>;<Parameter 1>;<Parameter 2>;<Parameter 3>;…..;<Parameter n>;<03>

For TCP and Text File Integration• Eachmessageis identifiedby Messagetype.• The numberof parameterpassedcanvary dependingon the messagetype andall are

compulsory fields.• Eachparameteris separatedby a semicolon‘ ;’• Eachmessageis terminatedby Hex value‘03’ to marktheendof messagestring.

For CubeLink integration• Themessagewill alwaysbesendto specificnode.• Eachmessageis identifiedby Messagetype.• The numberof parameterpassedcanvary dependingon the messagetype andall are

compulsory fields.

Page 4: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 4

2. Dialer Client Messaging Structure

2.1 Login Message:Start Dialer Client Application. A login for will appear. On successful login in dialerclient, the dialer client application will launch the third party application and pass thefollowing message string. The third party application on receiving the message string willget the agent login.

DialerClient

Login;[Agentid];[AgentName];[CampaignId];[LoggedinD ateTime]

SlNo

Message Data Type Possible Values Description

1 Login String Login Message Identifier2 AgentID String As defined in dialer database Agent ID of theagent who is

logged in as defined in PDManager3 AgentName String As defined in dialer database Name of the agent as defined in

PDManager4 CampaignID String As defined in dialer database Campaign ID in which the agent

logs in5 LoggedinDateTime String Date in DD MMM YYYY

HH:MM:SS formate.g: if the current date is26th Jun 2014 2:00 PMthen it is to be defined as26 Jun 2014 14:00:00

Server Login Date and Time

ExternalThird PartyApplication

Page 5: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 5

2.2 LogOut Message:Logout can be done on both the interface (dialer client as well as external third partyinterface). On logout the messaging will be as follows

LogOff;Error: .......

LogOff;Loggedoff

Logoff

Sl No Message Data Type Possible Values Description1 Logoff String Logoff Message Identifier

Sl No Message Data Type Possible Values Description1 LogOff String LogOff Message Identifier2 LoggedOff String LoggedOff Logoff successful3 Error:… String Error:<Err description> Logoff failure followed by

reason

Page 6: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 6

2.3 Break Start Message:On Break start the message will be as follows

Break

Break;Error: .....

Break;OK

Sl No Message Data Type Possible Values Description1 Break String Break .Message Identifier. Request

for Break from ExternalApplication

Sl No Message Data Type Possible Values Description1 Break String Break Message Identifier. Response

to Break Request2 OK String OK Request successful3 Error:… String Error:<Err Description> Request failure followed by

reason

Page 7: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 7

2.4 Break End Message:On Break End the message will be as follows

BreakEnd;OK

BreakEnd;Error ..

BreakEnd;OK

Sl No Message Data Type Possible Values Description1 BreakEnd String .Message Identifier. Request to

End Break from ExternalApplication

Sl No Message Data Type Possible Values Description1 BreakEnd String Message Identifier. Response

to BreakEnd Request2 OK String Request successful3 Error:… String Request failure followed by

reason

Page 8: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 8

2.5 New Call MessageWhen a new call will be pushed to agent from dialer then the following message will besent to the external third party application

NewCall;[PhoneId];[PhoneNo];[DateTime];[Identifier] ;[Attempt];[ForCampaignId];[StatusId];[AreaTimeGap];[SmdrRunning];[Priori ty]

SlNo

Message Data Type Possible Values Description

1 NewCall String Message Identifier.2 PhoneID String string (length=12) as

defined in dialerdatabase

PhoneID as in the database.It is always unique to thisnumber.

3 PhoneNo String Phone number of thecaller / called party

Phone Number of the calleron which the call isconnected.

4 DateTime String Date Time of Call5 Identifier String Unique number to

phoneid for acampaign

6 Attempt String Current attemptcount

Current Attempt count forthis number

7 ForCampaignID String Call for whichcampaignid. In caseof overflowcampaign thecampaigned willchange

For which campaign id thecall was dialed. In case ofoverflow campaign it will beover flow campaign id

8 StatusID String Call Statuis ID by defaultconnected.

9 AreaTimeGap String Time Zone difference asdefined in PDManager

10 SmdrRunning String True / False. Noaction to be done onthis value

Whether SMDR is running ornot.

11 Priority String 0 / 1 / 2.Priority for normal /urgent and call backscall

Priority of the call.

Page 9: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 9

2.6 Close Call MessageWhen ever a call is disposed via the third party application the following message has tobe passed to the dialer client. While closing the call there are 4 options available toexternal interface.

FreeMe;[Empty|Break|Logout|Manual];[DispositionCode];[CallBackDateTime];[MustbeTransferedToMe];[Remarks];[Follow up Number]

FreeMe;Error: ....

FreeMe;OK

SlNo

Message DataType

Possible Values Description

1 FreeMe String Message Identifier.

2 Empty|Break|Logout|Freeme|Manual

String EmptyFreeMeBreakLogoutManual

Empty or Freeme toclose the call and waitfor next callBreak – close thecurrent call and go onbreakLogout – Close the calland LogoutManual – only sets thevalue. Does not free theagent for next call.

3 DispositionCode String Call Disposition codeas defined inPDManager

4 CallBackDateTime String Call back date and time inDD MMM YYYYHH:MM:SS format

Call back preferencetime for current number

5 MustbeTransferedToMe String 1 / 0 1 – if call is to betransferred to sameagent else 0

6 Remarks String Any remakes enteredby agent.

7 Follow up Number String Follow up Number ifany. This feature isused only whenCallBackDateTime (# 4)had been provided.

Page 10: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 10

2.7 IVRSDATAThe message will be sent from dialer client to external interface just after the new callmessage. This packet will inform the third party application if any ivrs input had beenreceived including the CLIP and DNIS.

IVRSDATA;param1;param2;param3, …..

SlNo

Message Data Type Possible Values Description

1 IVRSDATA String Message Identifier.2 Param1,Param2,P

aram3,…..ParamN

String • CLI=<CLIP Obtained>• DNI=<DNIS Obtained>• INOUT=<INBOUND or

OUTBOUND CALL>• ClientID=<Client ID value in

Phonemst table in CubeDialerDatabase>

Param1, Param2 etc.can be any variablethat had beeninitialized in the IVRFlow for a campaign.This packet will alsoinclude CLIP andDNIS information.

Example:IVRSDATA;CLI=9910062020;DNI=1204057100;INOUT=OUTBOUND;Clientid=<StringValue>

Page 11: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 11

2.8 Agent Popup StatusThe message will be sent from dialer client to external interface when ever thereischange in agent extension status.

BusyCallState;[Duration];[DIAL|TALK|HOLD|WRAP]

SlNo

Message Data Type Possible Values Description

1 BusyCallState String Message Identifier.2 Duration String Duration since last state3 DIAL|TALK|HOLD|WRAP String TALK – when the agent is

connectedHOLD- when the agenthad put the called numberon HOLD.WRAP- when is in wrapup state and is about toclose the call.

Page 12: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 12

2.9 Server DateTimeTo request server date time the external application will have to pass follwong message todialer client application.

SerVerDateTime

SerVerDateTime;[DateTime]

SlNo

Message Data Type Possible Values Description

1 SerVerDateTime String .Message Identifier. Request forServerDateTime from ExternalApplication

SlNo

Message Data Type Possible Values Description

1 SerVerDateTime String Message Identifier. Response toServerDateTime Request

2 DateTime String DD MMM YYYYHH:MM:SS

Date Time in DD MMM YYYYHH:MM:SS (24 hours) Format.Example 26 JUN 2014 14:00:00

Page 13: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 13

2.10 Agent Soft Phone CommandsExternal application can have soft phone commands as well as we have in our dialerclient application. To control the features of soft phone flowing commands needs to bepassed to dialer client application.

AnswerCall;BlindTransfer;[DialString]CompleteTransfer;ConferenceCompleteTransfer;TransferDialCall;[DialString]

MakeCall;[DialString]DropCall;HoldCall;Redirect;[DialString]SetupTransfer;[DialString]UnHoldCall;

SlNo

Message Data Type Possible Values Description

1 AnswerCall String To answer a call from softphone

1 BlindTransfer;[DialString] String To transfer call call blindlyto some number orcampaign or agent.Destination is defined byDialString

1 CompleteTransfer;ConferenceString To conference a call fromsoft phone

1 CompleteTransfer;Transfer String To have supervisedtransfer in a call

1 MakeCall;[DialString] String To request a number to bedialed out. Destination isdefined in DialString

1 DropCall; String To drop or disconnect thecurrent call

1 HoldCall; String To put the caller on Hold.1 Redirect;[DialString] String To transfer the call along

with popup information toa agent or campaign.Destination is defined byDialString

1 SetupTransfer;[DialString] String Initiate supervised transferof a call. Destination isdefined by DialString

1 UnHoldCall; String Unhold the call if the callis put on Hold.

Page 14: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 14

2.11 Extension StatusThe message will be sent from dialer client to external interface. This willdisplay theactual status of the phone (example: IDLE, Offering, Talk, Disconnected,OnHold,etc.)

PortStatus;[AgentExtnState]

SlNo

Message Data Type Possible Values Description

1 PortStatus String Message Identifier.2 AgentExtnState String

Page 15: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 15

2.12 Manual passThe message will be sent from external interface to dialer client. This willopen up themanual pass form and provide the agent to request phone number for callingon urgentbasis. All calls made via manual pass will be recorded.

ManualPass

SlNo

Message Data Type Possible Values Description

1 ManualPass String Message Identifier.

Page 16: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 16

2.13 Agent PhoneThe message will be sent from external interface to dialer client. This willopen up thesoft agent phone pop on the screen and the agent will be able to handle thecalls via thisphone as well. After CTI integration this soft phone will be able tocontrol your physicalphone. All calls made via agent phone is equivalent that the calls are being phone throughphysical phone and no records are being maintained for this.

AgentPhone

SlNo

Message Data Type Possible Values Description

1 AgentPhone String Message Identifier.

Page 17: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 17

2.14 VoiceFile InformationThe message will be sent from Dialer Client to External interface. This will Notify theexternal application the name of the voice file that is created with this call. The packetshall be received when the call is connected and generally after PortStatus=Connectedpacket is received.

VoiceFile;[FileName]

SlNo

Message Data Type Possible Values Description

1 VoiceFile String Name of Voice File withoutFormat. External Applicationneeds to suffix .mp3 with thename of file received so thatit can be accessed overpredefined HTTP path.

Page 18: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 18

3. Clink Overview

The CLink control provides a powerful and easy-to-use communicationslink betweenWindows applications. Using the CLink control, you can send and receivedata betweendifferent applications running on the same machine or between threads within a singleapplication. The CLink control also allows you to process all data requests through onecentral location to minimize database or other data connections.

Note that the CManager control should be used to monitor the status of Visual Voiceactivity on one or more phone lines. The CManager control replaces the need to use theCLink control for monitoring and controlling CubeGlobalCall applications (that is,applications that contain the Voice control). You should use the CLink control to senddata or requests between applications, or to monitor and control applications that do notcontain a Voice control, such as the Order Status Server sample application.

3.1 Methods

3.1.1 Initialize MethodDescription Initializes the CLink control.Syntax object.Initialize(Key as string)Inputs Argument Default Property Description

Key String Required. Stringvalue to initialize theapplication.

Returns NoneRemarks If you created the Clink control in code (i.e., Dim CLink1 as New

CLink), use the Initialize method to bring the Link control to a runtimestate. If you created the CLink control by dropping it on a form, thecontrol is automatically initialized when the form is loaded, unless theAutoInitialize property is set to FALSE.

Example Dim CLink1 as New ClinkCLink1.Initialize(“key”)

Page 19: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 19

3.1.2 Request MethodDescription Sends data to another node, and waits for the target node to complete

processing before returning with data from the target node.Syntax object.RequestToNode, Subject, Data1, ... , DataNInputs Argument Default Property Description

ToNode - Required. String value indicatingthe node to which the request willbe sent.

Subject SendSubject Optional. String value indicatingthe subject of the request.

Data1,Data2, ... ,DataN.

SendData() Optional. String value(s)indicating data to send along withthe request. You can either placedata in the SendData() propertyarray or specify up to ten elementsas arguments. The advantage ofthe property array is it can containup to 255 elements.

-- SendDataTotal If you are sending data in theSendData() property array, youmust use SendDataTotal to specifythe number of elements in thearray. You don't need to set it ifyou use the method arguments(Data1, ..., Data10) or if you aren'tsending any data.

Retruns Property DescriptionReceivedData() An array containing data populated by the target

node.ReceivedDataTotal The total number of elements in the

ReceivedData() property array.Remarks This method makes a synchronous request to another node, either inthe

same application or in a different application. The method sends thedata and returns only after the target node has processed the request.The target node receives a RequestReceived event when the data issent. When the target node finishes processing, it can return data via itsown array specified by the SendData property. See theRequestReceived event for more information. If it refers to a node onthe local machine, only the node name is used (e.g. “SERVER1). Afterthis method returns, the ReceivedDataTotal property will contain thenumber of items returned by the target node. If the ClearSendDataproperty is True, the SendData property array elements areautomatically set to null. A Timeout error is returned if the request isnot processed before the period specified in the Timeout property. Anerror is generated if the target node sets the RequestReceived event's

Page 20: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 20

ReturnCode Parameter to a non-zero value. The error value, returnedby Visual Basic's Err Function, will be the value specified in theReturnCode parameter.

Example ‘Send a customer ID of 12345 to the node called SERVER1‘and wait for return dataOn Error Resume Next ‘handle errors belowLink1.Request "SERVER1", "Customer", 12345If Err = 0 Then ‘no error occurred‘All was received OK by server1

For I = 0 to Link1.ReceivedDataTotal - 1 ‘# of items returnedList1.AddItem Link1.ReceivedData(I) ‘display each item

Next IElse ‘an error occurred

List1.AddItem "Error receiving data" ‘display error messageEnd If

3.1.3 Send MethodDescription Sends data to another node and returns immediately.Syntax object.Send ToNode, Subject, Data1, ... , DataNInputs Argument Default Property Description

ToNode - Required. A case-sensitive stringvalue indicating the node to whichthe data will be sent.

Subject SendSubject Optional. String value indicatingthe subject of the data.

Data1,Data2, ... ,DataN.

SendData() Optional. String value(s)indicating data to send along withthe request. You can either placedata in the SendData() propertyarray or specify up to ten elementsas arguments. The advantage ofthe property array is it can containup to 255 elements.

-- SendDataTotal If you are sending data in theSendData() property array, youmust use SendDataTotal tospecify the number of elements inthe array. You don't need to set itif you use the method arguments(Data1, ..., Data10) or if you aren'tsending any data.

Returns Nothing

Remarks This method can be used to send data to another node, either in thesame application or in a different application. The method sends thedata and returns immediately. The target node receives a DataReceivedevent when the transfer of data is complete. If it refers to a node on thelocal machine, only the node name is used (e.g. “SERVER1). If the

Page 21: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 21

ClearSendData property is True, the SendData property array elementsare automatically set to null.

Example 'use the DataN arguments to send data to target node CLIENT1'with subject of CustomerLink1.Send "CLIENT1", "Customer", "Joe Jones",_"1000 Main St.", "Cambridge"

Page 22: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 22

3.2 Clink Property

3.2.1 ClearSendData PropertyDescription Specifies whether the SendData() property array and the

SendDataTotal property will be cleared after a Send or Request methodis complete. The default is True.

Syntax object.ClearSendData[= Boolean]Data Type Boolean

Setting DescriptionTrue The default. The SendData() property array will

automatically be cleared after each Send orRequest method.

False The SendData() property array will not becleared automatically.

Remarks Set this property to False if you plan to send the same data to multiplenodes. This way you do not have to repopulate the SendData() propertyarray after each method.The following table is a listing of validClearSendData property settings:

Example Link1.SendData(0) = "12345"Link1.SendDataTotal = 1Link1.ClearSendData = FalseFor I = 0 To Link1.NodeTotal – 1

Link1.SendToNode = NodeNameList(I)Link1.Send

Next

3.2.2 NodeDescriptionDescription A string that describes the node. The default is null.Syntax object.NodeDescription[ = string$]Data Type StringRemarks Use the NodeDescription property to describe the node for

informational purposes. The NodeName property contains the name ofthe node. The NodeDescription property string is limited to 129characters, and will be truncated at that length if you attempt to set it toa longer value.

Example Link1.NodeDescription = "Server node to process database requests"

3.2.3 NodeDescriptionList() PropertyDescription Returns the descriptions of all active nodes.Syntax object.NodeDescriptionList(index%)Data Type StringRemarks Use this property to retrieve a description of other active nodes. The

starting index is 0, and the number of entries is equal to the NodeTotalproperty.The name of each node described in the NodeDescription()

Page 23: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 23

property array is returned via the NodeNameList() property array.Example For I = 0 To Link1.NodeTotal – 1

List1.AddItem Link1.NodeNameList(I) & " " & Link1.NodeDescriptionList(I)Next I

3.2.4 NodeName PropertyDescription Specifies the name of the node.Syntax object.NodeName[ = string$]Data Type StringRemarks Use this property to specify a node name. This name must be unique

among all occurrences of the VLink control on the same machine. Alist of all currently active node names is returned via theNodeNameList() property array. If the NodeName is "" at design time,a unique node name will be generated and returned via the NodeNameproperty at run time. The format is VlinkN, where N is a unique nodeidentification number. The NodeName property string is limited to 32characters. If you attempt to set it to a longer value, it will be truncatedat 32 characters and a runtime error will be returned. If you specify anode name already used by another VLink control, a runtime error willbe generated.

Example Link1.NodeName = "SERVER1"

3.2.5 NodeNameList() PropertyDescription Returns a list of node names for all active nodes.Syntax object.NodeNameList(index%)Data Type StringRemarks Use this property to retrieve the node name of another active node. The

starting index is 0, and the number of entries is equal to the NodeTotalproperty.

Example For I = 0 To Link1.NodeTotal – 1List1.AddItem Link1.NodeNameList(I) & " " & Link1.NodeDescriptionList(I)

Next I

3.2.6 NodeTotal PropertyDescription Returns the total number of active nodes in the system.Syntax object.NodeTotalData Type IntegerRemarks Use this property to retrieve the total number of nodes. As nodes are

created and deleted, this number will change appropriately. Themaximum number of nodes is 255.

Example For I = 0 To Link1.NodeTotal – 1List1.AddItem Link1.NodeNameList(I) & " " & Link1.NodeDescriptionList(I)

Next I

Page 24: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 24

3.2.7 ReceivedData() PropertyDescription Returns an array of strings sent from another node.Syntax object.ReceivedData(index%)Data Type VariantRemarks Use this property to retrieve the data sent from another active node.

When another node sends data (via a Request or Send method), itsSendData() property array is copied to the target node's ReceivedData()property array. The starting index is 0 and the number of items receivedis returned in the ReceivedDataTotal property.When data is sent fromanother control, via a Send or Request method, a DataReceived eventor a RequestReceived event is triggered in the receiving node,respectively. Note, however, that data returned in response to anothernode's request will not trigger an event in the requesting node.

Example Sub Link1_DataReceived (FromNode As String, Subject As String)Text1.Text = FromNode 'display where the data came from

Select Case SubjectCase "Customer" 'display data

For I = 0 to Link1.ReceivedDataTotal – 1 'number of itemsList1.AddItem Link1.ReceivedData(I) 'display each item

Next ICase "Update" 'update data

Customers.EditCustomer("Name") = Link1.ReceivedData(0)Customers.Update

End SelectEnd Sub

3.2.8 ReceivedDataTotal PropertyDescription Returns the number of items in the ReceivedData() property array

when another node sends or returns data. This property is read-only.Syntax object.ReceivedDataTotalData Type IntegerRemarks This property is copied from the requesting or sending node's

SendDataTotal property.Example For I = 0 to Link1.ReceivedDataTotal - 1 'number of items

List1.AddItem Link1.ReceivedData(I) 'display each itemNext I

3.2.9 SendData() PropertyDescription Specifies an array of strings to send to another node.Syntax object.SendData(index%)Data Type VariantRemarks Use this property to send data to another active node. The starting

index is 0, and this array can contain up to 255 elements.Beforesending data, you must set the SendDataTotal property to the numberof elements you want to send.Any subsequent Send or Request methodwill send the data in the SendData() property to the node specified in

Page 25: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 25

the ToNode argument. The data will appear in the target node'sReceivedData() property array. In a RequestReceived event, if theReturnData Parameter is set to True, the SendData() property array willalso be sent to the requesting node.If the ClearSendData property is setto True, this array is automatically cleared after every Send or Requestmethod..

Example Link1.SendData(0) = "John Smith" 'fill SendData() propertyarrayLink1.SendData(1) = "1000 Main St."Link1.SendData(2) = "Cambridge"Link1.SendDataTotal = 3 'send 3 itemsLink1.Send "CLIENT1", "Customer" 'send data with subject Customer to target

'node CLIENT1

3.2.10 SendDataTotal PropertyDescription Specifies the number of elements in the SendData() property array to

send during a Send or Request method or when returning data in aRequestReceived event.

Syntax object.SendDataTotal[ = items%]Data Type IntegerRemarks When data is sent via a Send or Request method or returned via a

RequestReceived event, the SendDataTotal property will be copied tothe target node's ReceivedDataTotal property.

Example Link1.SendData(0) = "123" 'fill SendData() property arrayLink1.SendData(1) = "100"Link1.SendDataTotal = 2 'send 2 itemsLink1.Send "CLIENT1" 'send data to CLIENT1 target node

3.2.11 Timeout PropertyDescription Specifies the maximum number of seconds the a VLink Request

method will wait for the request to be processed.Syntax object.Timeout[ = setting%]Data Type IntegerRemarks The default Timeout value is 0, no timeout, which means the Request

method will wait until its request is processed. Valid range is 0 -32767.If the timeout expires before the request is processed, a vlTimeout erroris returned.

Example Link1.Timeout = 30 Wait 30 seconds for dataLink1.Request "SERVER1", "Customer", 12345

Page 26: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 26

3.3 CLink Events

3.3.1 DataReceivedDescription This event is triggered when another node has sent data via the Send

method and the data is now available at this node.Syntax Sub object_DataReceived(FromNode As String, Subject As String)Data Type IntegerRemarks The data is returned via the ReceivedData() property array. The

ReceivedDataTotal property returns the numbers of elements in theReceivedData() property array.If multiple nodes send data to the sameserver node (or one node sends multiple consecutive data items), thisevent will trigger once for the first request, and the second request willbe queued behind the first request. However, if the code you place inthis event yields control to another process (e.g., when you execute aVisual Basic DoEvents statement or a Visual Voice PlayFile method),then the events are not queued behind each other. As a result, the firstlines of code in the DataReceived event should copy the contents of theReceivedData() property array to a locally declared variable array,because the ReceivedData() property will be overwritten when thesecond DataReceived event is triggered. In this event, you should notexecute any code that would result in Visual Basic yielding control ofthe processor. For example, you should not execute any functions suchas Visual Basic's DoEvents()or any Visual Voice methods, unless youfirst save any information (e.g., FromNode, Subject, ReceivedData,ReceivedDataTotal) you might need after the function completes.The following table is a listing of the DataReceived event parameters:

Parameter DescriptionFromNode The name of the node that sent the dataSubject The subject of the received data. The source node

specified this via its SendSubject property.Example Sub Link1_DataReceived (FromNode As String, Subject As String)

Text1.Text = FromNode 'display where theSelect Case Subject 'data came fromCase "Customer" 'display data

For I = 0 to Link1.ReceivedDataTotal - 1 'number of itemsList1.AddItem Link1.ReceivedData(I) 'display each item

Next ICase "Update" 'update data

Customers.EditCustomer("Name") = Link1.ReceivedData(0)Customers.Update

End SelectEnd Sub

Page 27: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 27

3.3.2 RequestReceived EventDescription This event is triggered when another node has sent a request via the

Request method.Syntax Sub object_RequestReceived(FromNode As String, Subject As String,

ReturnData As Integer, ReturnCode As Integer)Data Type IntegerRemarks Any data accompanying a request can be read from the ReceivedData()

property array.To return data to the requesting node, populate theSendData() property array, set the SendDataTotal property to thenumber of elements in the SendData() property array, and set theReturnData Parameter to True.In this event, you should not execute anycode that would result in Visual Basic yielding control of the processor.For example, you should not execute any functions such as VisualBasic's DoEvents()or any Visual Voice methods, unless you first saveany information (e.g., FromNode, Subject, ReceivedData,ReceivedDataTotal) you might need after the function completes.Thefollowing table is a listing of the RequestReceived event parameters:

Parameter DescriptionFromNode The name of the node that made the request. If the

name includes a computer name (e.g.,“\\MYCOMPUTER\MYNODE”), then the node is onanother computer on the network.

Subject The subject of the received data. The source nodespecified this via its SendSubject property.

ReturnData A flag indicating that the data in the SendData()property array will be returned to the source node in itsReceivedData property array. If you want to returndata, you must set this parameter to True. You mustalso set the SendDataTotal property to the number ofelements to return. Set this parameter to False to notcopy the data. The default is False.

ReturnCode Specifies whether or not the request was processedsuccessfully. If processing was successful, leave thisparameter alone and the default of 0 will be used,indicating success. If processing was unsuccessful, setthis parameter to a value greater than zero and aruntime error will be generated in the source nodewhen its Request method completes. The errorgenerated in the source node will have a value equal tothe ReturnCode parameter.Data is returned if the ReturnData parameter is set,regardless of whether or not the ReturnCode parameteris zero.Codes greater than 26000 are recommended to avoidconflict with Visual Basic errors. The default is 0,

Page 28: Cube QuickCall Client API.pdf

Dialer Client External Application Integration Document

©Cube Software Pvt Ltd Page 28

indicating success.Example Sub Link1_RequestReceived (FromNode As String, Subject AsString, ReturnData As Integer,

ReturnCode As Integer)Select CaseSubject Case "Customer" 'Run BASIC code to get customer record based on ID

'sent. ReceivedData(0) contains the customer IDCustomer.Seek "=", Link1.ReceivedData(0)If Customer.NoMatch Then 'Send back an error

Link1.SendData(0) = "Record Not Found"ReturnData = FalseReturnCode = SOME_ERROR_CODELink1.SendDataTotal = 1

Else 'Send back the customer's recordLink1.SendData(0) = Customer("LastName")Link1.SendData(1) = Customer("FirstName")Link1.SendData(2) = Customer("Address")Link1.SendData(3) = Customer("City")Link1.SendData(4) = Customer("State")Link1.SendData(5) = Customer("Zip")Link1.SendDataTotal = 6ReturnData = True

End IfCase Else 'Insert code here to process other requests

End SelectEnd Sub


Recommended