You can add a message suggestion when creating Inbox, Chatbox and Popup Widget layouts. This prefills the message input box so users have two options: they can send the suggested message to save time or they can change it to fit their specific questions.

You can populate the suggestions either when creating the layouts or if you are using Inbox or Chatbox, you can populate it using their select method.

Inbox

To use message suggestions with the Inbox layout, you'll need to provide selected conversation so that the suggestion can be applied.

var inbox = talkSession.createInbox({
    selected: conversation,
    messageSuggestion: "Hey, is this item still available?",
});

inbox.mount(document.getElementById("inbox-container"));

Or, in an already-created Inbox:

inbox.select(conversation, {
    messageSuggestion: "Hey, this works too? Great!",
});

Chatbox

var chatbox = talkSession.createChatbox(conversation, {
    messageSuggestion: "Hey, is this item still available?",
});

chatbox.mount(document.getElementById("talkjs-container"));

Or, in an already-created Chatbox:

chatbox.select(conversation, {
    messageSuggestion: "Hey, this works too? Great!",
});

Popup Widget

var popup = talkSession.createPopup(conversation, {
    messageSuggestion: "Hey, is this item still available?",
    keepOpen: false
});

popup.mount();