Write own end message for a customized chat

Hi, I have a question concerning the end message of the Chatbot conversation. I created my own Chatbot interaction with the Design page and now I’d like to use my last message to end the chat. I’ve seen in the IDE of other pre-defined chats that the end message looks like that:
“(final-closing-leave-say-goodbye-0 [[(user-first-name) “, thank you again for your visit and I really appreciate your taking time to chat with me. \n Good bye!”]])]”
But when I added these lines to the IDE of my chatbot, it didn’t have any effect on what was shown on the Design and Preview page and I got compile errors. The same happened when I only chaged the topic from my last message to “(final-closing-leave ?msg)”.
How do I have do define the last message correctly, in order to end the chat afterwards?

Hi,

If you just want to change the wording of the final message, it is better to just change the wording in the design page.

However, if you want to do more advanced topic changes, you can make changes in the IDE. Currently the change in the IDE is not reflected on the design page, but it will affect the preview if there’s no compilation error.

final-closing-leave-say-goodbye-0 is a topic defined in the chat script, so when you copy

(final-closing-leave-say-goodbye-0 [[(user-first-name) “, thank you again for your visit and I really appreciate your taking time to chat with me. \n Good bye!”]])]

you also need to copy the topic definition of final-closing-leave-say-goodbye-0, which may be something like:

(deftopic final-closing-leave-rep-intro-1
[?rep-msg]
{:named-pattern [interviewing/_default-rep-closing
This text will be hidden [(user-first-name)
“, thanks for your time. Hope to chat with you again soon!”]]}
[]
[(if (not (nil? ?rep-msg))
?rep-msg
interviewing/_default-rep-closing)
(agenda-topic-done)
(end-chat (post-chat-url))])

The most relevant part is (end-chat (post-chat-url)) function, this function effectively end the chat and lead the user to the post chat url. So if you are familiar with juji topic, you can add this to the end of the trigger pattern of your last topic.

Hi wchen,

Thanks for the answer, it helped me a lot. It’s good to know that changes in the IDE will affect the preview even though it’s not shown in the design page.

Anna,
Currently the changes in the UI design page and the IDE are not fully synced – so when you use both sides, be sure you always save the files in IDE since they contain all the information and also the most up-to-date information.

thanks, Michelle