feat: SDK API to trigger campaign #3997
Labels
feature-request
This label is used to track new features which is a significant change to existing product
need-discussion
These issues don't have a clear direction, and it requires deeper discussion to finalize
Is your feature request related to a problem? Please describe.
I'm interested in using the ongoing campaign feature to engage users during their onboarding journey. Unfortunately, the only possibility is to trigger by page visit, which isn't really versatile and not useful on Single-Page Applications.
Describe the solution you'd like
I would like to trigger a campaign using JavaScript. A proposed function would be:
window.$chatwoot.triggerCampaign('trial_started')
Describe alternatives you've considered
A hacky workaround would involve creating an element in the widget to simulate a message from the bot. It's not possible to update the messages without editing the code and it isn't update-friendly either.
The text was updated successfully, but these errors were encountered: