Skip to content

Instantly share code, notes, and snippets.

@BrightnBubbly
Created June 22, 2016 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrightnBubbly/179ed2955b993593951e13c4e078d836 to your computer and use it in GitHub Desktop.
Save BrightnBubbly/179ed2955b993593951e13c4e078d836 to your computer and use it in GitHub Desktop.
/*
"agent" is the name that the agent has in the Admin Dashboard/their
customer-facing name
*/
/*
You can use whatever variable you want to identify the hubspot-owner-id, here,
I have used "id". You will need to identify whatever varible you decide to use
by putting something like "var id;" in your main code (most likely in a place
where you are defining other variables and then you'll put the following code
in your SnapEngage code after the line that says "Place your SnapEngage JS API
code below"
*/
SnapEngage.setCallback('ChatMessageReceived', function (agent, msg) {
if (agent === 'Ken') { id = 11576622; }
else if (agent === 'Maricela') { id = 14485590; }
else if (agent === 'Alberto') { id = 14485520; }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment