Creates LeadCapture instance
The configuration object for the SDK. ISdkSettings
Retrieves the lead tracker instance for managing user tracking operations.
The initialized lead tracker object.
Create a new lead with the given details.
the ILeadMetaData
the ILeadInput
The created lead ILeadCaptureResponse
Rechat SDK provides functions to easily link your form with the Rechat system for managing customer relationships (CRM).
const formElement = document.querySelector('#lead-form')
const channel = {
lead_channel: '2c55e69d-adbe-42d9-97a5-bedb43783b80'
}
sdk.Leads.form(formElement, channel)
Furthermore, a collection of events can be passed as a third parameter to the form
function.
sdk.Leads.form(formElement, channel, {
onError: (e) => {}
})
onError
triggers when form submission fails.
sdk.Leads.form(formElement, channel, {
onSuccess: () => {}
})
When the form submission is successfully executed, the onSuccess
event is triggered.
To check if your form is valid before running it, use the validate
function.
The submit function will not run if the validate form returns false
Otherwise, it will run.
sdk.Leads.form(formElement, channel, {
validate: (form) => {
if (!form.name) {
return false
}
return true
}
})
The HTMLFormElement node
The ILeadMetaData object
Collects the provided Metadata fields from the URL
List of Lead Metadata
Lead Capture
Rechat SDK provides functions to easily link your app with the Rechat system for managing customer relationships (CRM).