function handleIncoming()

in inter-page/support-bot/app.js [115:127]


function handleIncoming(sender_psid, received_postback) {
    let response;
    if (received_postback.ref) {
        response = {"text": `Nice to see you again. I have your original message, "${received_postback.ref}". \n Let me see how I can help.`}
    } else {
        let payload = received_postback.payload;
        if (payload === 'get_started') {
            response = {"text": `Welcome. I have your original message, "${received_postback.referral.ref}". \n Let me see how I can help.`}
        }
    }
    // Send the message to acknowledge the postback
    callSendAPI(sender_psid, response);
}