Skip to main content
Contributor I
August 31, 2021
Solved

How to send data from Klavio Form to SMSBump

  • August 31, 2021
  • 2 replies
  • 703 views

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?

    This topic has been closed for replies.
    Best answer by retention

    @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!

    2 replies

    retention
    Partner - Platinum
    retentionAnswer
    2025 Champion
    August 31, 2021

    @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!

    Joseph Hsieh // retentioncommerce.com // X: @retention
    alex.hong
    Klaviyo Alum
    August 31, 2021

    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