Reps on their own phone
A rep can take calls on their own phone instead of the browser softphone. They register the number, and we call it with a 6-digit code. Once the code is verified, device: 'phone' rings it. Each call is screened: the rep hears who is calling and presses 1 to take it. The customer sees your number, never the rep's.
const { verificationId } = await hcc.reps.phone.set('rep_123', {
e164: '+14155559999',
label: 'Mobile',
});
await hcc.reps.phone.verify('rep_123', '482913'); // the code the call read out
await hcc.reps.update('rep_123', { device: 'phone' });
// Without the desk open: record the disposition and end wrap-up.
await hcc.reps.wrapUp('rep_123', { callId: 'call_1', disposition: 'sale' });
await hcc.reps.phone.remove('rep_123'); // back to the softphone- Verification. The code is valid for 10 minutes. A rep gets at most 5 calls an hour (429
rate_limitedafter that) and 5 wrong codes per call (422too_many_attempts). Other errors are 422invalid_codeand 422code_expired. Changing the phone makes it unverified again and setsdeviceback tosoftphone. - Test keys. The verification call runs on the simulator. Read the code on
hcc.simulator.get(verificationId)'s timeline after answering it. - A phone verified with a test key only rings simulated calls. Live calls still ring the softphone until the phone is verified with a live key. Once it is, a test key gets 403
live_mode_onlyonreps.phone.set,reps.phone.removeandreps.updatewithdevice. - Screening. No 1 within a few seconds, a hang-up or voicemail counts as a missed offer. The call goes to the next rep, and the rep goes
away(missed_offer). A rep with no desk open stays available after one missed call and goes away after the second in a row. - Click-to-call.
hcc.reps.dialrings the rep's phone first, from the call's caller ID. The rep presses 1, and then the customer is dialed. - Privacy.
rep.phone.e164is masked to the last 4 digits for members who aren't owners or admins. The rep's number never appears in call or participant Events. - Events.
rep.phone.verified(the number masked) andrep.offer.missed(withdevice).