Developer APIs
GuidesProductUpdatesPricingFAQs
  • API Docs & Reference
  • REST API
    • Introduction
    • Agents
    • Chats
    • Offline Messages
    • Visitors
  • JavaScript API
    • Introduction
    • Chat Form
    • User Data & Logout Info Update
    • Chat Button
    • Click To Call Action
    • Language
    • Department
    • Event Listener
Powered by GitBook
On this page

Was this helpful?

  1. JavaScript API

Department

PreviousLanguageNextEvent Listener

Last updated 1 year ago

Was this helpful?

Set Department Name

DEFINITION
function setOrganization(department_name)
set the department name which you would like to set.
<script type='text/javascript'> 
window.$_REVECHAT_API || (function(d, w) { var r = $_REVECHAT_API = "function(c) {r._.push(c);}; 
NaNrc.type = 'text/javascript'; rc.async = true; rc.setAttribute('charset', 'utf-8'); 
rc.src = ('https:' == document.location.protocol ?'https://' : 'http://') 
+ 'static.revechat.com/co-browsing/new-livechat.sjs?'+new Date().getTime();
var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(rc, s);})(document, window);

$_REVECHAT_API$_REVECHAT_API(function()
{ 
   $_REVECHAT_API.setOrganization('DEPARTMENT_NAME');
});
</script>

Any questions? Please email us at

support@revechat.com