We use Amazon Pinpoint to send a 2-way SMS to the user from our application. We store that message_id in our database. When the user responds to the SMS, we get notified on the SNS topic which provides the "previouslyPublishedMessageID". The goal is to link the response to the original message. It usually works in most cases, but if we send another message (1-way SMS) to the same destination, the "previouslyPublishedMessageID" that's returned for the 2-way SMS is the last message (1-way).
Is there a way to correctly link the inbound and outbound 2-way SMS? We want to use the same short code for both 1-way and 2-way SMS.