Vitual agent user data validation

Aakash5
Tera Contributor

I am trying to build a catalog item which can be ordered directly via the VA. So for this I also need to give the users the option for ordering for someone else. For this I can't show the entire sys_user table for the user to choose from as there are thousands or records and it doesn't go well with the user experience as he/she needs to search a lot of users. So any alternative for this?

1 ACCEPTED SOLUTION

Gaurav Shirsat
Mega Sage

Hello @Aakash5 

 

You can do this requirement as,

either create a Topic Block or design in same Topic.

(Recommendation is to create Topic Block and in Global Domain if you are in Domain Separated Environment)

 

Select_User.jpg

 

 

 

 

 

 

 

 

 

 

 

 

Now here is description of Activities from above image:-

 

Self or On Behalf Choice:-

Sele_choice.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now after this,

add Decision with two way condition as self of on behalf of choice as the options you have given.

 

Will Discuss First way is to have logged in user details. for this add one script action, add below code

 

vaVars.Affected_User_SysId=vaInputs.user.sys_id;
vaVars.Affected_User_Name=vaInputs.user.name;
vaVars.Sam_Accountname = vaInputs.user.u_samaccountname;
vaVars.affeteduserobj = vaInputs.user;
vaVars.affeteduseremail = vaInputs.user.email;
 
Note:- Make sure you have declare this variables separately in script variable section.
 
Now for the other user details you can ask user to first select some part of the user name in input text activity.
and post this add Dynamic Reference Activity with condition as,
Name    Contains       <input Name given by user in your previous activity>
use same code just make small change according to your activity name
 
vaVars.Affected_User_SysId=vaInputs.affected_user;
vaVars.Affected_User_Name=vaInputs.affected_user.name;
vaVars.Sam_Accountname = vaInputs.affected_user.u_samaccountname;
vaVars.affeteduserobj = vaInputs.affected_user;
vaVars.affeteduseremail = vaInputs.affected_user.email;
 
Feel Free to connect me in case you need help.
Thanks and Regards
Gaurav Shirsat

View solution in original post

2 REPLIES 2

Gaurav Shirsat
Mega Sage

Hello @Aakash5 

 

You can do this requirement as,

either create a Topic Block or design in same Topic.

(Recommendation is to create Topic Block and in Global Domain if you are in Domain Separated Environment)

 

Select_User.jpg

 

 

 

 

 

 

 

 

 

 

 

 

Now here is description of Activities from above image:-

 

Self or On Behalf Choice:-

Sele_choice.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now after this,

add Decision with two way condition as self of on behalf of choice as the options you have given.

 

Will Discuss First way is to have logged in user details. for this add one script action, add below code

 

vaVars.Affected_User_SysId=vaInputs.user.sys_id;
vaVars.Affected_User_Name=vaInputs.user.name;
vaVars.Sam_Accountname = vaInputs.user.u_samaccountname;
vaVars.affeteduserobj = vaInputs.user;
vaVars.affeteduseremail = vaInputs.user.email;
 
Note:- Make sure you have declare this variables separately in script variable section.
 
Now for the other user details you can ask user to first select some part of the user name in input text activity.
and post this add Dynamic Reference Activity with condition as,
Name    Contains       <input Name given by user in your previous activity>
use same code just make small change according to your activity name
 
vaVars.Affected_User_SysId=vaInputs.affected_user;
vaVars.Affected_User_Name=vaInputs.affected_user.name;
vaVars.Sam_Accountname = vaInputs.affected_user.u_samaccountname;
vaVars.affeteduserobj = vaInputs.affected_user;
vaVars.affeteduseremail = vaInputs.affected_user.email;
 
Feel Free to connect me in case you need help.
Thanks and Regards
Gaurav Shirsat

Aakash5
Tera Contributor

Thank you so much for the solution. It helped a lot