Skip to main content
Solved

How to send data from Klavio Form to SMSBump


Forum|alt.badge.img+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?

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!

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 942 replies
  • Answer
  • 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!


alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • 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