Solved

How to send data from Klavio Form to SMSBump

  • 31 August 2021
  • 2 replies
  • 573 views

Badge +2

Hi everyone, I am trying to send data from Klavio form to SMSBump with JavaScript but nothing works.

It’s my JS:

window.addEventListener("klaviyoForms", function(e) {
if (e.detail.type == 'submit') {
var phone = e.detail.metaData.$phone_number;

if (phone !== '' && phone !== undefined) {
fetch('https://api.smsbump.com/v2/formsPublic/subscribe', {
method: 'POST',
body: JSON.stringify({
'form_id': 33330,
'phone': e.detail.metaData.$phone_number,
'country': 'US',
'email': e.detail.metaData.$email,
'source': e.detail.metaData.$source
}),
headers: {
'Content-Type' : 'application/json',
'x-smsbump-platform': 'shopify',
}
})
.then(response => {
console.log(response);
response.json();
});
} else {
console.log('Phone is empty');
}
}
});

In the console->network->subscribe(name resourse)->preview, I get:

message: "You need to fill in one of the fields."

What could be the reason?

icon

Best answer by retention 31 August 2021, 17:53

View original

2 replies

Userlevel 7
Badge +57

@LALAGTR - I’m not sure about your particular use case, but doesn’t the SMSBump Klaviyo Integration work for your scenario?  If you have a Klaviyo Form submit emails/SMS to a List, you can sync that List to SMSBump via their Klaviyo Integration.

See SMSBump’s documentation here:

Unless you’re trying to do something else aside from syncing Contacts and Consent, give that a try!

Userlevel 7
Badge +58

Hi @LALAGTR !

Going off of @retention here to also mention that we also have created a guide here to help customers who are migrating over from SMSBump to Klaviyo!

We want to make sure you are exceeding goals as well, we have put together this on-demand training and getting started guide for Klaviyo SMS where you can sign up for our four-part Getting Started with Klaviyo session, available on-demand here
This session covers how to configure your account and integrations. We dig into the following topics:

  • Setup and profiles
  • Developing your SMS strategy 
  • Best practice recommendations in segments and flows
  • Sending SMS in flows
  • Benchmarks


This will be a perfect way for you to begin understanding SMS with Klaviyo and having the ability to review resources and learn at your pace!

Thanks for being part of the Community!

Alex

Reply