Creating record producer from Virtual Agent

pandeyved
Tera Contributor

Hi All,

I need help in below scenario:
I am building a topic in Virtual Agent which will take, same input from user as defined in one of the record producer.

So that user can create a case from VA itself. That particular record producer uses some script include to map the fields from the variable of the record producer.

Like:

new catalogServicesUtil(current, gs).createCaseFromRecordProducer(producer, cat_item.sys_id);
 
So I want the same functionality to work in VA also. So I am trying to accept all input from user and trying to store it in producer format, so that it will create a case as same as record producer is doing.
But I am not able to build the format, so that I can pass in parameter. Can someone help in understanding and providing solution.
Thanks
 
3 REPLIES 3

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @pandeyved ,

 

 Yes this is achievable... We're did you start with , were are you stuck ?


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Muralidharan BS
Mega Sage
Mega Sage

Hi @pandeyved ,

 

Firstly If you have the HR for VA plugin installed there are many topics to cover specific HR services are included, so you can start using it.  

 

If there are some special cases, then the plugin comes with a topic block called - Create HR Case. This is an interesting block where you can pass in HR service, COE and Questions and VA will create a HR case for you. No need to script anything except you need to send in specific format which is crucial. 

 

Topic Design

Just call the topic block in your topic like below.

 

I used below example

HR Service - Work Visa

Case Table - sn_hr_core_case_talent_management

Questions - it should be in this format, I am unable to make it work in other formats but there could be ways.

 

"[{\"question\":\"For which Location do you need work visa?\",\"name\": \"value of the Question\",\"answer\": \"user's answer\", \"raw\": \"user's answer\", \"answerDisplayValue\": \"user's answer\"}]"
"[{\"question\":\"For which Location do you need work visa?\",\"name\": \"location\",\"answer\": \"India\", \"raw\": \"India\", \"answerDisplayValue\": \"India\"}]"

 

 
If you have a mappingField
"[{\"question\":\"For which Location do you need work visa?\",\"name\": \"value of the Question\",\"answer\": \"user's answer\", \"raw\": \"user's answer\", \"answerDisplayValue\": \"user's answer\", \"mappingField\": \"mapping field id\"}]"
 

Topic

you can also prompt users for any specific details for the questions and amend the user's input in the format above. 

 

MuralidharanBS_0-1709630667637.png

 

Result: Case created in the specific table with specific hr service and questions in description if they are not mapping fields

MuralidharanBS_2-1709631035069.png

 

MuralidharanBS_3-1709631649523.png

 

 

Other Options,

There is old topic called - General HR Inquiry which can create cases under General Inquiry and then it can be transferred to other service. 

 

Finally if none of the above use cases suits you, then you can use this script specifically for VA. Pass in the params as per the format above. 

 

 

new sn_hr_va.hr_ChatbotUtils().createCaseWithHRService(hrServiceId, caseTable, questions);

 

 

Thanks

Hey @Muralidharan BS , I am stuck somewhere around this Topic Block only while i was exploring "Parental Leave of Absence Request" Topic.
I got to this topic block but couldn't find how the variables are being passed for HR service , Case Table and Case Questions to the Topic Block "Create HR Case".
I know there is a script where the variables are used but i am not able to access the variables that are being set in that Topic Block.
I have attached the below screenshots for your reference. It would be of great help if you can identify the root cause to my problem.
Thanks.