Amazon Web Services

Amazon Connect Streams API Changelog #4: July & August 2018

Security Policy and Development

Amazon Connect Streams API (Streams) allows developers to create custom agent experiences for Amazon Connect. The code for Streams is hosted in GitHub and open for community contributions in the form of pull requests. This is the fourth installment of my running series covering changes to the Streams API. Prior installments can be found here:


Newly Approved Pull Requests

Since last time, there has been 1 approved pull request (PR) to Streams.


Re-initializing the CCP in Streams Apps (PR #78)

PR #78 is a code change to the core.js file that adds clean-up logic to the terminate function called when tearing down the CCP. This clean-up logic unsubscribes all existing event handlers from the Streams internal event bus, then re-initializes the bus and resets some other internal state variables as shown in the code snippet below:

* Uninitialize Connect.
connect.core.terminate = function() {
connect.core.client = new connect.NullClient();
connect.core.masterClient = new connect.NullClient();
var bus = connect.core.getEventBus();
if(bus) bus.unsubscribeAll();
connect.core.bus = new connect.EventBus();
connect.core.agentDataProvider = null;
connect.core.upstream = null;
connect.core.keepaliveManager = null;
connect.agent.initialized = false;
connect.core.initialized = false;

view raw
hosted with ❤ by GitHub

Prior to this PR, if you tore down the CCP and then tried to start it up again in a Streams app by calling initCCP, the new CCP would behave oddly. You’d get multiple event notifications in your Streams code making it difficult to manage calls. You could see this scenario if the agent signed out of Amazon Connect and then tried to log in again through your app without refreshing the browser.

Amazon Web Services - Avoid Contact Center Outages: Plan Your Upgrade to Amazon Connect
Avoid Contact Center Outages: Plan Your Upgrade to Amazon Connect

Learn the six most common pitfalls when upgrading your contact center, and how Amazon Connect can help you avoid them.

Get the Guide

Curiously, the PR also mentions that this code change fixes the video stream attaching itself to the video element. Perhaps a hint of future plans?

This PR was submitted by GitHub user dnovicki. dnovicki just joined GitHub last week. Welcome and awesome job on a PR.


New & Open Pull Requests

There is one new PR since last time and 2 open PRs at this point:

  • PR #79: Typos in gulpfile
    • This PR from GitHub user odemeulder fixes a typo in the Streams build to produce a file called “connect-streams.js” not “connect-steams.js”. It also adds a note to the documentation calling out that the tool gulp is required. I expect this PR to be approved quickly.
  • PR #64: Exposing rtc session for callstats integration
    • I covered this PR last installment; as I said this is an interesting PR that opens up possibilities for real-time monitoring but cracks open the internals of Amazon Connect in a way that could make this PR fragile to later Streams changes


Closed Pull Requests


Active Issues

Issues in Github are used to track problems, ask for help or suggest new features. An issue sometimes will end up spawning a PR for a code fix. Looking through the issues list on Github I saw a few recently updated issues I wanted to highlight:


Thanks for reading. Any questions, comments or corrections are greatly appreciated. To learn more about what we can do with Amazon Connect, check out Helping You Get the Most Out of Amazon Connect

About the Author

Peter Miller is a Solutions Architect at Perficient focused on call center solutions including Amazon Connect

More from this Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up