Need to find Werther the sc_request is created using virtual agent or self-service.

praveen1231
Tera Contributor

Hello everyone,

I have a requirement to determine whether a Request and its associated RITM were created through a Virtual Agent or self-service. If the creation occurred via the Virtual Agent chat, the state field in the `sc_request` table needs to be set to "Pending." Could anyone share ideas on how to achieve this with server side or client side scripting's and without using a Virtual Agent flow. Thanks in advance!

 

For example need to find RITM0072313 is submitted via virtual agent or not.

praveen1231_1-1727114982765.png

 

 




@shane_faber 

9 REPLIES 9

Amit Verma
Kilo Patron
Kilo Patron

Hi @praveen1231 

 

You can make use of Contact_Type field in the RITM table to track this. If your RITM is generated via Service Portal, you can set it to Self-Service on Submission. Similarly, via Virtual Agent, you can set the Contact Type to Virtual Agent. Refer below snip :

 

AmitVerma_0-1727159411366.png

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Thanks for your response, @Amit Verma I’ve already tracked the `Channel (contact_type) field in the RITM table, but I’m unsure how to differentiate and set the value when the request is submitted through the Service Portal or Virtual Agent. Could you please explain the steps and code to address this?

praveen_rajan_0-1727160529709.png

 

Thanks and Regards

Praveen Rajan

@praveen_rajan 

 

if your RITM is being created via a flow, you can make use of Update Record action inside the flow to set this field to Self service.

 

For Virtual Agent, whenever a record being created via Virtual Agent, you will get an entry created in interaction_related_record table. You can make use of an After Insert Business Rule on this table to set the contact_type by dot walking on the task fields as shown below :

 

AmitVerma_1-1727162467729.png

 

AmitVerma_2-1727162484711.png

 

 


Please mark this response as correct and helpful if it assisted you with your question.

@Amit VermaThank you for your patience! Unfortunately, it's not working for me. I followed the same steps you outlined, but something seems to be off. Could you please review and correct any mistakes I might have made? Please verify below screenshots.


praveen_rajan_0-1727163903977.pngpraveen_rajan_1-1727163908247.pngpraveen_rajan_2-1727163952349.pngpraveen_rajan_3-1727163996659.png