One beneficial tool that Klaviyo offers is to import external API data into your Klaviyo account. This can also be used with Shopper Approved's API, allowing you to retrieve your review data and use that in your own messaging campaigns. To get access to this data, you will need to set up a new data feed inside your Klaviyo account.
First, log into your Klaviyo dashboard, click "Settings", then "Web Feeds" under "Other":
Second, add a new web feed by clicking "Add Web Feed" on the top-right of the page.
Third, add a feed name. At this point, you will need to get the Shopper Approved API URL to put into this new data feed.
To do this, open a new tab in your browser, and log into your Shopper Approved dashboard. Then, click on "All Services" at the top and select "API Docs" from the dropdown.
To get one of your API URLs, you can find an endpoint in the API documentation that you want to retrieve, and add the information in the fields required to run a test request. This will let you see what data is returned, as well as the full request URL.
Once you have your desired request URL, you can copy and paste that into the "Feed URL" field in your Klaviyo data feed. The request method will be "GET," and the content type is JSON by default.
Click "Add Web Feed," and then you can click "Preview" on the top-right to make sure the data came through correctly.
Now, you can add the Klaviyo code to pull in the data. For example, if I wanted the data for my Shopper_Approved_Five_Star data feed I just created, and I wanted to dynamically insert the total number of five star reviews, this is the code I would use in my email template:
{{ feeds.Shopper_Approved_Five_Star.total_count }}
Notice that you first put "feeds," then the name of the feed, then the key from the feed you want to access. This line of code gives me the count of five-star reviews I've collected through Shopper Approved. And the best part - this updates dynamically since the data feed updates as you collect more reviews!