Please follow the below steps as per the code:
1) Create a DE with the fields such as mobile
(number), response
(text), addeddate
(Date)
2) SET the DE name in the AMPscript below which will be saved in MobileConnect SMS.
3) Below is the AMPscript code developed to match with your scenario. SMS_RESPONSE_TEST is a DE that will store the SMS campaigns, depending on the response msg received the user record will be stored in the DE. If the response is empty then the response
field will be set as NO whereas if response is not empty then the actual response will be stored with that mobile number.
4) Also, the DE can be exported to FTP by using the export option in Data Extensions or downloaded if you have contact builder.
Sample Code:
%%[
VAR @msg,@response,@inbound,@DateCheck,@DateCheckLogic
/*Stores the response from the sms*/
SET @inbound = [MSG(0).NOUN(0)]
IF NOT EMPTY(@inbound)
THEN
SET @msg = "Thanks for Responding. We have recieved your response!"
UpsertData("SMS_RESPONSE_TEST",1,"mobile",Mobile_Number,"response",@inbound,"addeddate",SystemDateToLocalDate(now()))
ELSE
SET @msg = "Oops we haven't recieved any response, please try again!"
UpsertData("SMS_RESPONSE_TEST",1,"mobile",Mobile_Number,"response","NO", "addeddate",SystemDateToLocalDate(now()))
ENDIF
]%%
%%=v(@msg)=%%