Open HanaShiho opened 7 months ago
Automated response: "Thanks for your message. We are unable to see replies to this number. Please visit the Connect Support Center at https://myconnect.cancer.gov/support for help."
Comms confirmed that DevOps (@jhflorey) will not be needed for this work. @HanaShiho and @depietrodeanna to take this on.
In Twilio, the advanced opt-out feature primarily handles specific keyword management for opt-outs (like STOP) and opt-in(like START). This feature automatically recognises and responds to these designated keywords. Additionally, we currently have a standardized and automated response to "HELP" replies to our phone number.
We want to program an automated response to incoming messages that aren't specifically these opt-out or opt-in keywords using Twilio's Programable SMS logic.We can write a Twilio Function(serverless environment provided by Twili) to handle incoming SMS messages. This function can check the content of each message and decide what response to send. If the message doesn't contain one of our predefined keywords (e.g. HELP or STOP), the function can send a different automated response.
I've included a sample script below. This script checks if the incoming message is either "HELP" or "STOP". If not, it sends a custom response.
exports.handler = function(context, event, callback) { let incomingMsg = event.Body.trim().toUpperCase();
};
@depietrodeanna can you please provide a sample automated response we'd like to use?