Understanding VA greeting message script

Ryax
Tera Expert

Hi,

It is worth starting off by saying I'm new to VA - I'm trying to understand where "getGreetingMessage" is defined in the below script from the OOB personalized greetings message. As I understand it "getGreetingMessage" must be defined somewhere and it is then passed to the {1} result in the below code which then causes it to appear in the chat bot window. I'd like to understand where it is defined so that I can go in and amend the wording slightly. I understand I could remove it from the below and manually input text however I would prefer to understand how the below is working so I can learn from it.

var result;
if (vaInputs.user.first_name.getDisplayValue()) {
return gs.getMessageLang('Hi {0}, {1}', vaContext.getRequesterLang(), [vaInputs.user.first_name.getDisplayValue(), vaSystem.getGreetingMessage()]);
 
Many thanks
 
Richard
1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

The getGreetingMessage is just a vaSystem property. In this case, it's using the UI Messages. See below example.

If you would like to change this message, just update the UI Message with Key "Hi, I'm your Virtual Agent. Let me know how I can help you today." > Message field.

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

9 REPLIES 9

Hi Kavita,

Make sure to edit the entry in the 'Message' field rather than the 'Key'.

Rich

Yes, I have edited the message field still I could see the same message in chat

Mark Roethof
Tera Patron
Tera Patron

See also below test:

find_real_file.png

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Wardma
Tera Guru

I've recently started developing in the ServiceNow Utah instance. Everything has gone pretty well so far until I met the Greeting. I have updated the english key or rather had to place the english key as there were only other languages. When copying the default Dynamic Topic to reuse and tailor specifically, I can't seem to change the automated message even after changing the key or adding the key in my case. I want the automated text to read 
"Hello, <UserFirstName>. I'm your Virtual Agent. Take a look at what I can help you with." After the automated message, the flow will continue as normal in the default Dynamic Greeting.

Hi @Wardma,

 

I hope you're doing well,

 

I expect this article is the one you're looking for:

https://docs.servicenow.com/bundle/rome-now-intelligence/page/administer/virtual-agent/task/change-v...

 

I hope it helps

 

Kind Regards

 

Ashley