Avaya Workspaces Widget Development Guide
Avaya Workspaces Widget Development Guide
Guide
Release 3.8.0
July 2021
____________________________________________________________________________________
Avaya Inc. Proprietary
this definition, “control” means the power to direct
the management and policies of such party, directly
or indirectly, whether through ownership of voting
securities, by contract or otherwise; and the terms
AVAYA SOFTWARE DEVELOPMENT KIT “controlling” and “controlled” have meanings
LICENSE AGREEMENT correlative to the foregoing.
THIS IS A LEGAL AGREEMENT 1.3 “Client Libraries” mean any enabler code
(“AGREEMENT”) BETWEEN YOU, specifically designated as such and included in a
INDIVIDUALLY, AND/OR THE LEGAL ENTITY SDK. Client Libraries may also be referred to as
FOR WHOM YOU ARE OPENING, INSTALLING, “DLLs”, and represent elements of the SDK required
DOWNLOADING, COPYING OR OTHERWISE at runtime to communicate with Avaya products or
USING THE AVAYA SOFTWARE other SDK elements.
DEVELOPMENT KIT (“SDK”) (COLLECTIVELY,
AS REFERENCED HEREIN, “YOU”, “YOUR”, OR 1.4 “Change In Control” shall be deemed to have
“LICENSEE”) AND AVAYA INC. OR ANY occurred if any person, entity or group comes to own
AVAYA AFFILIATE (COLLECTIVELY, or control, directly or indirectly, beneficially or of
“AVAYA”). IF YOU ARE ACCEPTING THE record, voting securities (or any other form of
TERMS AND CONDITIONS OF THIS controlling interest) which represent more than fifty
AGREEMENT ON BEHALF OF A LEGAL percent (50%) of the total voting power of the
ENTITY, YOU REPRESENT AND WARRANT Licensee.
THAT YOU HAVE FULL LEGAL AUTHORITY
TO ACCEPT ON BEHALF OF AND BIND SUCH
1.5 “Derivative Work(s)” means any translation
LEGAL ENTITY TO THIS AGREEMENT. BY
(including translation into other computer languages),
OPENING THE MEDIA CONTAINER, BY
port, compiling of Source Code into object code,
INSTALLING, DOWNLOADING, COPYING OR
combination with a pre-existing work, modification,
OTHERWISE USING THE AVAYA SOFTWARE
correction, addition, extension, upgrade,
DEVELOPMENT KIT (“SDK”) OR
improvement, compilation, abridgment or other form
AUTHORIZING OTHERS TO DO SO, YOU
in which an existing work may be recast, transformed
SIGNIFY THAT YOU ACCEPT AND AGREE TO
or adapted or which would otherwise constitute a
BE BOUND BY THE TERMS OF THIS
derivative work under the United States Copyright
AGREEMENT. IF YOU DO NOT HAVE SUCH
Act. Permitted Modifications will be considered
AUTHORITY OR DO NOT WISH TO BE BOUND
Derivative Works.
BY THE TERMS OF THIS AGREEMENT,
SELECT THE "DECLINE" BUTTON AT THE END
OF THE TERMS OF THIS AGREEMENT OR THE 1.6 “Documentation” includes programmer guides,
EQUIVALENT OPTION AND YOU SHALL CDs, manuals, materials, and information appropriate
HAVE NO RIGHT TO USE THE SDK. or necessary for use in connection with the SDK.
Documentation may be provided in machine-
readable, electronic or hard copy form.
1.0 DEFINITIONS.
1.7 “Intellectual Property” means any and all: (i)
1.1 “Affiliates” means any entity that is directly or
rights associated with works of authorship throughout
indirectly controlling, controlled by, or under
the world, including copyrights, neighboring rights,
common control with Avaya Inc. For purposes of
moral rights, and mask works, (ii) trademark and
____________________________________________________________________________________
Avaya Inc. Proprietary
trade name rights and similar rights, (iii) trade secret A. Provided Licensee pays to Avaya the
rights, (iv) patents, algorithms, designs and other applicable license fee (if any), Avaya hereby
industrial property rights, (v) all other intellectual and grants Licensee a limited, non-exclusive, non-
industrial property rights (of every kind and nature transferable license (without the right to
throughout the world and however designated) sublicense, except as set forth in 2.1B(iii))
whether arising by operation of law, contract, license, under the Intellectual Property of Avaya and, if
or otherwise, and (vi) all registrations, initial applicable, its licensors and suppliers to (i) use
applications, renewals, extensions, continuations, the SDK solely for the purpose of Licensee's
divisions or reissues thereof now or hereafter in force internal development efforts to develop
(including any rights in any of the foregoing). applications, interfaces, value-added services
and/or solutions, workflows or processes to
1.8 “Permitted Modification(s)” means Licensee’s work in conjunction with Avaya products; (ii)
modifications of the Sample Application Code as to package Client Libraries for redistribution
with Licensee’s complementary applications
needed to create applications, interfaces, workflows
that have been developed using this SDK,
or processes for use with Avaya products. subject to the terms and conditions set forth
herein; (iii) use Specification Documents solely
1.9 “Specification Document” means any notes or to enable Licensee’s products, services and
similar instructions in hard copy or machine readable application solutions to exchange messages and
form, including any technical, interface and/or signals with Avaya products, systems and
interoperability specifications that define the solutions to which the Specification
requirements and conditions for connection to and/or Document(s) apply; (iv) modify and create
interoperability with Avaya products, systems and Derivative Works of the Sample Application
solutions. Code, Specification Documents and
Documentation solely for internal development
1.10 “Source Code” means human readable or high- of applications, interfaces, workflows or
level statement version of software written in the processes for use with Avaya products,
source language used by programmers and includes integration of such applications, interfaces,
one or more programs. Source Code programs may workflows and processes with Avaya products
include one or more files, such as user interface and interoperability testing of the foregoing
markup language (.mxml), action script (.as), with Avaya products; and (v) compile or
precompiled Flash code (.swc), java script (.js), otherwise prepare for distribution the Sample
hypertext markup language (.html), active server Application Code with Permitted
pages (.asp), C# or C# .Net source code (.cs), java Modifications, into an object code or other
source code (.java), java server pages (.jsp), java machine-readable program format for
archives (.jar), graphic interchange format (.gif), distribution and distribute the same subject to
cascading style sheet (.css), audio files (.wav) and the conditions set forth in Section 2.1B.
extensible markup language (.xml) files.
B. The foregoing license to use Sample
1.11 “Sample Application Code” means Software Application Code is contingent upon the
provided for the purposes of demonstrating following: (i) Licensee must ensure that the
functionality of an Avaya product through the Avaya modifications made to the Sample Application
Software Development Kit. Code as permitted in clause (iv) of Section
2.1A are compatible and/or interoperable with
Avaya products and/or integrated therewith, (ii)
1.12 “Software” means data or information
Licensee may distribute Licensee’s application
constituting one or more computer or apparatus
that has been created using this SDK, provided
programs, including Source Code or in machine-
that such distribution is subject to an end user
readable, compiled object code form.
pursuant to Licensee’s current end user license
agreement (“Licensee EULA”) that is
2.0 LICENSE GRANT. consistent with the terms of this Agreement
and, if applicable, any other agreement with
2.1 SDK License. Avaya (e.g., the Avaya DevConnect Program
Agreement), and is equally as protective as
Licensee’s standard software license terms, but
____________________________________________________________________________________
Avaya Inc. Proprietary
in no event shall the standard of care be less thereto. Redistributions in binary form or other
than a reasonable degree of care, and (iii) suitable program format for distribution, to the extent
Licensee ensures that each end user who expressly permitted, must also reproduce Avaya’s
receives Client Libraries or Sample Application copyright, trademarks or other proprietary notices as
Code with Permitted Modifications has all incorporated in the SDK in any associated
necessary licenses for all underlying Avaya Documentation or “splash screens” that display
products associated with such Client Libraries Licensee copyright notices.
or Sample Application Code.
2.4 Third-Party Components. You acknowledge
Your Licensee EULA must include terms certain software programs or portions thereof
concerning restrictions on use, protection of included in the SDK may contain software distributed
proprietary rights, disclaimer of warranties, under third party agreements (“Third Party
and limitations of liability. You must ensure Components”), which may contain terms that expand
that Your End Users using applications, or limit rights to use certain portions of the SDK
interfaces, value-added services and/or (“Third Party Terms”). Information identifying the
copyright holders of the Third Party Components and
solutions, workflows or processes that
the Third Party Terms that apply is available in the
incorporate the API, Client Libraries, Sample
attached Schedule 1 (if any), SDK, Documentation,
Code or Permitted Modifications adhere to or on Avaya’s web site at:
these terms, and You agree to notify Avaya [Link] (or such
promptly if You become aware of any breach successor site as designated by Avaya). The open
of the terms of Licensee EULA that may source software license terms provided as Third Party
impact Avaya. You will take all reasonable Terms are consistent with the license rights granted in
precautions to prevent unauthorized access to this Agreement, and may contain additional rights
or use of the SDK and notify Avaya promptly benefiting You, such as modification and distribution
of any such unauthorized access or use. of the open source software. The Third Party Terms
shall take precedence over this Agreement, solely
with respect to the applicable Third Party
C. Licensee acknowledges and agrees that it is
Components, to the extent that this Agreement
licensed to use the SDK only in connection
imposes greater restrictions on You than the
with Avaya products (and if applicable, in
applicable Third Party Terms. Licensee is solely
connection with services provided by or on
responsible for procuring any necessary licenses for
behalf of Avaya).
Third Party Components, including payment of
licensing royalties or other amounts to third parties,
D. With respect to Software that contains for the use thereof.
elements provided by third party suppliers,
Licensee may install and use the Software in
2.5 Copies of SDK. Licensee may copy the SDK
accordance with the terms and conditions of the
only as necessary to exercise its rights hereunder.
applicable license agreements, such as
“shrinkwrap” or “click-through” licenses,
accompanying or applicable to the Software. 2.6a No Reverse Engineering. Licensee shall have no
rights to any Source Code for any of the software in
the SDK, except for the explicit rights to use the
2.2 No Standalone Product. Nothing in this
Source Code as provided to Licensee hereunder.
Agreement authorizes or grants Licensee any rights
Licensee agrees that it shall not cause or permit the
to distribute or otherwise make available to a third
disassembly, decompilation or reverse engineering of
party the SDK, in whole or in part, or any Derivative
the Software. Notwithstanding the foregoing, if the
Work in source or object code format on a standalone
SDK is rightfully located in a member state of the
basis other than the modifications permitted in
European Union and Licensee needs information
Section 2.1B of this Agreement.
about the Software in the SDK in order to achieve
interoperability of an independently created software
2.3 Proprietary Notices. Licensee shall not remove program with the Software in the SDK, Licensee will
any copyright, trade mark or other proprietary notices first request such information from Avaya. Avaya
incorporated in the copies of the SDK, Sample may charge Licensee a reasonable fee for the
Application Code and redistributable files in provision of such information. If Avaya refuses to
Licensee’s possession or control or any modifications make such information available, then Licensee may
____________________________________________________________________________________
Avaya Inc. Proprietary
take steps, such as reverse assembly or reverse Documentation is classified as "commercial computer
compilation, to the extent necessary solely in order to software documentation" or "commercial items,"
achieve interoperability of the Software in the SDK pursuant to FAR 12.212 or DFAR 227.7202, as
with an independently created software program. To applicable. Any use, modification, reproduction,
the extent that the Licensee is expressly permitted by release, performance, display or disclosure of the
applicable mandatory law to undertake any of the SDK or Documentation by the Government of the
activities listed in this section, Licensee will not United States shall be governed solely by the terms of
exercise those rights until Licensee has given Avaya the Agreement and shall be prohibited except to the
twenty (20) days written notice of its intent to extent expressly permitted by the terms of the
exercise any such rights. Agreement.
2.6.b License Restrictions. To the extent permissible 2.9 Limitation of Rights. No right is granted to
under applicable law, Licensee agrees not to: (i) Licensee to sublicense its rights hereunder. All rights
publish, sell, sublicense, lease, rent, loan, assign, not expressly granted are reserved by Avaya or its
convey or otherwise transfer the SDK; (ii) distribute, licensors or suppliers and, except as expressly set
disclose or allow use the SDK, in any format, through forth herein, no license is granted by Avaya or its
any timesharing service, service bureau, network or licensors or suppliers under this Agreement directly,
by any other means; (iii) distribute or otherwise use by implication, estoppel or otherwise, under any
the Software in the SDK in any manner that causes Intellectual Property right of Avaya or its licensors or
any portion of the Software that is not already subject suppliers. Nothing herein shall be deemed to
to an OSS License to become subject to the terms of authorize Licensee to use Avaya's trademarks or trade
any OSS License; (iv) link the Source Code for any names in Licensee's advertising, marketing,
of the software in the SDK with any software promotional, sales or related materials.
licensed under the Affero General Public License
(Affero GPL) v.3 or similar licenses; (v) access 2.10 Independent Development.
information that is solely available to root
administrators of the Avaya products, systems, and
2.10.1 Licensee understands and agrees that Avaya,
solutions; (vi) develop applications, interfaces, value-
Affiliates, or Avaya’s licensees or suppliers may
added services and/or solutions, workflows or acquire, license, develop for itself or have others
processes that causes adverse effects to Avaya and develop for it, and market and/or distribute
third-party products, services, solutions, such as, but
applications, interfaces, value-added services and/or
not limited to, poor performance, software crashes
solutions, workflows or processes similar to that
and cessation of their proper functions; and (vii)
which Licensee may develop. Nothing in this
develop applications, interfaces, value-added
Agreement shall restrict or limit the rights of Avaya,
services and/or solutions, workflows or processes that Affiliates, or Avaya’s licensees or suppliers to
blocks or delays emergency calls; (viii) emulate an commence or continue with the development or
Avaya SIP endpoint by form or user interface design
distribution of such applications, interfaces, value-
confusingly similar as an Avaya product ; (ix) reverse
added services and/or solutions, workflows or
engineer Avaya SIP protocol messages; or (x) permit
processes.
or encourage any third party to do any of (i) through
(x), inclusive, above.
2.10.2 Nonassertion by Licensee. Licensee agrees
not to assert any Intellectual Property related to the
2.7 Responsibility for Development Tools. Licensee
SDK or applications, interfaces, value-added services
acknowledges that effective utilization of the SDK
and/or solutions, workflows or processes developed
may require the use of a development tool, compiler using the SDK against Avaya, Affiliates, Avaya’s
and other software and technology of third parties, licensors or suppliers, distributors, customers, or
which may be incorporated in the SDK pursuant to
other licensees of the SDK.
Section 2.4. Licensee is solely responsible for
procuring such third party software and technology
and the necessary licenses, including payment of 2.11 Feedback and Support. Licensee agrees to
licensing royalties or other amounts to third parties, provide any information, comments, problem reports,
for the use thereof. enhancement requests and suggestions regarding the
performance of the SDK (collectively, “Feedback”)
via any public or private support mechanism, forum
2.8 U.S. Government End Users. The SDK shall be
or process otherwise indicated by Avaya. Avaya
classified as "commercial computer software" and the
____________________________________________________________________________________
Avaya Inc. Proprietary
monitors applicable mechanisms, forums, or severe physical or environmental damage ("high risk
processes but is under no obligation to implement any activities"). If Licensee uses the Avaya SDK for high
of Feedback, or be required to respond to any risk activities, Licensee does so at Licensee’s own
questions asked via the applicable mechanism, forum, risk and Licensee assumes all responsibility and
or process. Licensee hereby assigns to Avaya all liability for such use to the maximum extent such
right, title, and interest in and to Feedback provided limitation or exclusion is permitted by applicable law.
to Avaya. Licensee agrees that Avaya and its suppliers will not
be liable for any claims or damages arising from or
2.12(a) Fees and Taxes. To the extent that fees are related to use of the Avaya SDK for high risk
associated with the license of the SDK, Licensee activities to the maximum extent such limitation or
agrees to pay to Avaya or pay directly to the exclusion is permitted by law.
applicable government or taxing authority, if
requested by Avaya, all taxes and charges, including 2.15 No Virus. Licensee warrants that (i) the
without limitation, penalties and interest, which may applications, interfaces, value-added services and/or
be imposed by any federal, state or local solutions, workflows or processes Licensee develops
governmental or taxing authority arising hereunder using this SDK will not contain any computer
excluding, however, all taxes computed upon program file that includes time code limitations,
Avaya’s net income. If You move any Software, disabling devices, or any other mechanism which will
including the SDK, and as a result of such move, a prevent the Avaya product (including other software,
jurisdiction imposes a duty, tax, levy or fee firmware, hardware), services and networks from
(including withholding taxes, fees, customs or other being functional at all times (collectively “Time
duties for the import and export of any such Bombs”); and (ii) the applications, interfaces, value-
Software), then You are solely liable for, and agree to added services and/or solutions, workflows or
pay, any such duty, taxes, levy or other fees. processes Licensee develops using this SDK will be
free of computer viruses, malicious or other harmful
2.12(b) Audit. Avaya shall have the right, at its cost code, black boxes, malware, trapdoors, and other
and expense, to inspect and/or audit (i) by remote mechanisms which could: a) damage, destroy or
polling or other reasonable electronic means at any adversely affect Avaya product, or services and/or
time and (ii) in person during normal business hours end users; b) allow remote/hidden attacks or access
and with reasonable notice Licensee’s books, records, through unauthorized computerized command and
and accounts, to determine Licensee’s compliance control; c) spy (network sniffers, keyloggers), and d)
with this Agreement. In the event such inspection or damage or erase such applications, interfaces, value-
audit uncovers non-compliance with this Agreement, added services and/or solutions, workflows or
then without prejudice to Avaya’s termination rights processes developed using this SDK or data, or any
hereunder, Licensee shall promptly pay Avaya any computer files or systems of Avaya, Affiliates, and/or
applicable license fees. Licensee agrees to keep a end users (collectively “Virus”). In addition to any
current record of the location of the SDK. other remedies permitted in the Agreement, if
Licensee breaches its warranties under this Section,
Licensee will, at its expense, take remedial action to
2.13 No Endorsement. Neither the name Avaya,
eliminate any Time Bombs and/or Viruses and
Affiliates nor the names of contributors may be used
to endorse or promote products derived from the prevent re-occurrence (including implementing
appropriate processes to prevent further occurrences)
Avaya SDK without specific prior written permission
as well as provide prompt, reasonable assistance to
from Avaya.
Avaya to materially reduce the effects of the Time
Bomb and/or Virus.
2.14 High Risk Activities. The Avaya SDK is not
fault-tolerant, and is not designed, manufactured or
2.16 Disclaimer. Any software security feature is not
intended for use or resale as on-line control
a guaranty against malicious code, deleterious
equipment or in hazardous environments requiring
routines, and other techniques and tools employed by
failsafe performance, such as in the operation of
computer “hackers” and other third parties to create
nuclear facilities, aircraft navigation or aircraft
communications systems, mass transit, air traffic security exposures. Compromised passwords
control, medical or direct life support machines, represent a major security risk. Avaya encourages
You to create strong passwords using three different
dedicated emergency call handling systems or
character types, change Your password regularly and
weapons systems, in which the failure of the Avaya
refrain from using the same password regularly. You
SDK could lead directly to death, personal injury, or
____________________________________________________________________________________
Avaya Inc. Proprietary
must treat such information as confidential. You REDISTRIBUTABLE ON TERMS AND
agree to notify Avaya immediately upon becoming CONDITION NOT AGREED UPON BY
aware of any unauthorized use or breach of Your user AVAYA OR END USERS.
name, password, account, API Key, or other
credentials as provided by Avaya for use of the SDK, C. Subject to any confidentiality obligations,
or subscription. You are responsible for ensuring that trade secret or other rights or claims of Licensee
Your networks and systems are adequately secured suppliers, Licensee will respond to requests from
against unauthorized intrusion or attack and regularly Avaya or end users relating to Third Party
back up of Your data and files in accordance with Licensed Software associated with Licensee's use
good computing practices. of Third Party Licensed Software. Licensee will
cooperate in good faith by furnishing the relevant
2.17 Third Party Licensed Software information to Avaya or end users and the
requester within two (2) weeks from the time
A. “Commercial Third Party Licensed Software” Avaya or end user provided the request to
is software developed by a business with the Licensee.
purpose of making money from the use of that
licensed software. “Freeware Licensed 3. OWNERSHIP.
Software” is software which is made available
for use, free of charge and for an unlimited time, 3.1 As between Avaya and Licensee, Avaya or its
but is not Open Source Licensed Software. licensors or suppliers shall own and retain all
“Open Source Software" or "OSS" is as defined Intellectual Property rights, in and to the SDK and
by the Open Source Initiative (“OSI”) any corrections, bug fixes, enhancements, updates,
[Link] and is software improvements, or modifications thereto and Licensee
licensed under an OSI approved license as set hereby irrevocably transfers, conveys and assigns to
Avaya, its licensors and its suppliers all of its right,
forth at
title, and interest therein. Avaya or its licensors or
[Link] (or suppliers shall have the exclusive right to apply for or
such successor site as designated by OSI). These register any patents, mask work rights, copyrights,
are collectively referred to herein as “Third Party and such other proprietary protections with respect
Licensed Software”. thereto. Licensee acknowledges that the license
granted under this Agreement does not provide
B. Licensee represents and warrants that Licensee with title or ownership to the SDK, but only
Licensee, including any employee, contractor, a right of limited use under the terms and conditions
subcontractor, or consultant engaged by of this Agreement.
Licensee, is to the Licensee’s knowledge, in
compliance and will continue to comply with all 3.2 Grant Back License to Avaya. Licensee hereby
license obligations for Third Party Licensed grants to Avaya an irrevocable, perpetual, non-
Software used in the Licensee application created exclusive, sublicensable, royalty-free, fully paid up,
using the SDK including providing to end users worldwide license under any and all of Licensee's
all information required by such licenses as may Intellectual Property rights related to any Permitted
be necessary. LICENSEE REPRESENTS AND Modifications, to (i) use, make, sell, execute, adapt,
WARRANTS THAT, TO THE LICENSEE’S translate, reproduce, display, perform, prepare
KNOWLEDGE, THE OPEN SOURCE derivative works based upon, distribute (internally
LICENSED SOFTWARE EMBEDDED IN OR and externally) and sublicense the Permitted
PROVIDED WITH LICENSEE APPLICATION Modifications and their derivative works, and (ii)
OR SERVICES DOES NOT INCLUDE ANY sublicense others to do any, some, or all of the
OPEN SOURCE LICENSED SOFTWARE foregoing.
CONTAINING TERMS REQUIRING ANY
INTELLECTUAL PROPERTY OWNED OR 4.0 SUPPORT.
LICENSED BY AVAYA OR END USERS TO
BE (A) DISCLOSED OR DISTRIBUTED IN 4.1 No Avaya Support. Avaya will not provide any
SOURCE CODE OR OBJECT CODE FORM; support for the SDK provided under this Agreement
(B) LICENSED FOR THE PURPOSE OF or for any Derivative Works, including, without
MAKING DERIVATIVE WORKS; OR (C) limitation, modifications to the Source Code or
____________________________________________________________________________________
Avaya Inc. Proprietary
applications built by Licensee using the SDK. Avaya destroy the Confidential Information in Licensee’s
shall have no obligation to provide support for the possession or under its control, including
use of the SDK, or Licensee's application, services or Confidential Information on its computers, disks, and
solutions which may or may not include other digital storage devices upon termination of this
redistributable Client Libraries or Sample Agreement at any time and for any reason. Upon
Application Code, to any third party to whom request, Licensee will certify in writing its
Licensee delivers such applications, services or compliance with this Section. The obligations of
solutions. Avaya further will not provide fixes, confidentiality shall not apply to information which
patches or repairs for any defects that might exist in (a) has entered the public domain except where such
the SDK or the Sample Application Code provided entry is the result of Licensee's breach of this
under this Agreement. In the event that Licensee Agreement; (b) prior to disclosure hereunder was
desires support services for the SDK, and, provided already rightfully in Licensee's possession; (c)
that Avaya offers such support services (in its sole subsequent to disclosure hereunder is obtained by
discretion), Licensee will be required to enter into an Licensee on a non-confidential basis from a third
Avaya DevConnect Program Agreement or other party who has the right to disclose such information
support agreement with Avaya. to the Licensee; (d) is required to be disclosed
pursuant to a court order, so long as Avaya is given
4.2 Licensee Obligations. Licensee acknowledges adequate notice and the ability to challenge such
and agrees that it is solely responsible for developing required disclosure.
and supporting any applications, interfaces, value-
added services and/or solutions, workflows or 5.2 Press Releases. Any press release or publication
processes developed under this Agreement, including regarding this Agreement is subject to prior written
but not limited to (i) developing, testing and approval of Avaya.
deploying such applications, interfaces, value-added
services and/or solutions, workflows or processes; (ii) 6.0 NO WARRANTY.
configuring such applications, interfaces, value-added
services and/or solutions, workflows or processes to
The SDK and Documentation are provided “AS-IS”
interface and communicate properly with Avaya
without any warranty whatsoever. AVAYA
products; and (iii) updating and maintaining such SPECIFICALLY AND EXPRESSLY DISCLAIMS
applications, interfaces, value-added services and/or ANY WARRANTIES OR CONDITIONS,
solutions, workflows or processes as necessary for
STATUTORY OR OTHERWISE, INCLUDING
continued use with the same or different versions of
THE IMPLIED WARRANTIES OF
end user and/or third party licensor products, and
MERCHANTABILITY, FITNESS FOR A
Avaya products.
PARTICULAR PURPOSE, NONINFRINGEMENT
AND SATISFACTORY QUALITY. AVAYA DOES
5.0 CONFIDENTIALITY. NOT WARRANT THAT THE SDK AND
DOCUMENTATION ARE SUITABLE FOR
5.1 Protection of Confidential Information. Licensee LICENSEE'S USE, THAT THE SDK OR
acknowledges and agrees that the SDK and any other DOCUMENTATION ARE WITHOUT DEFECT OR
Avaya technical information obtained by it under this ERROR, THAT OPERATION WILL BE
Agreement (collectively, “Confidential Information”) UNINTERRUPTED, OR THAT DEFECTS WILL
is confidential information of Avaya. Licensee shall BE CORRECTED. FURTHER, AVAYA MAKES
take all reasonable measures to maintain the NO WARRANTY REGARDING THE RESULTS
confidentiality of the Confidential Information. OF THE USE OF THE SDK AND
Licensee further agrees at all times to protect and DOCUMENTATION. NEITHER AVAYA NOR
preserve the SDK in strict confidence in perpetuity, ITS SUPPLIERS MAKE ANY WARRANTY,
and shall not use such Confidential Information other EXPRESS OR IMPLIED, THAT THE SDK OR
than as expressly authorized by Avaya under this DOCUMENTATION IS SECURE, SECURITY
Agreement, nor shall Licensee disclose any THREATS AND VULNERABILITIES WILL BE
Confidential Information to third parties without DETECTED OR SOFTWARE WILL RENDER AN
Avaya's written consent. Licensee further agrees to END USER’S OR LICENSEE’S NETWORK OR
immediately 1) cease all use of all Confidential PARTICULAR NETWORK ELEMENTS SAFE
Information (including copies thereof) in Licensee's FROM INTRUSIONS AND OTHER SECURITY
possession, custody, or control; 2) stop reproducing BREACHES.
or distributing the Confidential Information; and 3)
____________________________________________________________________________________
Avaya Inc. Proprietary
7.0 CONSEQUENTIAL DAMAGES WAIVER. Licensee or Licensee’s application created by using
the SDK; (iii) the failure by Licensee or Licensee’s
EXCEPT FOR PERSONAL INJURY CLAIMS, application created by using the SDK to comply with
AVAYA SHALL NOT BE LIABLE FOR ANY the terms of this Agreement or any applicable laws;
INCIDENTAL, INDIRECT, SPECIAL OR (iv) the breach of any representation, or warranty
CONSEQUENTIAL DAMAGES IN CONNECTION made by Licensee herein; or (v) Licensee’s breach of
WITH, ARISING OUT OF OR RELATING TO any obligation under the Licensee EULA.
THIS AGREEMENT OR USE OF THE SDK, OR
FOR THE LOSS OR CORRUPTION OF DATA, 10.0 TERM AND TERMINATION.
INFORMATION OF ANY KIND, BUSINESS,
PROFITS, OR OTHER COMMERCIAL LOSS, 10.1 This Agreement will continue through
HOWEVER CAUSED, AND WHETHER OR NOT December 31st of the current calendar year. The
AVAYA HAS BEEN ADVISED OF THE Agreement will automatically renew for one (1) year
POSSIBILITY OF SUCH DAMAGE. terms, unless terminated as specified in Section 10.2
or 10.3 below.
8.0 LIMITATION OF LIABILITY.
10.2 Either party shall have the right to terminate the
EXCEPT FOR PERSONAL INJURY CLAIMS, IN Agreement, upon thirty (30) days written notice to
NO EVENT SHALL AVAYA'S TOTAL the other party.
LIABILITY TO LICENSEE IN CONNECTION
WITH, ARISING OUT OF OR RELATING TO 10.3 Notwithstanding language to the contrary,
THIS AGREEMENT EXCEED FIVE HUNDRED Avaya may terminate this Agreement immediately,
DOLLARS ($500). THE PARTIES AGREE THAT upon written notice to Licensee for breach of Section
THE LIMITATIONS SPECIFIED IN THIS 2 (License Grant), Section 5 (Confidentiality) or
SECTION WILL APPLY EVEN IF ANY LIMITED Section 12 (Compliance with Laws). Avaya may also
REMEDY PROVIDED IN THIS AGREEMENT IS terminate this Agreement immediately by giving
FOUND TO HAVE FAILED OF ITS ESSENTIAL written notice if a Change In Control should occur or
PURPOSE. if Licensee becomes insolvent, or voluntary or
involuntary proceedings by or against Licensee are
9.0 INDEMNIFICATION. instituted in bankruptcy or under any insolvency law,
or a receiver or custodian is appointed for Licensee,
Licensee shall indemnify and hold harmless Avaya, or proceedings are instituted by or against Licensee
Affiliates and their respective officers, directors, for corporate reorganization or the dissolution of
agents, suppliers, customers and employees Licensee, which proceedings, if involuntary, have not
“Indemnified Parties”) from and against all claims, been dismissed within thirty (30) days after the date
demand, suit, actions or proceedings (“Claims”) and of filing, or Licensee makes an assignment for the
damages, losses, liabilities, costs, expenses, and fees benefit of its creditors, or substantially all of the
(including fees of attorneys and other professionals) assets of Licensee are seized or attached and not
(“Damages”) based upon an allegation pertaining to released within sixty (60) days thereafter, or if
wrongful use, misappropriation, or infringement of a Licensee has ceased or threatened to cease to do
third party’s Intellectual Property right arising from business in the regular course.
or relating to Licensee’s use of the SDK, alone or in
combination with other software, such as operating 10.4 Upon termination or earlier termination of this
systems and codecs, and the, direct or indirect, use, Agreement, Licensee will immediately cease a) all
distribution or sale of any software, Derivative Works uses of the Confidential Information; b) Licensee
or other products (including but not limited to agrees to destroy all adaptations or copies of the
applications, interfaces, and application programming Confidential Information stored in any tangible
interfaces) developed utilizing the SDK. medium including any document or work containing
or derived (in whole or in part) from the Confidential
Licensee shall defend, indemnify and hold harmless Information, and certify its destruction to Avaya upon
the Indemnified Parties from and against all Claims termination of this License. Licensee will promptly
and Damages arising out of or related to: (i) personal cease use of, distribution and sales of Licensee
injury (including death); (ii) damage to any person or products that embody any such Confidential
tangible property caused, or alleged to be caused by Information, and destroy all Confidential Information
____________________________________________________________________________________
Avaya Inc. Proprietary
belonging to Avaya as well as any materials that best accomplish the objectives of the original
embody any such Confidential Information. All provision within the limits of applicable law.
licenses granted will terminate.
15.0 GOVERNING LAW AND DISPUTE
10.5 The rights and obligations of the parties RESOLUTION.
contained in Sections 2.3, 2.6, 2.7, 2.10, 2.11, 2.12, 3,
and 5 through 18 shall survive any expiration or 15.1 Governing Law. This Agreement and any
termination of this Agreement. dispute, claim or controversy arising out of or
relating to this Agreement (“Dispute”), including
11.0 ASSIGNMENT. without limitation the formation, interpretation,
breach or termination of this Agreement, or any issue
Avaya may assign all or any part of its rights and regarding whether a Dispute is subject to arbitration
obligations hereunder. Licensee may not assign this under this Agreement, will be governed by New York
Agreement or any interest or rights granted hereunder State laws, excluding conflict of law principles, and
to any third party without the prior written consent of the United Nations Convention on Contracts for the
Avaya. The term "assign" includes, but is not limited International Sale of Goods.
to, any transaction in which there is a Change In
Control or reorganization of Licensee pursuant to a 15.2 Dispute Resolution. Any Dispute will be
merger, sale of assets or stock. This Agreement shall resolved in accordance with the provisions of this
terminate immediately upon occurrence of any Section 15. The disputing party shall give the other
prohibited assignment. party written notice of the Dispute in accordance with
the notice provision of this Agreement. The parties
12.0 COMPLIANCE WITH LAWS. will attempt in good faith to resolve each controversy
or claim within 30 days, or such other longer period
Licensee shall comply with all applicable laws and as the parties may mutually agree, following the
regulations, including without limitation those delivery of such notice, by negotiations between
applicable to data privacy, intellectual property, trade
designated representatives of the parties who have
secret, fraud, music performance rights and the
dispute resolution authority.
export or re-export of technology and will not export
or re-export the SDK or any other technical 15.3 Arbitration of Non-US Disputes. If a Dispute
information provided under this Agreement in any that arose anywhere other than in the United States or
form in violation of the export control laws of the
is based upon an alleged breach committed anywhere
United States of America and of any other applicable
other than in the United States cannot be settled
country. For more information on such export laws
and regulations, Licensee may refer to the resources under the procedures and within the timeframe set
provided in the websites maintained by the U.S. forth in Section 15.2, it will be conclusively
Commerce Department, the U.S. State Department determined upon request of either party by a final and
and the U.S. Office of Foreign Assets Control. binding arbitration proceeding to be held in
accordance with the Rules of Arbitration of the
13.0 WAIVER. International Chamber of Commerce by a single
arbitrator appointed by the parties or (failing
The failure to assert any rights under this Agreement, agreement) by an arbitrator appointed by the
including, but not limited to, the right to terminate in President of the International Chamber of Commerce
the event of breach or default, will not be deemed to (from time to time), except that if the aggregate
constitute a waiver of the right to enforce each and claims, cross claims and counterclaims by any one
every provision of this Agreement in accordance with party against the other party exceed One Million US
their terms. Dollars at the time all claims, including cross claims
and counterclaims are filed, the proceeding will be
14.0 SEVERABILITY. held in accordance with the Rules of Arbitration of
the International Chamber of Commerce by a panel
If any provision of this Agreement is determined to of three arbitrator(s) appointed in accordance with the
be unenforceable or invalid, this Agreement will not Rules of Arbitration of the International Chamber of
be rendered unenforceable or invalid as a whole, and Commerce. The arbitration will be conducted in the
the provision will be changed and interpreted so as to
____________________________________________________________________________________
Avaya Inc. Proprietary
English language, at a location agreed by the parties order, and no bond or security of any kind will be
or (failing agreement) ordered by the arbitrator(s). required with respect to any such injunction or order.
The arbitrator(s) will have authority only to award
compensatory damages within the scope of the 15.6 Time Limit. Actions on Disputes between the
limitations of Section 8 and will not award punitive parties must be brought in accordance with this
or exemplary damages. The arbitrator(s) will not have Section within 2 years after the cause of action arises.
the authority to limit, expand or otherwise modify the
terms of this Agreement. The ruling by the 16.0 IMPORT/EXPORT CONTROL.
arbitrator(s)) will be final and binding on the parties
and may be entered in any court having jurisdiction Licensee is advised that the SDK is of U.S. origin and
over the parties or any of their assets. The parties will subject to the U.S. Export Administration
evenly split the cost of the arbitrator(s)’ fees, but Regulations (“EAR”). The SDK also may be subject
Avaya and Customer will each bear its own attorneys' to applicable local country import/export laws and
regulations. Diversion contrary to U.S. and/or
fees and other costs associated with the arbitration.
applicable local country law and/or regulation is
The parties, their representatives, other participants prohibited. Licensee agrees not to directly or
and the arbitrator(s) will hold the existence, content indirectly export, re-export, import, download, or
and results of the arbitration in strict confidence to transmit the SDK to any country, end user or for any
the fullest extent permitted by law. Any disclosure of use that is contrary to applicable U.S. and/or local
the existence, content and results of the arbitration country regulation or statute (including but not
will be as limited and narrowed as required to comply limited to those countries embargoed by the U.S.
with the applicable law. By way of illustration, if the government). Licensee represents that any
applicable law mandates the disclosure of the governmental agency has not issued sanctions against
monetary amount of an arbitration award only, the Licensee or otherwise suspended, revoked or denied
underlying opinion or rationale for that award may Licensee's import/export privileges. Licensee agrees
not be disclosed. not to use or transfer the SDK for any use relating to
nuclear, chemical or biological weapons, or missile
15.4 Choice of Forum for US Disputes. If a Dispute technology, unless authorized by the U.S. and/or any
by one party against the other that arose in the United applicable local government by regulation or specific
States or is based upon an alleged breach committed written license. Additionally, Licensee is advised that
in the United States cannot be settled under the the SDK may contain encryption algorithm or source
code that may not be exported to government or
procedures and within the timeframe set forth in
military end users without a license issued by the
Section 15.2, then either party may bring an action or
U.S. Bureau of Industry and Security and any other
proceeding solely in either the Supreme Court of the country’s governmental agencies, where applicable.
State of New York, New York County, or the United
States District Court for the Southern District of New
17.0 AGREEMENT IN ENGLISH.
York. Except as otherwise stated in Section 15.3 each
party consents to the exclusive jurisdiction of those
The parties confirm that it is their wish that the
courts, including their appellate courts, for the Agreement, as well as all other documents relating
purpose of all actions and proceedings arising out of hereto, including all notices, have been and shall be
or relating to this Agreement. drawn up in the English language only. Les parties
aux présentes confirment leur volonté que cette
convention, de même que tous les documents, y
compris tout avis, qui s'y rattachent, soient rédigés en
15.5 Injunctive Relief. Nothing in this Agreement
langue anglaise.
will be construed to preclude either party from
seeking provisional remedies, including, but not
18.0 ENTIRE AGREEMENT.
limited to, temporary restraining orders and
preliminary injunctions from any court of competent
This Agreement, its exhibits, schedules and other
jurisdiction in order to protect its rights, including its
agreements or documents referenced herein,
rights pending arbitration, at any time. The parties
constitute the full and complete understanding and
agree that the arbitration provision in Section 15.3 agreement between the parties and supersede all
may be enforced by injunction or other equitable contemporaneous and prior understandings,
____________________________________________________________________________________
Avaya Inc. Proprietary
agreements and representations relating to the subject
matter hereof. No modifications, alterations or
amendments shall be effective unless in writing
signed by both parties to this Agreement.
____________________________________________________________________________________
Avaya Inc. Proprietary
Contents
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 13
Annotating Strings .................................................................................................................38
Extracting Strings ..................................................................................................................40
Translating Strings.................................................................................................................41
Compiling Translations ..........................................................................................................41
Embedding Translations ........................................................................................................42
Implementing Right-to-Left Support .......................................................................................42
In Stylesheets ....................................................................................................................42
In JavaScript code .............................................................................................................43
Appendix I: Widget API Methods ...........................................................................................44
Constructor ............................................................................................................................44
onDataEvent(event, callback) ................................................................................................44
sendMessage(data, id) ..........................................................................................................45
sendNotification(level, message) ...........................................................................................45
getConfiguration() ..................................................................................................................45
getInteractionId() ...................................................................................................................48
getWorkCardCount() .............................................................................................................49
getInteractionData() ...............................................................................................................49
sendChatMessage(message) ................................................................................................49
validateRichMedia(media, richMediaType) ............................................................................50
sendRichMedia(media, richMediaType).................................................................................50
"text" richMessageType .....................................................................................................51
"image" richMessageType .................................................................................................51
"carousel" richMessageType ..............................................................................................51
"location" richMessageType ...............................................................................................52
"postback" richMessageType .............................................................................................52
Actions ...............................................................................................................................52
'postback' action.................................................................................................................53
'reply' action .......................................................................................................................53
'link' action .........................................................................................................................54
'locationRequest' action .....................................................................................................54
sendEmailMessage(emailData) .............................................................................................54
removeEmailAttachment(attachment) ....................................................................................55
reportChatTyping() ................................................................................................................55
startVoiceInteraction(address) ...............................................................................................56
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 14
acceptInteraction() .................................................................................................................56
holdInteraction() ....................................................................................................................56
unholdInteraction().................................................................................................................57
endInteraction() .....................................................................................................................57
singleStepTransfer(address) .................................................................................................57
consult(address, uui) .............................................................................................................57
endConsult() ..........................................................................................................................58
completeTransfer() ................................................................................................................58
completeConference() ...........................................................................................................58
getCapabilities() ....................................................................................................................59
setTransferToServicesList .....................................................................................................59
getDispositionCodes(channelType) .......................................................................................60
setDispositionCode(code)......................................................................................................60
getWorkCodes(channelType) ................................................................................................61
setWorkCode(code)...............................................................................................................62
getNotReadyReasonCodes() .................................................................................................62
getAdditionalWorkCodes() .....................................................................................................62
sendDTMF(digit)....................................................................................................................63
insertMessageIntoResponseArea(message) .........................................................................63
insertContentIntoEmailBody(encoding, content, subject) .......................................................64
createCustomCard(data) .......................................................................................................64
updateCustomCard(data) ......................................................................................................72
deleteCustomCard(data) .......................................................................................................76
createCustomStatePanel(data)..............................................................................................76
updateCustomStatePanel(data).............................................................................................78
deleteCustomStatePanel().....................................................................................................79
updateMenuItems(data, id) ....................................................................................................80
searchEnterpriseDirectory(text) .............................................................................................81
isEnterpriseContactsServiceAvailable() .................................................................................82
unregister ..............................................................................................................................82
startWork() ............................................................................................................................82
startWorkNotReady() .............................................................................................................82
setAgentReady() ...................................................................................................................83
setAgentACW() .....................................................................................................................83
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 15
finishWork() ...........................................................................................................................83
additionalWork(code).............................................................................................................83
setAgentNotReady(code) ......................................................................................................84
bidi(element)..........................................................................................................................84
forceReload().........................................................................................................................84
setFocus(interactionId) ..........................................................................................................84
getOverrideUrl().....................................................................................................................85
Appendix II: Widget API Events .............................................................................................86
onInteractionEvent.................................................................................................................86
onChannelStatusUpdateEvent ..............................................................................................87
onUserTypingEvent ...............................................................................................................87
onFileUploadEvent ................................................................................................................88
onEmailAttachmentUploadEvent ...........................................................................................89
onFileTransferInitiatedEvent ..................................................................................................90
onFileTransferCompleteEvent ...............................................................................................91
onInteractionEndedEvent ......................................................................................................93
onCRMDataEvent .................................................................................................................94
onContextDataEvent .............................................................................................................98
onMediaEvent .....................................................................................................................102
onMediaMessageEvent .......................................................................................................104
onPagePushUrlEvent ..........................................................................................................105
onAgentStateEvent..............................................................................................................106
onNavigationEvent ..............................................................................................................106
onLocaleUpdatedEvent .......................................................................................................107
onBeforeTextDirectionChangedEvent..................................................................................107
onStylesheetsReadyEvent...................................................................................................108
onObserveEvent..................................................................................................................108
onCapabilitiesEvent .............................................................................................................108
onRequestServicesEvent ....................................................................................................109
onMessageEvent .................................................................................................................109
onTeamMemberEvent .........................................................................................................109
onEnterpriseContactsReceivedEvent ..................................................................................113
onEnterpriseServiceAvailableEvent .....................................................................................114
onEnterpriseServiceUnavailableEvent .................................................................................114
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 16
onCustomCardDeletedEvent ...............................................................................................114
onCardFocusedEvent ..........................................................................................................115
onSSOTokenRefreshEvent .................................................................................................115
Appendix III: Examples .........................................................................................................116
Hello World Widget ..............................................................................................................116
Web Component Widget .....................................................................................................117
Prompted Digits ...................................................................................................................120
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 17
Chapter 1: Introduction
Purpose
This document describes how to create widgets for Avaya Workspaces and is applicable for
3.8.0 and 3.8.1 releases.
Intended audience
This document is intended for developers creating and hosting widgets for Avaya Workspaces.
Change history
Release Summary of changes
• Added the following Widget API methods:
o validateRichMedia
o sendRichMedia
• Added a new widgetId property to the custom card object
Release [Link] passed to the createCustomCard and
updateCustomCard methods
• Added a new custom-suggested-phrases sample widget to
demonstrate how an Agent can manage their own custom
suggested phrases.
• Added the following property to the button object returned by
createCustomCard or updateCustomCard method:
o customCardId
• Added the following Widget API methods:
o bidi
o setFocus
o getWorkCardCount
o getOverrideUrl
Release [Link]
• Added the following Widget API events:
o onBeforeTextDirectionChangedEvent
o onStylesheetsReadyEvent
o onCustomCardDeletedEvent
o onCardFocusedEvent
o onSSOTokenRefreshEvent
• Added a new disableDefaultTabActivation property
to the custom card object passed to the
createCustomCard method.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 18
Release Summary of changes
• Added a new isTimerDisabled property to the custom
card object passed to the createCustomCard method.
• Added a new overrideUrl property to the Widget
Configuration. This is set by an Administrator through the
Widget Manager.
• Added a new largeButtonsEnabled property to the
custom card object passed to the createCustomCard
method.
Note: The widget must have been built in Workspaces 3.7 or
later in order for the override library URL to work.
• Added the following Widget API methods:
o sendEmailMessage
Release [Link] o removeEmailAttachment
• Added the following Widget API events:
o onEmailAttachmentUploadEvent
• Added a new timeout property to the custom card object
passed to the createCustomCard method.
• Removed the following deprecated events:
o onCapabilitiesChangedEvent
o onMediaDataEvent
• Removed deprecated getCanStartVoiceInteraction
method.
• Added the following Widget API methods:
o updateMenuItems
o sendChatMessage
o reportChatTyping
o getInteractionData
• Added the following Widget API events:
Release [Link] o onUserTypingEvent
o onFileUploadEvent
o onFileTransferInitiatedEvent
o onFileTransferCompleteEvent
• Renamed isBeingObserved property passed within
onInteractionEvent and
onInteractionEndedEvent to isObserved.
• Extended onContextDataEvent with
clientValidation data specifying max characters
allowed when sending messages for Chat, SMS or Social
interactions.
• Added a new positionIndex property to the custom card
object passed to the createCustomCard and
updateCustomCard methods.
• Added the agent capabilities to the data passed in the
Release [Link] [onAgentStateChangeEvent]
• Added the following Widget API methods:
o createCustomCard
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 19
Release Summary of changes
o updateCustomCard
o deleteCustomCard
o searchEnterpriseDirectory
o isEnterpriseContactsServiceAvailable
o getNotReadyReasonCodes
o getAdditionalWorkCodes
o startWork
o startWorkNotReady
o setAgentReady
o setAgentACW
o finishWork
o additionalWork
o setAgentNotReady
• Added the following Widget API events:
o onEnterpriseContactsReceivedEvent
o onEnterpriseServiceAvailableEvent
o onEnterpriseServiceUnavailableEvent
o onInteractionEndedEvent
• Added onPagePushUrlEvent to Widget API events. This
was originally added as a [Link] hotfix but was also ported
forward to [Link].
• Added the following Widget API methods:
o insertMessageIntoResponseArea
o insertContentIntoEmailBody
• Added the following new capabilities to the data passed in
the onCapabilitiesEvent or the data returned by the
getCapabilities method:
Release [Link] o canSendMessage
• Added a new push-suggested-responses sample widget to
demonstrate usage of the
insertMessageIntoResponseArea and
insertContentIntoEmailBody methods.
• Added onPagePushUrlEvent to Widget API events.
• Added the following Widget API methods:
o getDispositionCodes
o setDispositionCode
o getWorkCodes
o setWorkCode
Release [Link] o sendDTMF
• Added the following new capabilities to the data passed in
the onCapabilitiesEvent or the data returned by the
getCapabilities method:
o canSetDispositionCode
o canSetWorkCode
o canSendDtmf
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 20
Release Summary of changes
• Added the following new properties to the data passed in the
onInteractionEvent:
o skillId
o topicId
• Added the following new core widgets:
o Customer Search: Agent can use this to Search for
customer's that are stored in the CRM.
o Reporting Dashboard Manager: Reporting user can
configure Dashboards.
o Reporting View Manager: Reporting user can create and
edit views.
o Reporting Dashboard Viewer: Displays configured
Dashboards.
o Reporting Calculated Measures: Reporting user can
create and edit Calculated Measures to use in Report
Views.
Note: If custom layouts have been configured before the
upgrade, users will have to configure these widgets using the
Administrator layout manager
• Added the following Widget API methods:
o acceptInteraction
o holdInteraction
o unholdInteraction
o endInteraction
o singleStepTransfer
o consult
o endConsult
o completeTransfer
o completeConference
o getCapabilities
Release [Link] • Added onCapabilitiesEvent to Widget API events.
• Added the following new properties to the data passed in the
onInteractionEvent:
o stateReason
o interactionType
o isCustomerInteraction
o isConsult
• The getCanStartVoiceInteraction() Widget API
method has been deprecated and will be removed in the next
release. Please use getCapabilities() instead.
• The onCapabilitiesChangedEvent Widget API event
has been deprecated and will be removed in the next release.
Please use onCapabilitiesEvent instead.
Release [Link]
• Added onMediaEvent to Widget API events.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 21
Release Summary of changes
• The event onMediaDataEvent has been deprecated and
will be removed in the next release. Please use
onMediaMessageEvent instead.
• Added onRequestServicesEvent to Widget API events.
• Added setTransferToServicesList Widget API
method.
• Added Admin Settings tab and Override Transfer to Service
Destination List checkbox.
• Added a Filtered Transfer To Service List sample widget to
the sample widget library.
• Removed sendTextEmailTemplate and
sendHTMLEmailTemplate Widget API methods. These
were used by an external Email Templates widget which has
now been changed to a core internal widget.
• Included the NEO CSS framework.
• Added NEO CSS framework online documentation.
• Improved Widget API online documentation.
• Added 4 new widgets to the sample widget library.
• Added a new project template to create widget library
projects.
• New Widget Manager UI added to Workspaces administrator.
• Added sendTextEmailTemplate and
sendHTMLEmailTemplate Widget API methods to send
custom email templates to the Email widget.
• Added getCanStartVoiceInteraction Widget API
Release [Link] method to implement click-to-call functionality.
• Added startVoiceInteraction Widget API method to
implement click-to-call functionality.
• Added onCapabilitiesChangedEvent Widget API
event.
• Added onTeamMemberEvent Widget API event to get team
member data.
• Added new core widget: Email templates. This widget is used
to inject email templates to the Email Widget.
Note: If a custom layout has been configured before the
upgrade, users will have to configure this widget using the
Administrator layout manager.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 22
Chapter 2: Widget Development
Overview
Avaya Workspaces uses widgets to bring information from multiple sources into a single user
interface. There are two types of widgets in Workspaces:
• Core widgets developed and supported by Avaya. These are widgets bundled by default
in every version of Workspaces, such as the Chat, Email, or Customer Details widgets.
• External widgets developed by a third-party and maintained externally.
You can create your own widgets to customize the layout of Workspaces according to your
business needs. The Widget Framework documentation provides a sample project and a
sample widget library for development purposes. Using the sample project, you can create
widgets and build them for production use. The sample library includes a set of widgets that
demonstrate key features of the Widget API.
After creating your widget, you can import it in the Avaya Workspaces Widget Manager. The
Widget Manager accepts only JSON files, however, each JSON file contains an element
property that is used by the Workspaces application to fetch the widget code file from the
remote server. You can either use the Workspaces Widget Library URL as the default server or
provide instead an overrideUrl property in your widget JSON file.
• Widgets using APIs that require interactions are bound to work cards in Workspaces and
cannot access or use other Workspaces features unless that feature is requested and
supported by the UAC component in Avaya Breeze. You can create a widget and add it
to the Home tab and no interactions are required for this.
• Widgets do not have access to the Client JavaScript SDK directly.
• Loading ActiveX controls, Flash and Java Applets inside widgets is possible but not
recommended as these are considered legacy web technologies prone to browser
incompatibilities and security issues.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 23
When writing widgets, you use web technologies, such as JavaScript, HTML, CSS, and JSON.
You can write a widget that implements a screen sharing protocol such as VNC / RDP to access
a legacy application that is not web based.
Widgets inherit the browsers security model and security permissions of the underlying network
and the security model of the Workspaces solution. It is recommended that you host the widget
library on internal web servers only accessible from VPN or restricted networks.
To create a widget, you can use either the Widget Framework CLI tool or any Web Component
frameworks. If you want to use the Widget Framework CLI tool, install the following components
compatible with your system and follow the instructions in this chapter:
Sample Project
You can use the sample project to develop your widget library. The following table describes the
files included in the sample project template:
Name Description
This file contains instructions on how to install and use the
[Link]
project template
This file is used by the Grunt task runner to create, compile and
[Link]
bundle widgets
This file contains all the NodeJS package dependencies needed
[Link]
by the project template
Using the Grunt task runner, you can create widget JSONs to import them into Workspaces.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 24
Sample Library
The sample library provides several widgets to give you an overview of the Widget framework
and demonstrate key features of the Widget API. The following table displays the list of widgets
included in the sample library:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 25
Widget Name Description
Capabilities
The Widget Framework uses the concept of capabilities to indicate the current capability of an
Agent to perform an operation. Capabilities are set by the server and should be taken as an
indication that the operation will succeed if attempted. Please see the getCapabilities
method and onCapabilitiesChangedEvent event for usage.
• canAccept.
• canHold.
• canUnhold.
• canSendMessage.
• canLogin.
• canSetReady.
• canSetNotReady.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 26
• canLogout.
• canSetAdditionalWork.
Procedure
1. Install the latest version of NodeJS compatible with your system. You can check the
version, running the following command:
node -v
2. Update the npm if necessary. You can check your current version, running the following
command:
npm -v
3. Download and unzip the [Link] file.
unzip [Link]
4. Install the Grunt task runner.
npm install -g grunt-cli
5. Install the npm packages dependencies.
npm install
Creating a widget
About this task
Use the Grunt task to create a new widget. The widget is created in the library folder.
Note: The name of the library folder is default and does not match the name of your library.
Procedure
Run the following command:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 27
Building a widget
About this task
Use the Grunt task to build and bundle the widget. The widget JSON is created in the bundle
folder.
Procedure
Run the following command:
• grunt --build="my-widget"
Importing widgets
To import your widget into Workspaces, you need to upload the widget configuration JSON
configuration file. You can import it into Workspaces using the Widget Manager in the
Administrator user interface. All custom widgets imported into Workspaces must meet the
following requirements:
1. A widget JSON must contain the following properties:
• [Link].
• [Link].
• [Link].
• [Link].
• [Link].
• [Link].
• [Link].
2. If you want to use a remote server other than the Workspaces Widget Library URL, you
need to add [Link] property.
3. The [Link] value must not be configured to Workspaces.
After importing the widget, you can see it in the widget list. You can also import all sample
library widgets at once by importing the [Link] file from the bundle folder.
Procedure
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 28
Run the following command:
• grunt clean
Procedure
1. Download and unzip the [Link] file.
unzip [Link]
2. Install the Grunt task runner.
npm install -g grunt-cli
3. Install the npm packages dependencies.
npm install
Next step
After installation, you can select any widget in the sample library. You need to build the widget
to use it.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 29
Chapter 3: Using Widgets
• If you use self-signed certificates, make sure the certificates are installed and trusted on
the browser or OS environment. Otherwise, the browser will not trust the self-signed
certificate and prevent Workspaces from loading the widgets.
• The server must be enabled with Cross-origin resource sharing (CORS). For information
about enabling CORS, see the documentation for your web server.
• The directory where widgets are hosted is the bundle directory. This is the output
destination of the build process used to build the sample library.
• The web server must be hosted on the same network as the Avaya Workspaces
Solution.
• The web server should have a network round-trip time (RTT) of less than 120 ms.
• The web server should be configured for CORS.
• The web server should be configured with HTTPS.
Procedure
1. Install an HTTP-server using npm.
npm install -g http-server
2. Run the server over HTTPS on port 8443 with CORS enabled.
http-server ./sample-library/bundle -p 8443 --cors -S -C [Link] -K
[Link]
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 30
Result
Once running, you see the log. By default, the server uses your local IP on port 8443.
AACC
To allow Avaya Workspaces AACC to load your sample widget library you will need to enable
and configure the Library URL in Contact Center Multimedia Manager (CCMM).
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 31
Oceana & Elite
To allow Avaya Workspaces Oceana or Avaya Workspaces Elite to load your sample widget
library you will need to enable and configure the Library URL in Avaya Control Manager (ACM).
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 32
Chapter 4: Web Component Widgets
As an alternative to creating AngularJS widgets using the Widget Framework CLI tool, you can
create your own Web Component. Avaya Workspaces accept Web Component widgets
developed in any framework that conforms to Web Component standards.
You need to parse the attributes applied to your Web Component by Workspaces and pass
them to the Widget API constructor. You can create the Widget API by calling the globally
available NewAvayaWidgetAPI method. This method returns a new instance of the Widget
API to be used by the external widget. After creating the instance of the Widget API, you can
use it the same way as within the AngularJS directive generated by the Widget Framework CLI.
The following code block displays how you can create the Widget API for use within the Web
Component:
connectedCallback() {
// Get parameters passed to the web component as attributes by Workspaces.
const interactionId = [Link]("interaction-id");
const workRequestId = [Link]("work-request-id");
const externalInteractionId = [Link]("external-interaction-id");
// Create Widget API passing in parameters
// Note: it is important the keys in the JSON passed to this method are as given
const api = [Link]({
interactionId,
workRequestId,
externalInteractionId
});
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 33
Configuring Web Component’s JSON
If you use Web Components you need to configure a corresponding widget JSON file. A Web
Component widget JSON has the following property different from that for AngularJS widgets:
• The [Link] property must match what the web component defines
in its call to [Link].
When developing web components, you can have dependent files in the
[Link] array and use either overrideUrl or the widget library URL to fetch
your widget files.
The following code block displays an example of a Web Component widget JSON.
{
"metadata": {
"name": "Agent Component Test",
"description": "This is to test web component for agent state",
"tags": "agent, customer, details, salesforce, CRM, voice",
"version": "",
"date": "2017-01-24T[Link].684Z",
"id": "c79c964b-7427-4d5f-9384-ad316e9a3e21"
},
"configuration": {
"external": true,
"enabled": true,
"name": "c79c964b-7427-4d5f-9384-ad316e9a3e21",
"icon": "aoc-home",
"element": "<agent-web-component></agent-web-component>",
"permissions": [],
"shortcuts": [],
"localization": [],
"files": ["[Link]
}
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 34
Chapter 5: Widget Communication
The Widget Framework has a feature that enables widgets to communicate with each other.
Widget-to-widget communication is intended so that two or more widgets can communicate with
each other within a single instance of Workspaces and only when the agent is presented a work
card. When an agent receives a call and accepts the work card, two or more widgets can
communicate and access details about the call and perform actions such as querying a remote
database or loading a web page.
Widget communication only occurs within the context of the work card, which means that if an
agent has several work cards, widgets can only communicate with each other and only within
the bounds of their own work card type (voice, chat, email).
Widget-to-widget communication can be implemented by using the sendMessage() Widget
API method. There are two modes that widgets can use to communicate with each other:
unicast and multicast.
function widgetComponent(WidgetAPI) {
function widgetContainer(scope, element, params) {
var api = new WidgetAPI(params);
// listen for a message event with ID 'unique-random-id'
[Link]('onMessageEvent:unique-random-id', function(message) {
// do something with the message
[Link](message);
});
}
return {
scope: {},
replace: true,
template: template,
link: widgetContainer
};
}
You can see a live code example, using the hello-world and message-echo widgets from
the Sample Widget Library to send and receive messages.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 36
When you implement multicast communication, you call the sendMessage() Widget API
method to broadcast to all widgets listening for the onMessageEvent Widget API event.
//Widget B listens and receives message from Widget A
[Link]('4fb7cac3-a96b-44ae-93f0-1fc97f387062', [
'[Link]'
]).directive('bobWidget', widgetComponent);
function widgetComponent(WidgetAPI) {
function widgetContainer(scope, element, params) {
var api = new WidgetAPI(params);
// listen for a message event
[Link]('onMessageEvent', function(message) {
// do something with the message
[Link](message);
});
}
return {
scope: {},
replace: true,
template: template,
link: widgetContainer
};
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 37
Chapter 6: Widget Localization
Localization Workflow
The Widget Framework does not provide you with a built-in facility for localizing widgets. To
localize your widgets, you can use the angular-gettext package or other packages. The
angular-gettext package is the same package that Workspaces uses to perform
localization. The following list describes the steps of localization workflow:
Annotating Strings
About this task
To annotate the strings that you want to translate, you need to include gettext module in the
code of your widget and add translate directives. You must include [Link]
JavaScript library in your widget JSON file.
Procedure
1. Include gettext as a module into the code of your widget. The following code block
displays how to include the gettext module in a widget:
[Link]('831e9ed6-2416-427c-8f04-ccee6e89790a', [
'gettext',
'[Link]'
]).directive('localisedWidget', widgetComponent);
function widgetComponent(WidgetAPI) {
function widgetContainer(scope, element, params) {
var api = new WidgetAPI(params);
}
return {
scope: {},
replace: true,
template: template,
link: widgetContainer
};
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 38
2. Annotate the strings adding the translate directive to HTML elements that you want
to translate. The following HTML template displays how you can use the translate
directive:
<div class="neo-widget">
<div class="neo-widget__header aoc-home" translate>Localised Widget</div>
<div class="neo-widget__content neo-widget__content--indented">
<div class="row">
<div class="col-medium-12 col-large-12">
<p translate>This string will be translated</p>
<p translate>You can use string interpolation, for example: {{ hello
}}</p>
<p translate>Input attributes can be translated: </p>
<input type="text" placeholder="{% raw %}{{ 'Username' | translate
}}{% endraw %}"/>
</div>
</div>
</div>
</div>
3. Add the angular-gettext library in your widget JSON file. After that, the
[Link] property looks as in the following example:
{
"metadata": {
"name": "Localised Widget",
"description": "Please add widget description here",
"tags": "demo, widget, example, other",
"library": "My Library",
"version": "1.0.0",
"date": "2017-09-26T[Link].618Z",
"id": "831e9ed6-2416-427c-8f04-ccee6e89790a"
},
"configuration": {
"external": true,
"timeout": 5000,
"serie": true,
"name": "831e9ed6-2416-427c-8f04-ccee6e89790a",
"element": "<localised-widget></localised-widget>",
"icon": "aoc-home",
"files": [
"localised-widget/libs/[Link]",
"localised-widget/[Link]",
"localised-widget/[Link]"]
}
}
Next step
After you have annotated the strings, you can extract them to a translation template.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 39
Extracting Strings
About this task
To prepare the strings for translation, you must extract them into a translation template. This
template is a .pot file that lists all the strings that should be translated. To extract the strings
automatically from your widget HTML template, you can use the grunt-angular-gettext
plugin. If you use it, check if you have the following components installed:
2. Enable the plugin inside your Gruntfile adding the following JavaScript line:
[Link]('grunt-angular-gettext');
3. In your project’s Gruntfile, add the nggettext_extract section to the data object
passed into [Link]():
[Link]({
nggettext_extract: {
pot: {
files: {
'po/[Link]': ['src/views/*.html']
}
},
},
})
4. (Optional) If you localize AngularJS widget with AngularJS configured to use other
expression delimiters than {{ and }}, update the nggettext_extract accordingly:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 40
[Link]({
nggettext_extract: {
pot: {
options: {
startDelim: '[[',
endDelim: ']]'
},
files: {
'po/[Link]': ['src/views/*.html']
}
},
},
})
Translating Strings
The gettext ecosystem provides a wide range of translation tools. The following list describes
the general translation workflow:
1. Use the .pot template to generate a new translation catalog (a .po file) or update an
existing .po file.
2. Translate the strings (and plural forms) in your corresponding language.
3. Save the resulting .po file.
4. Compile translations in a JavaScript file.
You must choose the tool to use for translating strings. Follow the instructions on using this tool.
As a result, you have the .po file that you need to convert into a JavaScript file.
Compiling Translations
About this task
You can convert translated .po files into Angular-compatible JavaScript files using the grunt-
angular-gettext plugin. It is assumed that you have installed the plugin while extracting the
annotated strings.
Procedure
1. In your project’s Gruntfile, add the nggettext_compile section to the data object
passed into [Link]():
[Link]({
nggettext_compile: {
all: {
files: {
'src/js/[Link]': ['po/*.po']
}
},
},
})
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 41
2. (Optional) Specify the parameter that defines the AngularJS module for which you
generate the translations:
[Link]({
nggettext_compile: {
all: {
options: {
module: 'myApp'
},
files: {
'src/js/[Link]': ['po/*.po']
}
},
},
})
Embedding Translations
About this task
After you have converted the set of translations into a JavaScript file, you need to add this file to
your widget JSON.
Procedure
In Stylesheets
In order to support Right-to-Left (RTL) languages, you need to change your widget stylesheets
to prevent incorrect widget rendering. Do one of the following:
• Write all the needed RTL styles in the same stylesheet file using the [dir=“rtl”] root
selector. The following code block displays how you can use it:
.my-widget-button {
margin-left: 15px;
}
• Split stylesheets for Left-to-Right (LTR) and RTL versions into two different stylesheet
files, such as [Link] and [Link], so
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 42
Workspaces can load the necessary stylesheet file of your widget when agent switches
between locales. This approach implies you to specify stylesheet files in the widget
JSON by surrounding these in sub-array as follows:
{
"metadata": {
"name": "Localised Widget",
"description": "Please add widget description here",
"tags": "demo, widget, example, other",
"library": "My Library",
"version": "1.0.0",
"date": "2017-09-26T[Link].618Z",
"id": "831e9ed6-2416-427c-8f04-ccee6e89790a"
},
"configuration": {
"external": true,
"timeout": 5000,
"serie": true,
"name": "831e9ed6-2416-427c-8f04-ccee6e89790a",
"element": "<localised-widget></localised-widget>",
"icon": "aoc-home",
"files": [
"localised-widget/libs/[Link]",
["localised-widget/[Link]", "localised-widget/localised-
[Link]"],
"localised-widget/[Link]"]
}
}
In JavaScript code
To handle RTL issues in JavaScript code, check the following Widget API documentation
entries:
• bidi method.
• onLocaleUpdatedEvent event.
• onBeforeTextDirectionChangedEvent event.
• onStylesheetsReadyEvent event.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 43
Appendix I: Widget API Methods
The Widget API enables third-party developers to write custom widgets and deploy them in
Avaya Workspaces. To write a custom widget, you need access to the Widget API Developer
Documentation and code examples. The Widget API is designed to make it easier for anyone
with a basic understanding of HTML, CSS and JavaScript to write a custom widget and deploy it
in Avaya Workspaces.
The following section provides descriptions and examples of each method in the Widget API.
The examples are provided to give a deeper understanding on how each method behaves.
Alternative JavaScript patterns can be used at the developers discretion. Ensure that events
marked as Requires Interaction require an interaction context. Any widget leveraging these
events will need to be placed on an Interaction related tab.
Constructor
The constructor method is used to initialize the Widget API (see examples in the sample
widget library). The constructor returns a reference to the Widget API object which can then
be used to make API calls. The params object must be passed automatically during the
initialization stage of the widgetContainer (see code examples provided in the sample
widget library).
var api = new WidgetAPI(params);
onDataEvent(event, callback)
This method allows the widget to subscribe to the various data events delivered by Avaya
Workspaces. See the Widget API Events section for the list of supported events.
This method accepts the following parameters:
• event: This is the name of the event you want to subscribe to.
• callback: a callback function which is fired once the event returns data.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 44
sendMessage(data, id)
This method broadcasts a data event to all the widgets under the same interaction context. This
method can be used for widget-to-widget communication and to exchange data. This data will
get broadcast on the onMessageEvent. For details see Widget API Events.
This method accepts the following parameters:
sendNotification(level, message)
This method displays a notification message in Avaya Workspaces. This method sends and
displays the message as a "toast" notification.
This method accepts the following parameters:
getConfiguration()
This method returns configuration information relevant to the current Workspaces session for a
Workspaces User. The following information is provided:
• user ID.
• station ID.
• user.
• display name.
• user first name.
• user last name.
• user handle.
• user state.
• authentication token (JWT).
• current locale.
• user settings.
• user POM settings (available only to POM enabled Agents).
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 45
Note: A Workspaces User must be either an "Agent" or "Supervisor".
var config = [Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 46
"canCancelCallForwarding": false,
"canStartInteraction": true,
"canStartSupervisorInteraction": false
}
},
"SMS": {
"state": "READY",
"stateReason": "DEFAULT",
"capabilities": {
"canSetCallForwarding": false,
"canCancelCallForwarding": false,
"canStartInteraction": false,
"canStartSupervisorInteraction": false
}
},
"SOCIAL": {
"state": "READY",
"stateReason": "DEFAULT",
"capabilities": {
"canSetCallForwarding": false,
"canCancelCallForwarding": false,
"canStartInteraction": false,
"canStartSupervisorInteraction": false
}
},
"VIDEO": {
"state": "READY",
"stateReason": "DEFAULT",
"capabilities": {
"canSetCallForwarding": true,
"canCancelCallForwarding": true,
"canStartInteraction": true,
"canStartSupervisorInteraction": true
}
},
"GENERIC": {
"state": "READY",
"stateReason": "DEFAULT",
"capabilities": {
"canSetCallForwarding": true,
"canCancelCallForwarding": true,
"canStartInteraction": true,
"canStartSupervisorInteraction": true
}
}
},
"locale": {
"id": "en-us",
"label": "English (US)",
"textDirection": "ltr",
"textAvatar": true,
"stringsVersion": "1"
},
"settings": {
"awfosEnabled": true,
"coBrowseURL": "[Link]",
"coBrowseFQDN": "[Link]",
"ocpdsFQDN": "ocpdsFQDN",
"contextStoreClusterIP": "ocdsFQDN",
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 47
"ocdsFQDN": "ocdsFQDN",
"customerManagementFQDN": "[Link]",
"aawgFQDN": "aawgFQDN",
"ocpAddress": "[Link]",
"ocpFQDN": "[Link]",
"hotdesk": false,
"isWebRTC": false,
"observeIndicatorEnabled": true,
"salesforceConfiguration": {
"ApplicationName": "CC_Client",
"ConsumerKey":
"3MVG98_Psg5cppyYaaOW5FZdV8rTYZuaYxGoP4wz97OSfkLYl0EBZrXQ3B8lbWPqs5NAcPAOi5rPdpD4vP9
nd",
"ConsumerSecretKey": "3723015645493377233",
"CRMIntegrationEnabled": "true",
"ProxyServerURL": "[Link]
"SalesforceEndpoint": "[Link]
},
"screenPopConfiguration": {
"DisplayInternalScreenpopWidgetFirstOnAgentAccept": "false",
"EnableScreenpopWithoutAgentprompting": "false",
"LaunchExternalScreenpopsOnAgentAccept": "false"
},
"welcomePage": "assets/pages/[Link]",
"supervisorReportingURL": "assets/pages/[Link]",
"workspacesLoggingEnabled": false,
"workspacesLoggingLevel": "",
"workspacesLogUploadLocation": "[Link]
"websocketsEnabled": true,
"genericChannelFriendlyName": "TestChannel",
"genericChannelIcon": "aoc-custom01",
"clockDriftMillis": 155
}
},
"pomSettings": {
"widgetDownloadLocation": "[Link]
"widgetPrimaryAddress": "[Link]
"widgetPrimaryPort": "1234",
"widgetSecondaryAddress": "[Link]
"widgetSecondaryPort": "2345",
"pomOrganizations": [{
"organization": "org1",
"zones": ["zone1", "zone2"]
}, {
"organization": "org2",
"zones": ["zone3", "zone4"]
}]
}
}
getInteractionId()
This method returns the Interaction ID for the active interaction.
Note: Requires Interaction.
// Returns the interaction ID as string, e.g. fbeca6e2-2b8c-45e6-bc54-55e2b96799b7
var id = [Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 48
getWorkCardCount()
This method returns the number of interactions.
// Returns interaction count as a number, e.g. 2
var interactionCount = [Link]();
getInteractionData()
This method returns the interaction related data.
Note: Requires Interaction.
// Best to use on your widget initialization
var data = [Link]();
You can see the payload of sample data which would be returned by calling
[Link]():
{
"id": "f775be25-68a0-4c54-9b10-a24f6cc4b5ff",
"workRequestId": "0085617462979956890064",
"externalInteractionId": "-2694020189_9f88add7-0f0d-4708-aec9-b6cc8b740554",
"channel": "SMS",
"state": "ACTIVE",
"stateReason": "DEFAULT",
"interactionType": "CALLED",
"title": "(212) 842-5599",
"topic": "Oceana Service",
"topicId": "3007",
"skill": null,
"skillId": null,
"direction": "INCOMING",
"isCustomerInteraction": false,
"isWebRtcCall": false,
"userToUserInfo": null,
"isConsult": false,
"originatingAddress": "(212) 842-5599",
"destinationAddress": "1001",
"isObserved": false,
"contactId": "lHu1kWd6xBhjp7mifzcCJI"
}
sendChatMessage(message)
This method sends text message into an interaction on behalf of current agent. This method
only executes if the [Link] capability is set
to true. This method is restricted to be invoked no more than once per one second due to
security restrictions. See Capabilities section for more information.
This method accepts the message parameter: the message text.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 49
Note: Requires Interaction.
// Send a message to customer from current agent
[Link]('Test message');
validateRichMedia(media, richMediaType)
This method validates a rich media message.
• Note: currently the following rich media types are accepted: text, image, carousel,
postback.
• Note: See sendRichMedia for media (async message body) examples.
This method accepts the following parameters:
sendRichMedia(media, richMediaType)
This method sends a rich media message into an interaction on behalf of current agent. This
method will only execute if the [Link] capability
is set to true. See Capabilities section for more information.
This method is restricted to be invoked no more than once per one second due to security
restrictions. Valid arguments are expected, otherwise the function will silently fail. Use
validateRichMedia method for the media and type validation.
Note: Requires a Messaging channel interaction, otherwise the function will silently fail.
This method accepts the following parameters:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 50
Depending on the richMessageType, the rich media message object can have the following
structure.
"text" richMessageType
text messages could contain actions array.
Note: Inbound and outbound messages.
// Send a rich media message to customer from current agent
[Link]({text: 'Test message'}, 'text'); // text property is required
"image" richMessageType
image messages could contain actions array.
Note: Inbound and outbound messages.
[Link]({
mediaUrl: '[Link] // mediaUrl property is required
text: 'Optional test message' // text is optional
}, 'image');
"carousel" richMessageType
carousel rich media message could contain actions array within items.
Note: Outbound messages only.
You should respect the following restrictions:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 51
[Link]({
items: [
{
mediaUrl: '[Link] // mediaUrl property is required
title: 'Required Title', // title property is required
description: 'Required description', // description property is required
actions: [ // actions is required
{
text: 'Required text property if action item is set', // text property is
required
type: 'Required type property if action item is set', // type property is
required. Could accept: 'postback', 'reply', 'link', 'locationRequest' for now
payload: 'Required payload property if action item is set' // payload
property is required
}
]
}
]
}, 'carousel');
"location" richMessageType
Note: Inbound and outbound messages
[Link]({
coordinates: { // coordinates property is required
lat: 37.398405, // lat property is required
long: -121.977458 // long property is required
},
location: { // optional location property
address: 'Full addreess', // optional address property
name: 'Title of address'// optional name property
}
}, 'location');
"postback" richMessageType
Note: Inbound messages only
[Link]({
action: { // action property is required. NOTE: action not actions
type: 'Required type property', // type property is required
text: 'Required text property', // text property is required
payload: 'Required payload property' // payload property is required
}
}, 'postback');
Actions
Note: text and image rich media messages could contain actions array, carousel rich media
message could contain actions array within items.
The number of message actions allowed in a given message is limited by the third party
channel.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 52
If the actions array of a message exceeds the number of actions that the channel allows, the list
will be truncated to fit the limit, and actions beyond the allowed size will be ignored. The number
of message actions allowed in a message item is 3. If the actions array exceeds the limit, the
server will return a 400 response.
[Link]({
mediaUrl: '[Link] // mediaUrl property is required
text: 'Optional test message', // text is optional
actions: [ // actions is optional
{
text: 'Text',
type: 'Required type property if action item is set', // Could accept:
'postback', 'reply', 'link' and locationRequest for now
payload: 'Payload'
}
]
}, 'image');
'postback' action
[Link]({
text: 'Required text', // text is required
actions: [ // actions is optional
{
text: 'Text', // text property is required
type: 'postback', // type property is required
payload: 'Payload' // payload property is required
}
]
}, 'text');
'reply' action
[Link]({
text: 'Required text', // text is required
actions: [ // actions is optional
{
text: 'Text', // text property is required
type: 'reply', // type property is required
payload: 'Payload', // payload property is required,
iconUrl: '[Link] // iconUrl property is optional
}
]
}, 'text');
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 53
'link' action
[Link]({
text: 'Required text', // text is required
actions: [ // actions is optional
{
text: 'Text', // text property is required
type: 'link', // type property is required
uri: '[Link] // uri property is required
}
]
}, 'text');
'locationRequest' action
[Link]({
text: 'Required text', // text is required
actions: [ // actions is optional
{
text: 'Text', // text property is required
type: 'locationRequest' // type property is required
}
]
}, 'text');
sendEmailMessage(emailData)
This method sends text message into an interaction on behalf of current agent. This method
only executes if the [Link] capability is set
to true. See Capabilities section for more information. This method is restricted to be invoked no
more than once per one second due to security restrictions. This method accepts the emailData
parameter: The data object.
Note: Requires Interaction.
The following table displays the properties that emailData object passed to
sendEmailMessage method can contain:
Body of email
message string Yes
message
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 54
Parameter Type Required Description
removeEmailAttachment(attachment)
This method removes email attachment by attachment id.
This method accepts the attachment parameter: the data object.
The following table displays the properties that the attachment object passed to
removeEmailAttachment method can contain:
reportChatTyping()
This method sends a typing notification to other participants. This method is restricted to be
invoked no more than once per six seconds due to security restrictions. In order to prevent "is
typing..." label flickering on side of customer, make sure to invoke this method once per six
seconds during user is typing.
Note: Requires Interaction.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 55
// Define [Link] throttle (best to use!) wrapper
var reportChatTypingThrottle = _.throttle([Link], 6000, {leading:
true, trailing: false});
// Listen to keydown event on input and call reportChatTypingThrottle each time user
presses any key
[Link]('input[type=text]').addEventListener('keydown',
reportChatTypingThrottle);
startVoiceInteraction(address)
This method starts an outbound voice interaction. This method only executes if the
[Link] capability is set to true.
See Capabilities section for more information.
This method accepts the address parameter: the address that will be used to initiate the
outbound voice interaction.
// Make a voice call
[Link]('3156');
acceptInteraction()
This method accepts an altering interaction. This method only executes if the
[Link] capability is set to true. See Capabilities section
for more information. This method is only applicable in an Elite environment where the widgets
are displayed while an interaction is altering.
Note: Requires Interaction.
[Link]();
holdInteraction()
This method holds an active interaction. This method only executes if the
[Link] capability is set to true. See Capabilities section for
more information.
Note: Requires Interaction.
[Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 56
unholdInteraction()
This method unholds a held interaction.
This method will only execute if the [Link] capability is set to true.
See Capabilities section for more information.
Note: Requires Interaction.
[Link]();
endInteraction()
This method ends the active interaction. This method will only execute if the
[Link] capability is set to true. See Capabilities section for
more information.
Note: Requires Interaction.
[Link]();
singleStepTransfer(address)
This method performs a single step transfer to an address. This method only executes if the
[Link] capability is set to true.
See Capabilities section for more information.
This method accepts the address parameter: the address that will be used to transfer to.
Note: Requires Interaction.
// Single step transfer to an address
[Link]('3156');
consult(address, uui)
This method initiates a consult to an address. This method only executes if the
[Link] capability is set to true.
See Capabilities section for more information.
This method accepts the following parameters:
endConsult()
This method ends the consultative leg of an interaction.
Note: Requires Interaction.
// End the consult
[Link]();
completeTransfer()
This method transfers the interaction to the consulted address. This method only executes if the
[Link] capability is set to true. See
Capabilities section for more information.
Note: Requires Interaction.
// Complete the transfer
[Link]();
completeConference()
This method completes the consult as a conference. This method only executes if the
[Link] capability is set to true. See
Capabilities section for more information.
Note: Requires Interaction.
// Complete the conference
[Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 58
getCapabilities()
This method gets the latest capabilities for the active interaction and agent channels.
// Get all capabilities
var capabilities = [Link]();
// Check if a voice interaction can be initiated
var canStartVoiceInteraction =
[Link]().[Link];
setTransferToServicesList
This method allows the setting of a custom list of transfer to service destinations in the Avaya
Workspaces work card. This method expects an array of services that will be displayed on the
Transfer to Service dropdown list on an interaction's work card. In order for a Transfer to work
the services must already exist in UCA. It is expected that the widget developer will retrieve this
list from UCA and filter the services list inside the widget. See filtered-transfer-to-service-
list sample widget for further demonstration.
// The following list of services is only an example. In order for a Transfer to
work the services must already exist in UCA.
// In the real world this list of services will not be hardcoded, it will be
retrieved from UCA and then filtered by the widget developer.
var services = [{
"id" : "[Link]|[Link]",
"name" : "IrishVoiceTransferToService"
}, {
"id" : "[Link]|[Link]",
"name" : "EnglishVoiceTransferToService"
}];
[Link](services);
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 59
getDispositionCodes(channelType)
This method gets a list of all disposition codes if any are configured. By default, this method will
return all disposition codes configured for all channel types. However, it is possible to receive a
filtered list by passing a valid channelType as an argument, that is VOICE, EMAIL, CHAT,
SMS, SOCIAL.
// Get all disposition codes
var dispositionCodes = [Link]();
// Get disposition codes for the voice channel
var dispositionCodes = [Link]('VOICE');
// Get disposition codes for the current channel using onInteractionEvent
[Link]('onInteractionEvent', function(data) {
[Link] = [Link]([Link]);
});
This method accepts the channelType (optional) parameter: a channel type. This will result in
the method returning a filtered list of disposition codes which have been assigned to this
channel type.
See the payload of sample data returned by calling [Link]():
[
{
"code": "5645",
"friendlyName": "Report to Supervisor",
"type": "DISPOSITION",
"channels": [
"SMS",
"WEBCHAT"
]
},
{
"code": "3534",
"friendlyName": "Offer discount on next call",
"type": "DISPOSITION",
"channels": [
"VOICE",
"SMS",
"EMAIL",
"WEBCHAT"
]
}
]
setDispositionCode(code)
This method sets a disposition code on the interaction. This method only executes if the
[Link] capability is set to true. See
Capabilities section for more information.
This method accepts the code parameter: the disposition code to set.
Note: Requires Interaction.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 60
// Set a disposition code
[Link]('7764');
getWorkCodes(channelType)
This method gets a list of all work codes if any are configured. By default, this method will return
all work codes configured for all channel types. However, it is possible to receive a filtered list by
passing a valid channelType as an argument, that is VOICE, EMAIL, CHAT, SMS, SOCIAL.
// Get all work codes
var workCodes = [Link]();
// Get work codes for the voice channel
var workCodes = [Link]('VOICE');
// Get work codes for the current channel using onInteractionEvent
[Link]('onInteractionEvent', function(data) {
[Link] = [Link]([Link]);
});
This method accepts the channelType (optional) parameter: a channel type. This results in the
method returning a filtered list of work codes which have been assigned to this channel type.
See the payload of sample data returned by calling [Link]():
[
{
"code": "7277",
"friendlyName": "Breakfast",
"type": "WORK",
"channels": [
"VOICE"
]
},
{
"code": "7777",
"friendlyName": "Sales",
"type": "WORK",
"channels": [
"VOICE",
"SMS",
"EMAIL",
"WEBCHAT"
]
},
{
"code": "8888",
"friendlyName": "Support",
"type": "WORK",
"channels": [
"EMAIL"
]
}
]
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 61
setWorkCode(code)
This method sets a work code on the interaction. This method only executes if the
[Link] capability is set to true. See
Capabilities section for more information.
This method accepts the code parameter: the work code to set.
Note: Requires Interaction.
// Set a work code
[Link]('3633');
getNotReadyReasonCodes()
This method gets a list of all Not Ready reason codes if any are configured.
// Get all Not Ready reason codes
var workCodes = [Link]();
getAdditionalWorkCodes()
This method gets a list of all Additional Work codes if any are configured.
// Get all Not Ready reason codes
var workCodes = [Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 62
See the payload of sample data returned by calling [Link]():
[
{
"code": "999",
"friendlyName": "Additional Work",
"type": "ADDITIONAL_WORK",
"channels": []
}
]
sendDTMF(digit)
This method sends a DTMF digit. This method only executes if the
[Link] capability is set to true. See Capabilities
section for more information.
This method accepts the digit parameter: the DTMF digit to be sent. Only values 0-9, * and #
are accepted.
Note: Requires Interaction.
// Set a work code
[Link]('1');
insertMessageIntoResponseArea(message)
This method inserts a message into the response area (input box) located on the Chat / SMS /
Social widget. This method only executes if the
[Link] capability is set to true.
See Capabilities section for more information.
This method accepts the message parameter: the message to insert.
Note: Requires Interaction.
// Insert a message into the response area
var message = 'Can you please send us your policy number?'
[Link](message);
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 63
insertContentIntoEmailBody(encoding, content,
subject)
This method inserts HTML or Plain Text content into the Email body located on the Email
widget. This method only executes if the [Link]
capability is set to true. See Capabilities section for more information.
This method accepts the following parameters:
• encoding (required): The encoding of the Email. Values accepted are either 'HTML' or
'PLAIN'.
• content (optional): The content to be inserted into the Email body. This is left optional so
that the method can still be called to show the Email editor screen.
• subject (optional): The subject to be inserted into the Email body.
createCustomCard(data)
This method creates a custom Card that will be displayed in the Work Card Area in Avaya
Workspaces. This method allows third-party developers to create work cards that appear in the
work card area in Avaya Workspaces. These custom cards appear like existing work cards but
can be customized to suit the requirements of a third-party widget developer looking to integrate
Avaya Workspaces with an external work provider. These custom work cards will always be
displayed to the right of Contact Center work cards. There has been a limit of three set on the
maximum number of custom work cards that can be displayed in Avaya Workspaces at any one
time. This is configurable up to ten in the Administrator settings. Each top-level button will have
an icon and a title. A button can define an optional property 'color' which adds a background
color to the icon (green, yellow, red or blue). An optional 'action' property can also be added to a
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 64
button to trigger a callback function when the button is clicked. A maximum of six top-level
buttons can be displayed on the custom card at any one time. It is also possible to set the
button size on the card to large with the boolean property largeButtonsEnable, when this is
set to true a maximum of two large top-level buttons can be displayed on the card. To have a
single large button in the center of a custom card declare a single button without an index.
Otherwise index 1 will position a large button to the left and index 2 to the right. A developer can
create a dropdown menu button by setting the isContextMenu property to true and defining a
list of menu items and sub-menu items. Menu items can have a title, a tooltip, an action and an
array of subMenusItems. There are some limitations with these drop-down menus. Please
refer to the 'Menu Limitations' paragraph. The data sent to the API to create a custom work card
needs to be localized by the calling third-party widget. The API will enforce validation of the
JavaScript object to ensure it can be displayed in the card. It is up to the third-party widget to
maintain the buttons as the card changes state.
Note: For Custom Cards to work with Customer Journey, it is required that the
[Link] property is set to 'ACTIVE' while the card is in an active state, as
Customer Journey will only be initialised if this property is set to 'ACTIVE'.
Menu Limitations: For the context menu buttons, there are some limitations that a developer
should be aware of. If a developer chooses to configure the parent menu to have sub-menu
items, there will be no search field on the parent menu. Searching on a first-level dropdown
menu is only supported if the menu is configured to have no sub-menus. Searching in a sub-
menu is supported. Developers can create two types of dropdown menus: A menu with no sub-
menus and a search input field or a menu with sub-menus (searching supported within the sub-
menus) and no search input field. Menu items that contain sub-menus are limited to five per
parent menu. Sub-menus or first-level menus without sub-menus will display a maximum of 20
items at a time. There will be searching provided on these types of menus to further refine the
list.
This method accepts the data (required) parameter: a JavaScript Object used to configure the
content, behavior and look of the Custom Card.
The following table displays the properties that data object passed to createCustomCard
method can contain:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 65
Parameter Type Required Description
Class name of icon to display in
icon string Yes Custom Card header (see neo
framework for possible values)
Text to display on hover over of
iconTooltip string No
icon in header
Name of color to display in
Custom Card header
color string No
Possible values: ['green',
'yellow', 'red', 'blue', 'grey']
Text to display in card context
summary string No
area
Optional text to display at top of
legTitle string No
Custom Card context area
Optional class name of icon to
legTitleIcon string No
display beside legTitle
Optional text to display on
legTitleTooltip string No
hover of legTitle
Date/Time of when Custom
establishedTime date No Card was established (displays
timer)
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 68
Parameter Type Required Description
• Ctrl then a.
• Ctrl then x.
• Ctrl + Shift + h.
• Ctrl then h.
• Ctrl then t.
• Ctrl + Shift + m.
• Ctrl then d.
• Ctrl then c.
• Ctrl then g.
• Ctrl then e.
• Ctrl then z.
• Ctrl then u.
• Ctrl then o.
• Ctrl then b.
• Ctrl then 1.
• Ctrl then 2.
• Ctrl then 3.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 69
• Ctrl then 4.
• Ctrl then 5.
• Ctrl then 6.
• Ctrl then 7.
• Ctrl then 8.
• Ctrl then 9.
• Ctrl then 0.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 70
// The following is an example of how to create a custom card
[Link]({
id: 'id',
title: 'title',
titleTooltip: 'titleTooltip',
icon: 'icon',
iconTooltip: 'iconTooltip',
summary: 'summary',
menuTimeout: 10000,
legTitle: 'legTitle',
legTitleIcon: 'legTitleIcon',
legTitleTooltip: 'legTitleTooltip',
establishedTime: new Date(),
updatableTimer: true,
countdownTimer: false,
countdownDuration: 30000,
customShortcuts:[{
combo: 'Ctrl + Shift + h',
buttonIdentifier: 'buttonToClick',
action: function (data) {
[Link]('info', [Link] + ' passed to callback');
}
}],
buttons: [{
title: 'accept',
positionIndex: '1',
icon: 'aoc-accept-call',
color: 'green',
uniqueIdentifier: 'buttonToClick',
action: function (data) {
[Link]('accept clicked');
[Link]('info', 'The button is attached to ' + [Link]);
}
},{
title: 'button-2',
positionIndex: '2',
icon: 'aoc-hold',
isContextMenu: true,
inputWithButton: {
placeholder: 'Input field',
buttonIcon: 'aoc-voice-active',
buttonTooltip: 'My purpose here is to submit the input field value',
action: function (value) {
[Link]('info', value + ' submitted');
}
},
menuItems: [{
title: 'dropdown-menu-item-1',
tooltip: 'tooltip-dropdown-menu-item-1',
action: function () {[Link]('dropdown-menu-item-1 clicked')}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 71
},{
title: 'dropdown-menu-item-2',
action: function () {[Link]('dropdown-menu-item-1 clicked')}
}]
}],
interactionData: {
workRequestId: '23498734598723049'
},
focusOnCreated: true
});
updateCustomCard(data)
This method allows third-party developers to update existing custom work cards. Throttling of
one update per second is enforced on custom card updates to ensure better rendering
performance and to prevent flickering or unwanted UI artifacts. This method updates an existing
custom Card that is displayed in the Work Card Area in Workspaces. This method accepts the
data (required) parameter: a JavaScript Object used to configure the content, behaviour and
look of the Custom Card.
The data object passed to updateCustomCard method can contain the following properties:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 72
Parameter Type Required Description
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 73
Parameter Type Required Description
Class name of icon to display for
Icon string Yes button (see neo framework for
possible values).
Name of color to use for button
color string Yes Possible values: ['green', 'yellow',
'red', 'blue'].
No - Property
available on Custom Card ID to give button access
customCardId string
button callback to which card button is attached to.
object
Callback executed when button has
action function No
been clicked.
Button will be a dropdown menu and
isContextMenu boolean No
should contain menuItems.
No/ Yes if
Array of menu items to display in drop
menuItems menuItem[] isContextMenu
down list.
is true
Input with a button icon. If set, will be
placed at the top of the context menu.
inputWithButton object No
Can be used only if isContextMenu is
true.
Unique index ranging from 1 to 6 used
to determine position of button. Button
positionIndex string Yes will not display unless a valid index is
specified. If 2 buttons have the same
index, only the first will display.
The menuItem object must be in the following format:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 74
The subMenuItem object must be in the following format:
deleteCustomCard(data)
This method removes a custom Card from the Work Card Area in Avaya Workspaces. This
method accepts the data (required) parameter: a JavaScript Object used to configure the
content, behaviour and look of the Custom Card.
The data object passed to deleteCustomCard method can contain the following properties:
createCustomStatePanel(data)
This method allows third-party developers to create a custom state panel. The custom state
panel can be customized to display a title, color and timer, with the option to add up to five
channel icons. The custom state panel will match the display of the existing State panel in the
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 76
footer (that is compressed and uncompressed layouts). When a custom state panel is being
displayed, the standard state panel will not be displayed. This method creates a custom state
panel that will be displayed in the footer area in Workspaces. This method accepts the data
(required) parameter: a JavaScript Object used to configure the content, behaviour and look of
the Custom State Panel.
Note: Only one instance of a Custom State Panel can exist in Avaya Workspaces at any given
time.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 77
Parameter Type Required Description
Displayed as part of the icon
reasonCode string No tooltip when the channel is
not ready
The following code block displays an example of creating Custom State Panel:
[Link]({
timer: true,
color: 'blue',
title: 'Awaiting Nailup Call',
reasonCodes: ['Break', 'Lunch', 'Training'],
mandatoryCodes: true,
channels : [
{readyIcon: 'aoc-chat', notReadyIcon: 'aoc-chat-missed', ready: true, name:
'Chat'},
{readyIcon: 'aoc-email', notReadyIcon: 'aoc-email-missed', ready: false, name:
'Email', reasonCode: 'Example Reason Code'}
],
});
updateCustomStatePanel(data)
This method updates a custom state panel that will be displayed in the footer area in Avaya
Workspaces. This method accepts the data (required) parameter: a JavaScript Object used to
configure the content, behaviour and look of the Custom State Panel.
Note: Only one instance of a Custom State Panel can exist in Avaya Workspaces at any given
time.
The following code block displays an example of updating Custom State Panel:
[Link]({
timer: true,
color: 'blue',
title: 'Awaiting Nailup Call',
reasonCodes: ['Break', 'Lunch', 'Training'],
mandatoryCodes: true,
channels : [
{readyIcon: 'aoc-chat', notReadyIcon: 'aoc-chat-missed', ready: true, name:
'Chat'},
{readyIcon: 'aoc-email', notReadyIcon: 'aoc-email-missed', ready: false, name:
'Email', reasonCode: 'Example Reason Code'}
],
});
deleteCustomStatePanel()
This method removes a custom state panel from the footer area in Avaya Workspaces.
The following code block displays an example of deleting Custom State Panel:
[Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 79
updateMenuItems(data, id)
This method updates the menu items and submenu items contained inside a context menu
button on a custom card. This method is intended to be called from within an action callback on
a button object. Context menu buttons get their unique id passed to the action callback so that it
can be passed to the updateMenuItems API function.
Note: There is an eight second timeout on this update function. If the data does not get returned
from the third-party widget through to the widget API within eight seconds of the button click, the
menu will not load the items and will display 'Unable to load menu items'.
This method accepts the following parameters:
• data (required): An array of menu item JavaScript Objects used to configure the menu
content.
• id (required): The id of the context menu button that was clicked. This property is passed
to the action property function. See below example:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 80
}
},{
title: 'Cathal Jackson',
action: function (data) {
[Link]('info', [Link] + ' pressed');
}
}],
},
{
title: 'Disposition Codes',
tooltip: 'Disposition Codes',
subMenuItems: [{
title: 'Callback Customer',
tooltip: '999',
action: function (data) {
[Link]('info', [Link] + ' pressed');
}
},{
title: 'Discount Offered',
tooltip: '766',
action: function (data) {
[Link]('info', [Link] + ' pressed');
}
}],
}
];
searchEnterpriseDirectory(text)
This method searches the enterprise directory (LDAP) for contacts. This method only executes
if the enterprise directory is configured correctly. See the
[Link]() method,
onEnterpriseServiceAvailableEvent and
onEnterpriseServiceUnvailableEvent on how to check for this.
Note: If multiple widgets using this method are added to the same layout (such as Home, Voice,
Email), each widget in the layout receives the same
onEnterpriseContactsReceivedEvent event data. However, each interaction layout
receives unique event data. For example, if you click on the one voice work card and search via
a widget, then click on a separate voice work card, each of the two layouts retains its own
contact search state.
This method accepts the text parameter: the search text. You may search by name, email
address or department.
// Search for a contact
[Link]('Michael D Higgins');
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 81
See the address-book sample widget for further demonstration.
isEnterpriseContactsServiceAvailable()
This method checks if the enterprise directory contacts search is available to make a search.
This returns false if the AADS URL is not set in System Manager or an invalid URL has been
used. Otherwise, it returns true. If this returns false, the widget should react to ensure the
Agent is not allowed to perform a search from the widget. That is search field should be
disabled.
This method is used in conjunction with onEnterpriseServiceAvailableEvent and
onEnterpriseServiceUnvailableEvent events to ensure that the value is accurate in
the scenario where the widget misses these events while loading.
// Check if enterprise directory contacts search is available
var isEnterpriseContactsServiceAvailable =
[Link]();
unregister
You can call this method during the clean-up stage to unregister and unload the current widget.
[Link]();
startWork()
This method logs in an agent and puts them into a Ready state. This method only executes if
the [Link] capability is set to true. See Capabilities section for more
information.
// Start Work
[Link]();
startWorkNotReady()
This method logs in an agent and puts them into a Not Ready state. This method only executes
if the [Link] capability is set to true. See Capabilities section for more
information.
// Start Work in a Not Ready state
[Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 82
setAgentReady()
This method puts an agent into a Ready state. This method only executes if the
[Link] capability is set to true. See Capabilities section for more
information.
// Put agent into a Ready state
[Link]();
setAgentACW()
This method puts an agent into an After Contact Work state. This method relies on capabilities
and only executes if the [Link] capability is set
to true. See Capabilities section for more information.
Note: This is an Elite only feature and will not work on Oceana environments. The 'Enable After
Contact Work' setting must also be enabled through the Workspaces Administrator Settings for
this method to execute.
// Put agent into an After Contact Work state
[Link]();
finishWork()
This method logs out an Agent (but does not exit Avaya Workspaces) and puts them into
a Connected state. This method only executes if the [Link] capability is
set to true. See Capabilities section for more information.
// Log out agent
[Link]();
additionalWork(code)
This method puts an agent into Additional Work mode. This method only executes if the
[Link] capability is set to true. See Capabilities section for more
information.
This method accepts the code parameter: the additional work code to put agent into Additional
Work mode.
// Put agent into Additional Work mode with Additional Work Code
var code = [Link]()[0];
[Link](code);
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 83
See the agent-state sample widget for further demonstration.
setAgentNotReady(code)
This method puts an agent into a Not Ready state with a Not Ready Reason Code. This method
only executes if the [Link] capability is set to true. See
Capabilities section for more information.
This method accepts the code parameter: the reason code to set agent not ready.
bidi(element)
If element is not specified, this method returns direction of the whole document ('ltr' or 'rtl').
Otherwise, this method determines and returns dir applied to specified element.
This method accepts the element parameter: HTML node to determine direction of.
// Get direction of document
var dir = [Link](); // returns 'rtl' in case if rtl-language
// is selected by agent; returns 'ltr' otherwise
forceReload()
This method forces page to reload without showing dialog box.
// Force page reload
[Link]();
setFocus(interactionId)
This method sets focus on interaction. This method accepts the interactionId parameter: id of
interaction that should be focused.
// Set focus on interaction
[Link](interactionId);
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 84
getOverrideUrl()
This method gets the Override URL set by an Administrator through the Widget Manager, or null
if not set.
Note: The widget must have been built in Workspaces 3.7 or later in order for the override
library URL to work. See Widget Manager section for more information.
// Get the Override URL
var url = [Link]();
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 85
Appendix II: Widget API Events
The Widget API exposes the onDataEvent method to allow widgets to subscribe to various
data events delivered by Workspaces. Ensure that events marked as Requires Interaction
require an interaction context. Any widget leveraging these events will need to be placed on an
Interaction related tab.
The following code block describes how you can subscribe widgets to a data event:
var event = 'onInteractionEvent';
[Link](event, callback);
function callback(data) {
// do something with event data
}
The list below gives information about every event available in Workspaces.
onInteractionEvent
This event is triggered when a new work card (interaction) appears in Workspaces. It is also
triggered each time the interaction is updated. The state property can be used to determine
what state the interaction is currently in (ACTIVE, ALERTING, HELD).
onChannelStatusUpdateEvent
This event is triggered when the status of a channel on a Custom State Panel gets updated.
[Link]('onChannelStatusUpdateEvent', function (data) {
if ([Link]){
[Link]([Link] + ' is ready');
} else {
[Link]([Link] + ' is not ready');
}
// do something with event data
});
onUserTypingEvent
This event is triggered while user is typing. This event is only triggered once every six seconds.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 87
See the interaction-messenger sample widget for further demonstration.
onFileUploadEvent
This event is triggered after a file upload to the server has been completed.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 88
"partId": "5399B8DF-7038-42B6-9F67-64B9C178D132",
"mimeType": "image/jpeg",
"name": "test_img.JPG",
"size": 8233,
"address":
"[Link]
9F67-64B9C178D132"
}
],
"sendTo": [],
"type": "WEBCHAT",
"chatMessageEvent": {
"type": null,
"subject": "",
"participants": [
{
"participantType": "AGENT",
"participantSubtype": null,
"participantName": "Test Agent",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantSubtype": null,
"participantName": "user test",
"participantAddress": "test@[Link]",
"muted": false,
"isSelf": false
}
],
"chatEventType": "TRANSFERRED_FILE"
},
"customData": null,
"sensitivity": "PUBLIC",
"importance": "NORMAL"
}
}
onEmailAttachmentUploadEvent
This event is triggered after a email attachment upload to the server has been completed.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 89
{
"attachments": [
{
"partId": "5399B8DF-7038-42B6-9F67-64B9C178D132",
"mimeType": "image/jpeg",
"name": "test_img.JPG",
"size": 8233,
"address":
"[Link]
9F67-64B9C178D132"
}
]
}
onFileTransferInitiatedEvent
This event is triggered when the customer starts downloading the file.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 90
"messageEvent": null,
"flags": {
"sensitivity": "PUBLIC",
"importance": "NORMAL",
"encoding": "PLAIN",
"doNotForward": false
},
"parts": [
{
"partId": "5399B8DF-7038-42B6-9F67-64B9C178D132",
"mimeType": "image/jpeg",
"name": "test_img.JPG",
"size": 8233,
"address":
"[Link]
9F67-64B9C178D132"
}
],
"sendTo": [],
"type": "WEBCHAT",
"chatMessageEvent": {
"type": null,
"subject": "",
"participants": [
{
"participantType": "AGENT",
"participantSubtype": null,
"participantName": "Test Agent",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantSubtype": null,
"participantName": "user test",
"participantAddress": "test@[Link]",
"muted": false,
"isSelf": false
}
],
"chatEventType": "CUSTOMER_DOWNLOAD_INITIATED"
},
"customData": null,
"sensitivity": "PUBLIC",
"importance": "NORMAL"
}
}
onFileTransferCompleteEvent
This event is triggered when the file is fully transferred.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 91
var api = new WidgetAPI(params);
[Link]('onFileTransferCompleteEvent', function (data) {
// do something with the event data
[Link](data);
});
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 92
"type": null,
"subject": "",
"participants": [
{
"participantType": "AGENT",
"participantSubtype": null,
"participantName": "Test Agent",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantSubtype": null,
"participantName": "user test",
"participantAddress": "test@[Link]",
"muted": false,
"isSelf": false
}
],
"chatEventType": "CUSTOMER_DOWNLOAD_COMPLETE"
},
"customData": null,
"sensitivity": "PUBLIC",
"importance": "NORMAL"
}
}
onInteractionEndedEvent
This event is triggered when a work card (interaction) has been ended. This occurs for all
interaction types. This event is only useful when ACW is enabled so that the widget can be used
to trigger some custom logic when an interaction has ended. Otherwise, as per usual, the
widget will be destroyed once the interaction has ended.
This client side only event is quite limited as the backend does not support an ENDED
interaction state, only ALERTING, ACTIVE and HELD. Therefore, you will see that the event is
triggered in the following scenarios for Voice:
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 93
var api = new WidgetAPI(params);
[Link]('onInteractionEndedEvent', function (data) {
// do something with the event data
[Link](data);
});
onCRMDataEvent
If CRM integration is enabled and configured in Workspaces this event is triggered when there
is CRM customer data available for the current work card interaction.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 94
"phone_fax": "(312) 596-1500",
"first_name": "John",
"phone_home": "(312) 596-1000",
"user_id": "00358000001aSR2AAM",
"last_name": "Sutherland",
"address": {
"city": null,
"country": null,
"countryCode": null,
"geocodeAccuracy": null,
"latitude": null,
"longitude": null,
"postalCode": null,
"state": null,
"stateCode": null,
"street": "2334 N. Michigan Avenue, Suite 1500\r\nChicago, IL 60601, USA"
},
"address_city": null,
"address_country": null,
"geo_latitude": null,
"geo_longitude": null,
"address_zip": null,
"address_state": null,
"address_street": "2334 N. Michigan Avenue, Suite 1500\r\nChicago, IL 60601, USA",
"phone_mobile": "(312) 596-1563",
"name": "John Sutherland",
"phone_primary": "(312) 596-1000",
"avatar_url": "/services/images/photo/00358000001aSR2AAM",
"title": "VP, Facilities",
"id": "6625a233-abbb-4d0d-9c08-9c421526c614",
"cases": [
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000o6e5AAA"
},
"case_number": "00001013",
"user_id": "00358000001aSR2AAM",
"created_at": "2015-12-29T[Link].000+0000",
"case_closed": true,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Web",
"case_priority": "Medium",
"case_reason": "Equipment Design",
"case_status": "Closed",
"case_subject": "Starting up generator consumes excessive power",
"case_type": "Other"
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000o6e6AAA"
},
"case_number": "00001014",
"user_id": "00358000001aSR2AAM",
"created_at": "2015-12-29T[Link].000+0000",
"case_closed": true,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Phone",
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 95
"case_priority": "High",
"case_reason": "Installation",
"case_status": "Closed",
"case_subject": "Delay in installation; spare parts unavailable",
"case_type": "Other"
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x7z1AAA"
},
"case_number": "00001044",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Email",
"case_priority": "Medium",
"case_reason": null,
"case_status": "New",
"case_subject": "Power generation below stated level",
"case_type": null
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x84zAAA"
},
"case_number": "00001079",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Phone",
"case_priority": "High",
"case_reason": "Breakdown",
"case_status": "Escalated",
"case_subject": "Frequent mechanical breakdown",
"case_type": "Mechanical"
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x80sAAA"
},
"case_number": "00001060",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Phone",
"case_priority": "High",
"case_reason": "Equipment Design",
"case_status": "Working",
"case_subject": "Motor design hindering performance",
"case_type": "Mechanical"
},
{
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 96
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x7wbAAA"
},
"case_number": "00001037",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Phone",
"case_priority": "Low",
"case_reason": null,
"case_status": "New",
"case_subject": "Maintenance guidelines for generator unclear",
"case_type": null
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x89pAAA"
},
"case_number": "00001096",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Phone",
"case_priority": "Low",
"case_reason": null,
"case_status": "New",
"case_subject": "Customer reported another part DRP23423OD failed during
test",
"case_type": null
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x8AnAAI"
},
"case_number": "00001104",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Email",
"case_priority": "Low",
"case_reason": null,
"case_status": "Working",
"case_subject": "Component part DPR3423DOD was shipped to customer",
"case_type": null
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x7zuAAA"
},
"case_number": "00001052",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 97
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Web",
"case_priority": "Low",
"case_reason": "Feedback",
"case_status": "New",
"case_subject": "Easy installation process",
"case_type": "Other"
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x891AAA"
},
"case_number": "00001089",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Email",
"case_priority": "Medium",
"case_reason": null,
"case_status": "New",
"case_subject": "Wrong component part ordered from manufacturer",
"case_type": null
},
{
"attributes": {
"type": "Case",
"url": "/services/data/v34.0/sobjects/Case/50058000000x83XAAQ"
},
"case_number": "00001072",
"user_id": "00358000001aSR2AAM",
"created_at": "2016-05-13T[Link].000+0000",
"case_closed": false,
"case_deleted": false,
"case_escalated": false,
"case_origin": "Email",
"case_priority": "Medium",
"case_reason": "Installation",
"case_status": "Escalated",
"case_subject": "Delay in installation; spare parts unavailable",
"case_type": "Other"
}
]
}
onContextDataEvent
This event is triggered when customer and context data is available in Chat, SMS, Messaging,
Email and Social work cards. This event can be used to obtain customer details and customer
history data from Chat, SMS, Messaging, Email and Social interactions. You can retrieve max
allowed characters limitations (which is best to manage in your widget) using the
clientValidation array passed within common data object. Depending on your interaction
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 98
channel (Chat, SMS or Social) you're going to get different validation entries with [Link] field
equal to WEBCHAT_MAX_CHAR, SMS_MAX_CHAR or SOCIAL_MAX_CHAR respectively.
Note: Requires Interaction.
[Link]('onContextDataEvent', callback);
function callback(data) {
// do something with event data
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 99
"subject": "subject1",
"priority": "priority1",
"type": "type1",
"href":
"[Link]
34",
"createdDate": "2017-09-19T[Link].763Z"
},
"description": "",
"id": "f514d6eb-58c3-4750-bb26-f0840b76dd37"
},
{
"type": "CUSTOMER_HISTORY",
"data": {
"status": "status2",
"subject": "subject2",
"priority": "priority2",
"type": "type2",
"href":
"[Link]
71",
"action": "action1",
"id": "id1",
"createdDate": "2017-09-19T[Link].763Z"
},
"description": "",
"id": "96d633e2-9f26-40b9-bf9c-3fbf5241dec3"
}
],
"contextStore": [
{
"type": "CONTEXT_STORE",
"data": "716391",
"description": "Prompted Digits Data",
"id": "a9a65201-0c72-4c1f-8735-9635f064a016"
}
],
"campaignScripts": [
{
"type": "CAMPAIGN_SCRIPT",
"description": "",
"id": "a98416b5-f071-415c-9dfb-5e04af2c70cf",
"data": "[Link]
},
],
"cobrowse": [
{
"type": "COBROWSE",
"id": "45d8c424-796c-466d-8846-41a73c0f43b5",
"data": {
"url": "[Link]
"description": "Cobrowse welcome page"
}
},
],
"fromAddresses": [
{
"type": "ORIGINATOR",
"data": {
"address": "info@[Link]",
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 100
"description": "text1"
},
"description": "",
"id": "9e9c21d6-dc9e-4603-9046-fe8678d18b8a",
},
{
"type": "ORIGINATOR",
"data": {
"address": "sales@[Link]",
"description": "text2"
},
"description": "",
"id": "863bb132-912c-4013-93e3-8c2af6062dd2",
},
"id": "3bcac1e6-bb7a-4a51-91e7-9777447b70a9",
"interactionId": "db07dc7c-11e6-4f93-9abe-7924bb90b46f"
],
"pagePushUrl": [
{
"type": "PAGE_PUSH",
"data": {
"description": "description1",
"url": "url1"
},
"id": "dcb5e8ea-0d24-42fc-97ab-524f60e1991d",
},
{
"type": "PAGE_PUSH",
"data": {
"description": "description2",
"url": "url2"
},
"id": "3d47b685-1167-44f0-8912-1d06d6a8bc21"
}
],
"screenPop": [
{
"type": "SCREEN_POP",
"id": "b6a9bc1c-ece7-4379-8c39-aaf5d46452c7",
"data": {
"action": "NONE"
"name": "Maps"
"scope": "INTERNAL"
"trigger": "ACTIVE"
"uri":
"[Link] -
9.188836092077002!3d53"
}
},
{
"type": "SCREEN_POP",
"id": "7eb9082e-9bcf-45a9-a033-406a16961303",
"data": {
"action": "CLOSE_ON_END"
"name": "Google"
"scope": "INTERNAL"
"trigger": "ACTIVE"
"uri": "[Link]
}
},
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 101
],
"suggestedPhrase": [
{
"type": "SUGGESTED_PHRASE",
"data": {
"name": "name1",
"text": "text1"
},
"description"": "",
"id": "962641e5-544c-4eff-9321-3546a0511f0c",
},
{
"type": "SUGGESTED_PHRASE",
"data": {
"name": "name2",
"text": "text2"
},
"description": "",
"id": "78ccd9c3-326f-436b-adb3-3e922f9937b0",
},
],
"Agent ID": "10002"
"Station ID": "1002"
}
onMediaEvent
This event is triggered when an incoming Chat, SMS, Messaging, Email or Social interaction is
accepted by the user (Agent / Supervisor). This event can be used to obtain Chat, SMS,
Messaging, Email or Social related data such as participants or previously sent media
messages.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 102
"participantType": "CUSTOMER",
"participantName": "Josh Davis",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": false
},
"messageEvent": null,
"flags": {
"read": true,
"sensitivity": "CONFIDENTIAL",
"importance": "LOW"
},
"parts": [],
"sendTo": [],
"type": "WEBCHAT",
"chatMessageEvent": {
"subject": "messageEventSubject",
"participants": [
{
"participantType": "AGENT",
"participantName": "Name Steve",
"participantAddress": "1003",
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantName": "Josh Davis",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": false
}
],
"chatEventType": "MESSAGE"
},
"read": true,
"sensitivity": "CONFIDENTIAL",
"importance": "LOW"
}
],
"participants": [
{
"participantType": "AGENT",
"participantName": "Name Steve",
"participantAddress": "1003",
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantName": "Josh Davis",
"participantAddress": "(503) 421-9800",
"muted": false,
"isSelf": false
}
]
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 103
onMediaMessageEvent
This event is triggered when incoming Chat, SMS, Messaging, Social or Email messages are
sent to the user (Agent / Supervisor). This event can be used to obtain Chat, SMS, Messaging
or Social messages and pass them to the widget. In the case of Email, data is received as a
single Email message and it can contain data formatted as text or HTML.
[Link] = [Link];
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 104
],
"chatEventType": "MESSAGE"
},
"read": true,
"sensitivity": "CONFIDENTIAL",
"importance": "LOW"
}
onPagePushUrlEvent
This event is triggered when page push URLs are sent from the Suggested Content widget
while working on a Chat, SMS or Social interaction.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 105
"muted": false,
"isSelf": true
},
{
"participantType": "CUSTOMER",
"participantName": "Pat Stumuller",
"participantAddress": "(014) 427-4427",
"muted": false,
"isSelf": false
}
],
"chatEventType": "PAGE_PUSH"
},
"read": true,
"sensitivity": "PUBLIC",
"importance": "LOW"
}
onAgentStateEvent
This event is triggered whenever the agent state changes. This event provides information to
widgets on the current state and reason codes as well as the agent's current capabilities.
[Link]('onAgentStateEvent', callback);
function callback(data) {
// do something with event data
}
onNavigationEvent
This event is triggered whenever an icon in the sidebar is clicked. This event can inform widgets
whenever the user navigates or selects a sidebar icon.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 106
[Link]('onNavigationEvent', callback);
function callback(data) {
// do something with event data
}
onLocaleUpdatedEvent
This event is triggered whenever the language setting changes in Workspaces.
[Link]('onLocaleUpdatedEvent', callback);
function callback(data) {
// do something with event data
}
onBeforeTextDirectionChangedEvent
This event is triggered immediately before the document text direction changes as in case
Agent switched from English to Arabic language. This event is triggered when the text direction
in Workspaces changes. Document text direction is set on \ element with dir property.
[Link]('onBeforeTextDirectionChangedEvent', callback);
function callback(data) {
[Link]('Text direction is going to be changed from ', [Link], ' to ',
[Link]);
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 107
onStylesheetsReadyEvent
This event is triggered whenever the bidi-alternative stylesheets (re)loading has completed. This
event is triggered only when actual document text direction changes, so when agent switches
from any LTR language (EN, FR, RU) to any RTL language (AR, HE) and vice-versa. It is not
triggered if text direction of considered languages remains the same.
Note: this event is triggered even if your widget does not use separated styles for LTR and RTL
as far as Workspaces itself has built-in bidi-alternative stylesheets.
[Link]('onStylesheetsReadyEvent', callback);
function callback() {
[Link]('All bidi-alternative stylesheets are loaded!');
}
onObserveEvent
This event is triggered to indicate that the current interaction is being observed. This is limited to
AWFOS and not to be confused with supervisor observing of Chats / SMS.
[Link]('onObserveEvent', callback);
onCapabilitiesEvent
This event is triggered when the agent or interaction capabilities have been updated.
Note: The getCapabilities API method can also be used to retrieve the latest capabilities
at any time.
[Link]('onCapabilitiesEvent', callback);
function callback(data) {
// do something with event data
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 108
{
interaction: {
canAccept: false,
canEnd: true,
canHold: true,
canUnhold: false,
canSingleStepTransfer: true,
canConsult: true,
canTransferComplete: false,
canConferenceComplete: false,
canSetDispositionCode: true,
canSetWorkCode: true,
canSendDtmf: true,
canSendMessage: true,
},
channels: {
canStartVoiceInteraction: true
}
}
onRequestServicesEvent
This event is triggered when an interaction requests its transfer to service list.
[Link]('onRequestServicesEvent', callback);
function callback() {
// do something when event is triggered
}
onMessageEvent
This event is triggered when other widgets broadcast a data message by using the
sendMessage API method. This event is used primarily for inter-widget communication. This
event will return anything that is sent via the sendMessage API method.
[Link]('onMessageEvent', callback);
function callback(data) {
// do something with event data
}
onTeamMemberEvent
This event is triggered when an agent is expanded in the supervisor dashboard. The object that
is returned from this event is the expanded agent object.
[Link]('onTeamMemberEvent', callback);
function callback(data) {
// do something with team member data
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 109
The following code block displays the payload:
{
"userHandle":"mRuane",
"state":"READY",
"capabilities":{
"canLogin":false,
"canSetNotReady":true,
"canLogout":true,
"canSetReady":false,
"canDeactivate":false,
"canSupervisorSetReady":false,
"canSupervisorSetNotReady":true,
"canSupervisorLogout":true
},
"interactions":[
{
"id":"738fbd59-3e07-47fd-af4e-a280c8a08c7a",
"state":"ACTIVE",
"channel":"WEBCHAT",
"direction":"INCOMING",
"created":"2018-05-01T[Link].901Z",
"establishedTime":"2018-05-01T[Link].901Z",
"topic":"Oceana Service",
"isCustomerInteraction":true,
"originatingAddress":"(014) 427-4427",
"destinationAddress":"1001",
"workRequestId":"0074518545435242185724",
"capabilities":{
"canReject":false,
"canSetUui":true,
"canConsult":false,
"canTransferComplete":false,
"canEnd":true,
"canConferenceComplete":false,
"canSetWorkCode":true,
"canSetDispositionCode":true,
"canExtendACW":false,
"canSingleStepTransfer":true,
"canSingleStepTransferToService":true,
"canUnmute":false,
"canUnhold":false,
"canCompleteACW":false,
"canMute":false,
"canSetACW":true,
"canHold":false,
"canIgnore":false,
"canAccept":false,
"canSendDtmf":false,
"canForward":true,
"canSendMessage":true,
"canObserve":true,
"canBarge":false,
"canCoach":false,
"canReply":true,
"canSingleStepConference":false,
"canDefer":false
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 110
},
"isObserved":false
}
],
"channels":[
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":true,
"canCancelCallForwarding":true,
"canStartInteraction":true,
"canStartSupervisorInteraction":true
},
"channelType":"VOICE",
"id":"ad1cbec8-fe15-482b-8085-7d9c7f13f761",
"$$hashKey":"object:644"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":false,
"canCancelCallForwarding":false,
"canStartInteraction":false,
"canStartSupervisorInteraction":false
},
"channelType":"WEBCHAT",
"id":"0aeed53d-a50d-46bf-8e7d-681164d90746",
"$$hashKey":"object:645"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":false,
"canCancelCallForwarding":false,
"canStartInteraction":true,
"canStartSupervisorInteraction":false,
"canRetrieveInteractions":false
},
"channelType":"EMAIL",
"id":"8cc86248-c214-4b27-81b7-c4ae103b637b",
"$$hashKey":"object:639"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 111
"capabilities":{
"canSetCallForwarding":false,
"canCancelCallForwarding":false,
"canStartInteraction":false,
"canStartSupervisorInteraction":false
},
"channelType":"SMS",
"id":"2872a9e0-0edc-4126-9b1c-05b22b2c8beb",
"$$hashKey":"object:641"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":false,
"canCancelCallForwarding":false,
"canStartInteraction":false,
"canStartSupervisorInteraction":false
},
"channelType":"SOCIAL",
"id":"bb58757e-6115-4ca8-bb57-9075d32fa697",
"$$hashKey":"object:642"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":true,
"canCancelCallForwarding":true,
"canStartInteraction":true,
"canStartSupervisorInteraction":true
},
"channelType":"VIDEO",
"id":"fefef219-05b0-4a46-9ad9-681e8e941edf",
"$$hashKey":"object:643"
},
{
"state":"READY",
"stateReason":"DEFAULT",
"reasonCode":"",
"providerName":"ngdemc",
"capabilities":{
"canSetCallForwarding":true,
"canCancelCallForwarding":true,
"canStartInteraction":true,
"canStartSupervisorInteraction":true
},
"channelType":"GENERIC",
"id":"dc3ad786-adef-4acb-8c56-8689e05dba72",
"$$hashKey":"object:640"
}
]
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 112
onEnterpriseContactsReceivedEvent
This event is triggered when an Enterprise Directory search has completed and contacts have
been received. This event will return a maximum of 26 results. The Agent must refine in order to
find a better match.
[Link]('onEnterpriseContactsReceivedEvent', callback);
function callback(data) {
[Link] = [Link];
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 113
phones: [{
number: '0916979143',
type: 'PHONE_NUMBER_WORK',
isDefault: true
}],
emails: [{
address: 'mosalah@[Link]',
type: 'EMAIL_ADDRESS_WORK',
isDefault: true
}],
address: {
street: 'Anfield Road',
city: 'Liverpool',
state: 'Liverpool',
country: 'UK',
postalCode: 'L40TH'
}
}
]
onEnterpriseServiceAvailableEvent
This event is triggered when the Enterprise Directory service becomes available. Only when this
is available should the Agent be allowed to perform a search.
[Link]('onEnterpriseServiceAvailableEvent', callback);
function callback() {
// We can now perform a search of the enterprise directory
[Link] = true;
}
onEnterpriseServiceUnavailableEvent
This event is triggered when the Enterprise Directory service becomes unavailable. When this
occurs, the Agent should not be allowed to perform a search from the widget, that is search field
should be disabled.
[Link]('onEnterpriseServiceUnavailableEvent', callback);
function callback() {
// Search of the enterprise directory is no longer available
[Link] = false;
}
onCustomCardDeletedEvent
This event is triggered when a custom card has been deleted.
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 114
[Link]('onCustomCardDeletedEvent', callback);
function callback() {
// do something with the event data
[Link](data);
}
onCardFocusedEvent
This event is triggered when the interaction is focused.
[Link]('onCardFocusedEvent', callback);
function callback(data) {
// We can do something when an interaction is focused
}
onSSOTokenRefreshEvent
This event is triggered when the SSO token is refreshed.
[Link]('onSSOTokenRefreshEvent', callback);
function callback(data) {
// We can do something here with the new token
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 115
Appendix III: Examples
function widgetComponent(WidgetAPI) {
function widgetContainer(scope, element, params) {
var api = new WidgetAPI(params);
[Link] = function(message) {
[Link](message, 'random-id');
[Link]('info', 'Widget: ' + message);
};
// interaction event fired when a new interaction comes in or has been updated
[Link]('onInteractionEvent', function(data) {
[Link] = data;
});
// interaction ended event fired when the interaction card has ended
[Link]('onInteractionEndedEvent', function(data) {
[Link] = data;
});
// media message data from chat, sms, email and social interactions
[Link]('onMediaMessageEvent', function(data) {
[Link] = data;
});
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 116
// page push url message data from chat, sms, social
[Link]('onPagePushUrlEvent', function(data) {
[Link] = data;
});
return {
scope: {},
replace: true,
template: template,
link: widgetContainer
};
}
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 117
class AgentComponent extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
// Get parameters passed to the web component as attributes by context canvas.
const interactionId = [Link]("interaction-id");
const workRequestId = [Link]("work-request-id");
const externalInteractionId = [Link]("external-interaction-id");
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 118
interactionId,
workRequestId,
externalInteractionId
});
[Link] = [Link]();
[Link] = "100%";
[Link] = "100%";
[Link] = "100%";
[Link](div);
}
</div>
</div>
</div>`;
}
replaceTemplate(data) {
const templateDiv = [Link]("#simpleTemplateDiv");
let innerHTML = `<table class="neo-table"><thead>
<th>Attribute</th>
<th>Value</th>
</thead>
<tbody>
<tr>
<td>State</td>
<td>${[Link]}</td>
</tr>
<tr>
<td>Reason Code</td>
<td>${[Link]}</td>
</tr>`;
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 119
Prompted Digits
You can obtain prompted digits from context store data using the Widget API. Then you can use
these digits to trigger behaviour in Avaya Workspaces such as opening a PDF relating to a
customer ID as demonstrated in the prompt-digits sample widget.
If you wish to access the prompted digits from a customer call from a widget, consult the
onInteractionEvent description in the Appendix II: Widget API Events.
The following code blocks display how the context store information is retrieved by subscribing
to the onContextDataEvent. The prompt-digits widget subscribes to the
onContextDataEvent and passes a URL to an iFrame hosted by the widget that will retrieve
a PDF corresponding to the prompt digits retrieved from context store.
var api = new WidgetAPI(params);
[Link] = function(url) {
return $[Link](url);
};
[Link]('onContextDataEvent', function(data) {
[Link] = [Link][0].data;
[Link] = [Link]('_cc.libraryUrl') + '/prompt-
digits/assets/' + [Link][0].data + '.pdf';
});
<div class="neo-widget">
<div class="neo-widget__content">
<iframe src="{% raw %}{{ ::pdfUrl }}{% endraw %}" width="100%" height="100%"
frameborder="0" allowfullscreen></iframe>
</div>
</div>
_____________________________________________________________________________________
Avaya Workspaces Widget Development
Avaya Inc. Proprietary 120