{{customer.number}} for SMS assistants
# support
p
I have set up an assistant (293b9dca-d997-44d5-a08a-18b2058afbb0) to receive SMS messages from a Twilio number and look up the contact using a tool. When I call the number it works as expected by greeting me with my first name. When I initiate a chat via SMS however it does not. Is {{customer.number}} available for SMS sessions or is there another attribute to use?
g
Good question — for SMS sessions, {{customer.number}} isn’t always populated the same way as voice calls. SMS usually comes through as the from number in the message payload, not the call customer object. I’d recommend pulling the sender number directly from the SMS event (e.g. from / sender) and using that for your contact lookup instead. Happy to help you wire this up properly if you want.
s
I was facing the same issue, there is easier way to solve this issue. Happy to help
e
what does your current setup look like?
c
Could you please provide your session id for the text message thread?