Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-contact-flow-builder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-contact-flow-builder

A JavaScript DSL and CLI tool for generating Amazon Connect Contact Flow configurations.

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Connect Contact Flow Builder

A JavaScript DSL and CLI tool for generating Amazon Connect Contact Flow configurations.

Installation

# Install with npm
npm i --save-dev connect-contact-flow-builder

# ...or with yarn
yarn add -D connect-contact-flow-builder

Usage

First, define a Contact Flow:

simpleGreeting.js

const { PlayPrompt, DisconnectHangUp } = require('connect-contact-flow-builder');

module.exports = (companyName) => {
  const mainNode = new PlayPrompt({
    text: `Welcome to ${companyName}!`,
  });
  const disconnect = new DisconnectHangUp();
  mainNode.setSuccessBranch(disconnect);

  return mainNode;
};

Then, run build-contact-flow to generate a configuration JSON:

build-contact-flow "My simple flow" simpleGreeting.js  "My Company" > simpleGreeting.json

Finally, import the generated JSON into Connect:

Image of "Simple Greeting" flow in the Contact Flow Designer

API

See API.md.

Support Table

Interact

ClassImplemented?Original nameDescription
PlayPrompt✔️Play promptDelivers an audio or chat message.
GetCustomerInputGet customer inputBranches based on customer intent.
StoreCustomerInputStore customer inputStores numerical input to contact attribute.
HoldCustomerOrAgentHold customer or agentPlaces a customer or agent on or off hold.
StartMediaStreamingStart media streamingStarts streaming media to Kinesis.
StopMediaStreamingStop media streamingStops streaming media to Kinesis.

Set

ClassImplemented?Original nameDescription
SetWorkingQueueSet working queueSpecify the queue that the contact will be transferred to.
SetContactAttributesSet contact attributesDefine and store key-value pairs as contact attributes.
ChangeRoutingPriorityAgeChange routing priority / ageAlters the priority of the contact in queue.
SetLoggingBehaviorSet logging behaviorEnables or disables Contact Flow Logs.
SetRecordingAndAnalyticsBehaviorSet recording and analytics behaviorSpecify call recording behavior and set up speech analytics. You must set up recording to use speech analytics.
SetHoldFlowSet hold flowSpecify the flow to invoke when a customer or agent is put on hold during phone call.
SetCustomerQueueFlowSet customer queue flowSpecifies the flow to run when a customer is transferred to a queue.
SetWhisperFlowSet whisper flowSpecifies the whisper played to a customer or agent for inbound and outbound calls.
SetDisconnectFlowSet disconnect flowSpecifies which contact flow to run when a customer remains on the call after the agent disconnects.
SetCallbackNumberSet callback numberSpecify an attribute to set the customer callback number.
SetVoiceSet voiceSpecify the language and voice that the customer hears during text-to-speech interactions.
GetQueueMetricsGet queue metricsLoads queue metrics for flow to use

Branch

ClassImplemented?Original nameDescription
CheckQueueStatusCheck queue statusCheck the amount of time the oldest contact has been in queue, or the queue capacity, and branch accordingly. If no match is found, the contact is routed down the No Match branch.
CheckStaffingCheck staffingBranches based on whether agents are available, staffed (for example, available, on call, or after call work), or online.
CheckHoursOfOperationCheck hours of operationChecks the hours of operation, then branches based on whether it is in hours or out of hours.
CheckContactAttributesCheck contact attributesBranches based on a comparison to the value of a contact attribute.
DistributeByPercentageDistribute by percentageRoutes customers randomly based on specified percentage.
LoopLoopRepeats the looping branch for the specified number of times. After which, the complete branch is followed.
WaitWaitWaits for a specified period of time, and optionally for specified events. This block is supported for chat only.

Integrate

ClassImplemented?Original nameDescription
InvokeAWSLambdaFunctionInvoke AWS Lambda functionMakes a call to AWS Lambda and optionally returns key/value pairs, which can be used to set contact attributes.

Terminate / Transfer

ClassImplemented?Original nameDescription
DisconnectHangUpDisconnect / hang upDisconnects the interaction.
TransferToQueueTransfer to queueEnds the current contact flow and places the customer in queue.
TransferToPhoneNumberTransfer to phone numberTransfers the customer to a phone number.
TransferToFlowTransfer to flowEnds the current flow and transfers the customer to a flow of type contact flow.

License

This software is MIT licensed.

Keywords

FAQs

Package last updated on 29 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc