website logo
Navigate through spaces
⌘K
OVERVIEW
ORDER MANAGEMENT (OMS)
SHIPPING - SETUP
Shipping Methods
Shipping Zones
Shipping Method Setup Examples
TAXES - Setup
Tax Automation with Stripe Tax
Tax Automation with Avalara
CONTENT MANAGEMENT (CMS)
DATA
CUSTOMER LIFETIME REVENUE
Customer Lifetime Revenue Explanation
Customer Lifetime Revenue and Purchase Likelihood
Recency Frequency and Monetary
CLR and RFM Data Table Glossary
RFM and CLR in the Hub
LOOKER
Modifying a Dashboard
Timestamp differences between Looker, OMS and Shopify
How to create custom calculations in Looker
Looker and Shopify data models
Custom fields
How to 'Save and Schedule' reports
Creating Custom Reports or Look
Looks vs Dashboards
Login Looker FAQ
Looker Glossary
SEGMENT EVENT TRACKING
What are event tracking
Adding Tracking
What is the Tracking Plan?
The Chord Tracking Plan
The Shopify Tracking Plan
Event Tracking FAQ
EVENT UPDATES PAGE
Email Subscription Payment Event Update
Product Feed Setup
Getting Segment to Production
Consent Management
Installing in Next.js
Installing in Gatsby
Integrations
👩‍💻Developer Tools
Using Chord with Shopify
Docs powered by archbee 

Yotpo

3min



Introduction

This document will walk through integrating Chord's OMS with Yotpo. Once you integrate, your customers will be able to use a powerful data-driven tools that makes it very easy for your customers to provide their feedback so you can transform every purchase made into a review.





What is Yotpo

The Yotpo destination function is used to sync completed orders from the Chord's OMS platform to Yotpo to be able to collect higher-quality reviews addressing high-converting topics that actually inspire purchases and grow your business

For more information about Yotpo and custmizing the request flows please refer to their document here



Creating the function

Before starting the creation of the function ensure that you are using the correct code template. There are two different code templates for Autonomy vs Performance customers. It is important to choose the right one.

Copy the correct code

Navigate to Segment and click Catalog -> Functions -> New Function



New Function
New Function




Select "Destination Function" and click Build

Paste in the function code from above

Function Type - Destination
Function Type - Destination




and click Settings - Add Setting

Label = apikey

Name = apikey

Unanmed = <apikey> (found in Yotpo settings)

Click Add Setting

Adding Setting
Adding Setting






Label = secretkey

Name = secretkey

Unamed = <secretkey> (found in Yopto settings)

Click Add Setting

Document image




Label = secretkey

Name = secretkey

Unamed = <secretkey> (found in Yopto settings)

Click Array

In the First Item event field paste Order Completed

Remove Second and Third Item fields

Click Add Setting

Events Setting
Events Setting




Click Configure

Provide a Name, we recommend Yotpo Function

Provide a Description, and even a logo and click create Function

Creating Function
Creating Function




Connect Function to Source

Your Function has been created!

Click Connect Destination

Connecting the Destination
Connecting the Destination


For Autonomy customers, the destination function should be connected to the Ruby back-end source.

example of Ruby autonomy back-end
example of Ruby autonomy back-end


For Performance customers, the destination function should be connected to the Javascript front- end source.

example of JS Performance front-end
example of JS Performance front-end




When you connect the destination function, you'll need to provide values for the settings you configured above.

Select your Destination and click Next

Provide a Destination Name, we recommend something like "Yotpo Production" Click Save

Enter the Yotpo API key and secret key (found in the Yotpo admin), and Order Completed for the events setting.



Make sure to enable the function

Verify your Function

You can test that the function is working correctly in the "Event Tester" tab.

You'll need an example event, so find (or place a test order) a recent Order Completed event in the Segment Debugger for the source that you connected to the Yotpo function, and copy the entire event JSON from the "Raw" tab:

Order Completed Debugger
Order Completed Debugger


Navigate to the "Event Tester" tab of the Yotpo destination function you just created, and replace the dummy JSON with the event JSON you copied:

Event Tester
Event Tester






The order from the Order Completed event you copied will be synced to Yotpo, so if Yotpo is configured to send automatic review requests, the customer will receive one.



Hit "Send Event" and make sure you see a 200:

Event Lifecycle
Event Lifecycle




Verify API Order

If you would like to query the Yotpo API to see what orders have been submitted from the function, here's how:

  • Get an access token

Populate the API_KEY and the SECRET_KEY in the code snippet:



curl --request POST \

     --url https://api.yotpo.com/core/v3/stores/API_KEY/access_tokens \

     --header 'Accept: application/json' \

     --header 'Content-Type: application/json' \

     --data '{ "secret": "SECRET_KEY" }'





Copy the access_tokenfrom the output and use it in the next step.

  • Get the list of orders

Populate the API_KEY and the TOKEN (from access_token above) in the code snippet:

curl --request GET \

--url https://api.yotpo.com/core/v3/stores/API_KEY/orders \

--header 'Accept: application/json' \

--header 'Content-Type: application/json' \

--header 'X-Yotpo-Token: TOKEN'













You should get a JSON list of orders from Yotpo.



Your connection is now successfully created!







Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
TikTok
NEXT
CDP Segment FAQs
Docs powered by archbee 
TABLE OF CONTENTS
Introduction
What is Yotpo
Creating the function
Connect Function to Source
Verify your Function
Verify API Order