Embed virtual agent into external web application

DhananjayM
Tera Guru

Hi All,

I am been trying to get ServiceNow Virtual agent embedded into an external web application, in this case our Customer facing portal (non-ServiceNow).

I followed the steps given in docs with limited success

https://docs.servicenow.com/bundle/london-servicenow-platform/page/administer/virtual-agent/task/emb...

We want to interface SNOW Virtual agent application to customers only if they have authenticated to single sign-on using SAML.

Our customer portal uses same SSO entity to do authentication so Single sign-on is up and running and works for any other Servicenow links which are added in our customer portal. We are currently saml_redirector.do to get a resource authenticated and then pass on the redirection to one specified to sysparm_uri. So while other links works on our customer portal like below 

https://<instancename>.service-now.com/saml_redirector.do?sysparm_uri=incident.do

Same when we use with embded iframe within our Customer facing portal , reloads the whole page instead of just loading Virtual agent within iframe. This might hold true for any other link which is embedded in an iframe

<iframe id="sn_va_web_client" title="ServiceNow Virtual Agent Client" width="600" height="900" src="https://<instancename>.service-now.com/saml_redirector.do?sysparm_uri=sn_va_web_client_app_embed.do%3Fsysparm_skip_load_history=true">
</iframe>

 

Looking saml_redirector.do code I feel below snippet could be an issue where redirection is happening on top frame redirect_target="top".

<j:if test="${GlideMobileExtensions.getDeviceType() == 'doctype'}">
<g:inline template="redirect_page.xml"
redirect_to="$[jvar_url]"
redirect_target="top"
redirect_timeout="0"/>
</j:if>

I also tried to look around redirect_page.xml code but it seems its hidden from developers. So am I at a point where I am running out of ideas to load Virtual agent in an iframe within external application, and using single sign-on. From end user perspective the interaction should be seamless and they shouldn't be logging in multiple times.

6 REPLIES 6

DhananjayM
Tera Guru

Any suggestions on this thread?

DhananjayM
Tera Guru

Any thoughts on this use case ?

Aksha
Tera Guru

Have you succeeded in this use case? Can you help?

timhorn
Kilo Expert

No I haven't.  Sadly, we are no longer pursuing the use of virtual agent, so I'm going to let this one die on the vine.