Making a response system with Twilio API

Hi all, I’m trying to make a system in bubble where a text message is sent to a customer and then they can reply with a simple yes if they want the purchase to go through (payment details will be saved in app beforehand).

I’m running into an issue however as I can’t seem to figure out how to let bubble know that they are replying to last message.

I’ve tried to make a system where the user puts the item ID in to circumvent this and then I put the order in through with that ID however I need too many ID’s to get a single item so the UX becomes poor and I can’t seem to figure out how to check if a single item is a match with anything in a database list.

Would anyone be able to please advise on how to make a system that works like this?
Thanks.