Getting Started
Guides
Dialer
Quick Start
PlacementExample
Messenger
REST API

Dialer Quick Start

Placement

The dialer requires two <div> tags in your HTML. Placement is up to you.

1<!-- main dialer bar (typically spans the width of the screen) -->
2<div id="storm-dialer-bar"></div>
3
4<!-- mini click-to-call and remaining time widget -->
5<div id="storm-dialer-mini"></div>

Example

1const contacts = [{
2 contactId: '123',
3 numbers: ['8444545111', '5555554321'],
4 name: 'George Costanza',
5 firstName: 'George',
6 lastName: 'Costanza',
7 address: '2880 Broadway',
8 city: 'New York',
9}];
10
11// start a dialing campaign
12Storm.startCampaign({ contacts }).then(() =>
13 console.log('Dialing campaign started');
14);
15
16// observe when calls start
17Storm.onCallStarted(({ number }) => {
18 console.log(`Dialing ${number}...`);
19});
20
21// observe when calls end
22Storm.onCallEnded(({ number, duration }) => {
23 console.log(`Call to ${number} ended after ${duration} seconds`);
24});