logo

NJP

Virtual Agent bubble color / url parameters

Import · Jan 15, 2020 · article

Hi there,

So you applied the Plugins to activate the Virtual Agent, and the Virtual Agent widget is automatically added to your Service Portal or you added the Virtual Agent widget manually to your Service Portal through the Service Portal Designer. Looks all oke, though now you are wondering: Can I change the color of the Virtual Agent icon? Or when clicking the Virtual Agent icon, by default previous chat history is displayed. Can I change that default behavior?

In both cases: the answer is Yes.

You might even seen some community posts on how to do this with cloning the Virtual Agent widget. I made that mistake myself also when we started with Virtual Agent on the London release.

Though cloning?! Why cloning?! Service Portal widgets can be greatly influenced by using Page specific CSS, Instance specific CSS or through Instance options.

Instance options (Option schema)

The out-of-the-box option schema for the Virtual Agent widget looks like:

[ {
  "hint" : "The color of the floating button which opens the virtual agent service portal widget button.",
  "name" : "button_color",
  "section" : "Presentation",
  "default_value" : "#8D8DE0",
  "label" : "Floating Button Color",
  "type" : "string"
}, {
  "hint" : "The URL parameters to pass to the VA client, for example: sysparm_live_agent_queue=abc123&sysparm_conversation=xzy456",
  "name" : "va_url_params",
  "section" : "Behavior",
  "label" : "Virtual Agent Client URL Parameters",
  "type" : "string"
} ]

Seeing this, this gives us some flexibility in changing the presentation and behavior of the Virtual Agent widget. Changing the presentation and behavior without cloning the widget, just by applying the Instance options.

Configure button color / url parameters

So you might already notice the Virtual Agent widget contains instance options for "button_color" and "va_url_params". How can we configure these?

On your Service Portal, CTRL+Right mouse click on the Virtual Agent icon. In the pop-up select "Instance options".

image

A modal will appear containing the instance options image Within this form, simply add the color of your choosing. This can be by name and by HEX code. For example "#FF0000" or "red". Or interested in changing the URL parameters? Simply add the parameter you are after, for example "sysparm_skip_load_history=true".

image

Upon saving the form, the changes made to the instance options immediately are effective!

image

---

And that's it actually. Hope you like it. If any questions or remarks, let me know!

image If this post helped you in any way, I would appreciate it if you hit bookmark or mark it as helpful.Interested in more articles, blogs, videos, and Share projects on Virtual Agent I published?- Virtual Agent

Kind regards,

Mark

---

LinkedIn

image

View original source

https://www.servicenow.com/community/virtual-agent-nlu-articles/virtual-agent-bubble-color-url-parameters/ta-p/2308123