π°Quickstart
Create a vCon in TypeScript or JavaScript β parties, dialog, analysis, serialize.
Install
npm install vcon-jsMinimal example
import { Vcon, Party, Dialog } from 'vcon-js';
const vcon = Vcon.buildNew();
vcon.subject = 'Customer Support Chat';
vcon.addParty(new Party({ tel: '+15551234567', name: 'Alice', role: 'customer' }));
vcon.addParty(new Party({ mailto: 'bob@example.com', name: 'Bob', role: 'agent' }));
vcon.addDialog(new Dialog({
type: 'text',
start: new Date().toISOString(),
parties: [0, 1],
originator: 0,
mediatype: 'text/plain',
body: 'Hi, I need help with my account.',
encoding: 'none',
}));
console.log(vcon.toJson());Recording with external media
Adding an analysis (transcript)
Declaring an extension
Lawful Basis example
Tags
Loading and saving
Common mistakes (caught in code review)
See also
Last updated
Was this helpful?