Solved

Sending SMS via Back In Stock API

  • 6 August 2021
  • 2 replies
  • 534 views

Badge +2

Hey guys, I’m looking to send alerts via SMS for Back In Stock events. The Klaviyo BIS API currently only supports sending events via email, see curl request:

curl 'https://a.klaviyo.com/api/v1/catalog/subscribe' --data 'a=AccountID&email=test@klaviyo.com&variant=5000149172256&platform=shopify'

What we are currently doing is forcing every customer who enters their phone number to also enter their email. This works, as we can just pass in the email to the BIS endpoint, and then within the BIS Flow we can configure it to send text messages to customers who have their phone numbers set up. This works fine, however we are running into the following issue:

 

We are looking at pulling in customer back in stock notification data that don’t have any emails associated with them (just phone numbers), so this method (of requiring the customer to have an email) won’t work. If we could send data to the catalog/subscribe endpoint using SMS that would be perfect, or a Klaviyo profile id, but that isn’t supported.

 

What I’m considering doing is for these customers who only have phone numbers and no emails, creating a spoofed email, e.g. “backinstock1@gmail.com”, that I can just use effectively as an identifier to pass into the BIS endpoint. This would work, but it wouldn’t be ideal, as now you have contacts with random email addresses. And depending on the rest of the back in stock workflow you could end up sending emails to these addresses. Perhaps I’m missing something, can anyone think of a better workaround?

 

Thanks in advance!

Steven

 

icon

Best answer by julie.accardo 7 August 2021, 19:19

View original

2 replies

Userlevel 5
Badge +34

Hi @StevenPetteruti,

 

Thanks for reaching out to the Klaviyo Community! I’ll let other’s chime in here as well in terms of workarounds they can think of. As for associating a spoofed email address to these profiles, you would need to generate new email addresses for each of these profiles since Klaviyo uses email address as the unique identifier. Another challenge with this approach is if you do choose to associate spoofed email addresses with each of these profiles, it would be recommended to create a segment of these profiles  such as “email contains backinstock” and then exclude these email addresses from receiving any of your campaign sends. 

 

Best,

Julie

Badge +2

@julie.accardo 

Thank you for the response!
You make a good point - the spoofed emails would have to be excluded from any segment that is emailed so the deliverability isn’t effected. This seems like it would be a large headache and not a great solution.

I’m curious if someone else has a solution to this - perhaps someone else has had to use an email identifier when SMS was the only available info. 

 

Reply