Sending Plain SMS with Klaviyo Flows

    • Tall Bob |
    • 0 step |
    • 6 minutes
    Our Friends at Klaviyo are in the process of updating their Flows Builder, so you might see a slightly different version to what we have on in the examples below, if so don't stress overall the guide should still work for you and if you need help you can reach out to us as [[email protected]](mailto:[email protected])
    You're going to need two tabs open - keep things clear and it's going to be easy. [https://www.klaviyo.com/flows](https://www.klaviyo.com/flows) [https://app.tallbob.com/main](https://app.tallbob.com/main)

    Part 1: Setting up your Klaviyo Flow

    Start by heading into your Klaviyo interface. We'll start there, and move over to Tall Bob for a short time. Few things you will need to have done first: 1. Ensured that you've set up your APIs and webhooks between Tall Bob and Klaviyo; and 2. Set up your Segment in Klaviyo.
    Let's start by navigating to [https://www.klaviyo.com/flows](https://www.klaviyo.com/flows)
    Head to "Create Flow".
    And choose to "Create From Scratch". Trust us, it's easier than you think!
    Type the name of your Flow at Name (we recommend keeping a common naming convention across your team). And, click "Create Flow"
    Your first trigger is your Segment. So, select your Segment - this does assume you've already set up your Segment (such as "Purchased Last 14 days") and click "Done". That's Trigger 1, done.
    Trigger 2 is your Webhook (not SMS)\ So, drag and drop the "Webhook" option below the first trigger. Click on the added trigger to view the webook options\ \ Here's why: yes, you can send 'SMS' which means sending via Klaviyo. However, there may be some restrictions on you when you send via Klaviyo. Talk to your Tall Bob account manager to understand more.
    Name your Webhook: we suggest using a combination of the campaign, the send date and the source (like TB for Tall Bob) and your Flow.
    Here's where you may cringe, but stick with it. Click this Destination URL Field and enter [https://api.tallbob.com/v2/sms/send](https://api.tallbob.com/v2/sms/send) Yes - this is the same for everyone. Remember, you've already connected your unique APIs and webhooks.
    Next, and again, trust us - it looks scarier than it is. Click the "Key" field. Type "Content-Type" Then Enter "application/json" in the value field
    Click Add Header. Click the "Key" field and add a new header "Authorization"
    That's it - you've set up the hardest part.

    Part 2: Setting up the connection in Tall Bob

    This next step is really important but we have made things super simple for you.
    In a new tab, navigate to [https://app.tallbob.com/manage_api](https://app.tallbob.com/manage_api) If you log in using a saved link, you can get to Manage APIs using the gear setting in the top right hand corner.
    Click "Copy" next to the Basic Auth Header section

    Part 3: Finishing Up in Klaviyo

    Bare with it - it's nearly done, and it's not as hard as you thought, huh? Head back on over to your Klaviyo interface.
    Return to Klaviyo and Paste in the Code you copied just a moment ago to the "Authorization" "Value" field. You've done it. You've connected tech.
    Now, let's send a text. Click on the "JSON Body" section and enter the message you want to send. Again, the formatting looks a little scary but it's not really. We tested it on consenting marketers.
    The format of a message is pretty straightforward, it's made up of three core parts: Who you are going to send it to (the "To" field) Who the message is from (the "From" field) The message you want to send (the "Message" field)
    It will look something like this, and you'll spot that it's similar to email personalisation or some web design coding. **Example Code** [[{]]\ [[ "to": " {{ person.phone_number }}", ]]\ [[ "from": "Tall Bob", ]]\ [[ "message": "Hi {{ person.first_name|default:''}} this is a test message sent via Klaviyo \\n\\nUnsubscribe: {OptOutURL} ",]]\ [["reference": "{{ person.email|default:'' }}" ]]\ [[}]]
    One important thing to be aware of. Because this is JSON (#scary_codey_stuff), we handle new lines a little differently. If you want a new line in your message just type [[\n]] in your message. If you've been subjected to web design duties or HTML, you get it.
    Congratulations, you're there. Click Save.
    It is highly recommended to use a 'Reference Value' in the JSON body of the message. This would help the Tall Bob team to provide a delivery receipt for contacts that don't have a contact ID. The 'Reference Value' used for our contact search is "reference": "{{ person.email }}"
    And now, click "Review and Turn On"
    And, click "Turn On" again to get it going.

    Part 4: Viewing the Message Status

    Once the flow is sent, navigate to [https://www.klaviyo.com/people](https://www.klaviyo.com/people) Click on the profile of the customer to whom the campaign has been sent to view the Message Status
    The status that represents a successful message send would be message_sent message_delivered

    Part 5: Here's how to add shortened links

    Hang On... So what about links and link shortening and all that jazz?
    So, you want to include a link in your SMS message and have it shortened? Brilliant, we think it's great, and it's really easy to do. Simply,go back to that #scary JSON from earlier, we just need to add one extra line: "shorten_urls": true,
    And, yes - you are done. If you do get stuck, please don't tear your hair or demand more caffeination. The #tallbob team are happy to help. Just reach out. And, if you think we could improve our tutorial - please let us know! Yes, there are humans on the other side, and we're open to feedback. [[email protected]](mailto:[email protected])
    This Scribe is in tip-top shape!Leave feedback if there are any issues with this Scribe