User ID, if none is specified a UUID will be generated automatically.
data-user-names
User names
data-init
Specifies whether the widget should start automatically or not.
The example bellow is the most basic implementation for the widget, and the most recommended. Only those attributes in the example are currently necessary to function normally.
typeConnect= { id:string|number; names?:string; useGroupRoom?:boolean; initialFlow?:number; userInfo?:Object; // This data can be used for derivation of bot flows }// ExamplewidgetService.connect({ id:"999999999", names:"Jhon", userInfo: { address:"St 3", ci:1234567 }}).then(() => {console.log("Success! 🚀")});
Bellow are 2 examples of the complete cdn implementation, of which we recommed using the first one, with no parameters in the connect function, just an empty object.
Start with a flow from the bot and stored parameters
someFlowId is the id number of a specific flow from the bot that is being used by the widget and someStringValue is the string value of the injected parameters.