최근 검색


최근 검색 없음

How to Chat bot custom greeting message?

답변함


2023년 11월 22일에 게시됨

I am using chat Bot web widget in my website it's awesome. Now i want to know how i can add my login user name in greeting message. Login user name will come form my database.  When conversation is start. like this "Hi Josh,  I'm here to help. 

 


1

1

댓글 1개

image avatar

Dakota

Zendesk Luminary

I'm no coding wizard but I believe it would require some level of backend coding.

Would likely require something like this. When the user logs into your website, store their name (e.g. "Josh") in a session variable or some other server-side storage that you can access later.
In your chatbot code, retrieve the logged-in username from the server-side storage before configuring the chatbot.

For example:

// Get logged in user's name
const name = getLoggedInUserName(); 

// Configure chatbot 
const chatbot = new Chatbot();

// Customize greeting
chatbot.setGreeting(`Hi ${name}, I'm here to help.`);
The chatbot should now greet the user with their name fetched from the server-side storage:
"Hi Josh, I'm here to help."

0


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물