Solved

SMS consent text fired unnecessarily.

  • 8 October 2021
  • 5 replies
  • 187 views

Badge +2

Hi all, I’m working to send SMS consent texts programmatically, however I’m seeing some unexpected behavior. If a profile has already consented to SMS, and the profile subscribes again, they receive a second opt in SMS message. E.g. hitting the subscribe to list endpoint will sent duplicate SMS consent messages, even if the customer has already consented to SMS. The way I’d expect this to work, is if the customer has already consented to receiving SMS messages, they aren’t sent a second consent text if the subscribe endpoint is hit.

 

https://a.klaviyo.com/api/v2/list/LIST_ID/subscribe?api_key=PRIVATE_KEY

{
"profiles": [
{
"email": "george.washington@klaviyo.com"

},
{
"phone_number": "+13239169023",
"sms_consent": true
}
]
}

 

A workaround for this I could implement would be fetching the profile before the subscribe endpoint is hit, to see if they’ve already consented to SMS, and if so, don’t pass in the sms_true field, however I’m unclear on how I’d fetch a klaviyo profile from an email (only from a klaviyo profile id). Is there some way to get a Klaviyo profile id from an email?

icon

Best answer by alex.hong 14 October 2021, 22:00

View original

5 replies

Userlevel 7
Badge +58

Hi @Steven P,

 

Thanks for posting this to the Community! I hope to help with your questions regarding customers receiving multiple SMS consent messages.

To start, may I ask what purpose/utility there might be in having a customer having the ability to fill out the same form twice? I would also like to note that after speaking to some team members, this could be a potential bug I will report back if it is. Back to my other point, if there is a flow that is triggering a second SMS message going through, I would recommend adding an additional filter to the flow that only allows recipient to enter it once:
?name=inline-1015503470.png

Additionally, you can create a Segment that identifies all profiles who are NOT consented to SMS. Then, you can build a Signup Form that targets this Segment:
?name=inline1286175985.png

Please note that without an email address input block on your Form, the phone numbers will be stored as phone-number-only profiles. If you want the phone number and SMS consent to be updated to an existing profile, then you need to also include an email address input block on your Form. You can easily pre-populate the email address so that your customers do not have to write it in (as long as they are cookied browsers). 

 

However, this all does depend on the initial method you are using to allow these SMS customers to enter their info and consent. 

 

Regarding the workaround you had mentioned, I would say it might be easier to segment them without having to work with the API and pulling from there. 

Hope to hear from you and have a good rest of your day!

Alex

Badge +2

Hi @alex.hong thanks for burning the late night oil with me to help me get this resolved. Much appreciated :)

 

To answer your questions, a few points:

  1. The SMS message being sent to confirm consent is not being sent from any flow (if it were we could set up some flow filters to make sure they weren’t sent through it twice), it is being sent automatically by Klaviyo to confirm the double opt in to the list. In other words, as soon as the /subscribe endpoint is hit, Klaviyo sends a SMS text to the phone number. This isn’t related to any flow within Klaviyo - it’s the double opt in text from the list subscription. I’d expect Klaviyo to check if the customer has already consented to SMS before firing that text.

To start, may I ask what purpose/utility there might be in having a customer having the ability to fill out the same form twice? 

This is a great question, and didn’t want to get too into the weeds (to avoid XY problem), but we’re looking to have separate forms on merchant websites that are for particular use cases, e.g. a restock alert. So if a customer has already filled out a klaviyo form, but is filling out a restock form, they’d already be consented but a second subscribe call gets sent.

  1. The workaround I had mentioned is, if I could guard against the customer already being consented prior to making the /subscribe call, I fetch the profile and then can prevent any customer from receiving 2 opt in texts. However that would require I be able to fetch a klaviyo profile from an email or phone number.
Userlevel 7
Badge +58

Hey again @Steven P,

Hope you had a great weekend! 

I see what you mean on your first point. This is part of the SMS Consent Req by Klaviyo I am sure (will double check for confirmation) and not something to disable as it is part of the compliance regulations. I think there’s some good brainstorming we can do to figure out a resolution as this is an odd problem. Since Klaviyo SMS consent is not able to be collected through third party signup forms unless you work with your developer to utilize our List API V2 to connect the form to send over SMS consent. Unfortunately, this is custom work, and we are unable to assist with the implementation. However, your developer should be able to work it out, utilizing our API docs. My idea is that we could possibly utilize just a single custom sms consent form for your business so that we can modify how users get messages? I will also follow up later after discussing with team members.

 

Talk to you soon!
Alex

Badge +2

Hi @alex.hong thank for the follow up here and hope you had a great weekend as well.

If I had a way to query a Klaviyo profile from just their email (or phone number) I’d be able to get around this problem. It looks like the only way to fetch a Klaviyo profile is through their profile id. Perhaps I’m missing something here?

Worst case I can fetch all Klaviyo profiles to my database and create an API internally to map the email addresses to Klaviyo profile ids - though that seems like bike shedding for what should be a simple task. Let me know if you uncover anything. Thanks!

Userlevel 7
Badge +58

Hi @Steven P! Glad you had a great weekend and I’m back with some more info.

I also saw that support had gotten a chance to respond to a ticket I created for you. 

So pretty much, for profiles who have consented to SMS, upon signing up again they are supposed to be greeted with the SMS consent message again (per double opt-in) as this is expected behavior. A similar instance appears when  signing up to an SMS list again; this would cause the double opt-in confirmation to fire again even if the customer was already on the list. There currently isn't something we can resolve within Klaviyo directly to stop this issue. Unfortunately, Steven, this would all be a custom solution. I believe there have been some Community posts before mentioning using API to see if someone has consented to SMS prior which may help this individual in creating their custom query. For instance, 

goes into how to look it up with the API. 

 

I’d love to see how you code the solution and I am sure others in the community would love to learn from you as well!

 

Hope all is well,

Alex

Reply