Issues with Virtual Agent Case Card, State defaults to draft, record number link takes me to esc.

Dario Idrovo1
Tera Contributor

So I am encountering a couple of issues. 

1. When the HR Case is created on the virtual agent, it is being created in Draft, why is that? How can I fix this?

2. When I click on the record number hyperlink on the case card, it takes me to the esc portal, how can I route this to take me to our other portal instead (hrhelp)

 

DarioIdrovo1_0-1710281893386.png

 

5 REPLIES 5

Sumanth16
Kilo Patron

Hi @Dario Idrovo1 ,

 

1. When the HR Case is created on the virtual agent, it is being created in Draft, why is that? How can I fix this?

OOTB - "Ready for work" Business rule sets the state to 'Ready' by checking 'source'. Sys-id of that BR is '3e5330019f22120047a2d126c42e70f9'. Please make required modifications there

2. When I click on the record number hyperlink on the case card, it takes me to the esc portal, how can I route this to take me to our other portal instead (hrhelp)

 

Please refer to below thread:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743562

 

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

@Sumanth16 

I followed that post before I posted this question and I could not get it to work. I replaced everywhere that said "incident" with sn_hr_core_case, replaced category with hr_service and replaced the system property as I created my own, since ITSM uses sp and I did not want to touch that system property. I still could not get it to work, the flow breaks.

DarioIdrovo1_0-1710283110048.png

 

Here is an example of an HR record on the portal:
https://clientdev.service-now.com/hrhelp?id=hrm_ticket_page&table=sn_hr_core_case_relations&sys_id=6...

Here is what I tried. 

(function execute() {
  var hrService= new GlideRecordSecure('sn_hr_core_case');
  hrService.get(vaInputs.create_sn_hr_core_case);
  var title = {
  url: gs.getProperty('glide.servlet.uri') + '/' +
    gs.getProperty('sn_hrsd_va.com.snc.hrsd.virtualagent.portal_url') +
    '?id=hrm_ticket_page + '&table=sn_hr_core_case + '&sys_id= ' + sn_hr_core_case.sys_id + ',
    label: sn_hr_core_case.number
  };
  var fieldList = ['hr_service', 'assignment_group', 'short_description', 'state'];
  var cardRenderer = new global.VaRecordCardRenderer(true);
  var fields = cardRenderer.createFields(fieldList, sn_hr_core_case);
  var html = cardRenderer.renderCard(title, fields);
  return html;
})();​

 

Hi @Dario Idrovo1 ,

 

For ITSM , I see"sn_itsm_va.com.snc.itsm.virtualagent.portal_url" property to redirect from the card. Please check this type of system property for HR.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

There is no sys property for HR, hence I created my own and called it on the script I sent on my message above, but unsure if I made a mistake on the code.