Initial Try to pass prechat details from scarlett

This commit is contained in:
scottkiener-at-safelite 2025-12-11 09:52:57 -05:00
parent defd461145
commit 21ca0f2d27

View file

@ -11,6 +11,12 @@ export const webchatHelper = () => {
if (webchatGlobalNonpersistedState.shouldLaunchSierra) {
window.dispatchEvent(new CustomEvent("launch-sierra-webchat")); // launches the sierra chat
} else {
window.embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields({
ScarlettAISummary: "sScarletAISummary",
FirstName: "sFirstName",
LastName: "sLastName",
Email: "sEmail",
});
window.embeddedservice_bootstrap.utilAPI.launchChat(); // launches the salesForce prechat form
}
}