Skip to content

Instantly share code, notes, and snippets.

@ashleytbasinger
Created March 17, 2021 21:42
Show Gist options
  • Save ashleytbasinger/7cede0f858db2cf59f923b96d65dd6db to your computer and use it in GitHub Desktop.
Save ashleytbasinger/7cede0f858db2cf59f923b96d65dd6db to your computer and use it in GitHub Desktop.
chat_client_handoff
// load Drift and other chat client here
// if Drift should fire first, hide other chat client -- if the other way, hide Drift.
window.drift.on("conversation:buttonClicked", function(data) {
console.log(data);
if (data.buttonBody == "File a ticket") { // be sure to change text to match your implementaton
drift.unload();
// instantiate your other chat client code here (load client)
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment