Difference between revisions of "Setting up Yotpo Mail After Purchase"

From Spiffy Stores Knowledge Base

 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
If you've already added the Yotpo Reviews Widget, you now have the option of adding the Mail After Purchase function.  This process takes a few steps, but the benefit from this is that you can collect reviews to display in your store automatically, rather than emailing your customers manually or using a service like MailChimp to email your customers.
+
If you've already added the Yotpo Reviews Widget, you now have the option of adding the Mail After Purchase function.  This process takes a few steps, but the benefit from this is that you can email customers automatically after they make a purchase, rather than emailing your customers manually or using a service like MailChimp to email your customers.
 +
 
 +
Most stores currently have no way of collecting reviews automatically. Yotpo's free service allows you to automatically email your customer after they've made a purchase prompting them to review your store or the product.  The reviews can then either display in your store automatically, or you can use Yotpo's built-in moderation to approve reviews before they are displayed.
  
 
The setup cost of the Yotpo Mail After Purchase function is a one-off fee of $35 AUD.  To have us set it up for you, please [mailto:support@spiffystores.com.au?subject=Please%20add%20the%20Yotpo%20Mail%20After%20Purchase%20function%20to%20my%20store&body=Hi%2C%0D%0A%0D%0AI%20would%20like%20the%20Yotpo%20Mail%20After%20Purchase%20function%20added%20to%20my%20store.%0D%0A%0D%0AMy%20store%20name%3A%0D%0A%0D%0AYotpo%20login%20email%3A%0D%0AYotpo%20Password%3A%0D%0A%0D%0AApp%20Key%3A%0D%0ASecret%20Key%3A%0D%0A%0D%0AI%20agree%20to%20the%20%2435%20AUD%20charge%20to%20add%20the%20function%20to%20my%20store.%0D%0A%0D%0AThank%20you%2C%0D%0AYour%20name email us] with the following information...
 
The setup cost of the Yotpo Mail After Purchase function is a one-off fee of $35 AUD.  To have us set it up for you, please [mailto:support@spiffystores.com.au?subject=Please%20add%20the%20Yotpo%20Mail%20After%20Purchase%20function%20to%20my%20store&body=Hi%2C%0D%0A%0D%0AI%20would%20like%20the%20Yotpo%20Mail%20After%20Purchase%20function%20added%20to%20my%20store.%0D%0A%0D%0AMy%20store%20name%3A%0D%0A%0D%0AYotpo%20login%20email%3A%0D%0AYotpo%20Password%3A%0D%0A%0D%0AApp%20Key%3A%0D%0ASecret%20Key%3A%0D%0A%0D%0AI%20agree%20to%20the%20%2435%20AUD%20charge%20to%20add%20the%20function%20to%20my%20store.%0D%0A%0D%0AThank%20you%2C%0D%0AYour%20name email us] with the following information...
Line 17: Line 19:
 
Secret Key<br>
 
Secret Key<br>
 
# To retrieve your secret key, you'll need to click the "Get Secret Key" button.   
 
# To retrieve your secret key, you'll need to click the "Get Secret Key" button.   
# A link will be sent to you with a code
+
# A link will be sent to you by email with a code.
# Paster the code from the email into the "Enter the code" box
+
# Paste the code from the email into the "Enter the code" box.
 
# Your Secret key will now be displayed.  
 
# Your Secret key will now be displayed.  
 
# Paste your Secret Key into the email you send us. <br><br>
 
# Paste your Secret Key into the email you send us. <br><br>
Line 30: Line 32:
  
 
Once you have your user token, copy the code snippet below, and paste it into the "Additional Content & Scripts" field in the Preferences -> Checkout & Payment section of your store's admin.  You'll need to update the <APPKEY> and <UTOKEN> in the code with your Yotpo App Key and your Yotpo User Token.<br><br>
 
Once you have your user token, copy the code snippet below, and paste it into the "Additional Content & Scripts" field in the Preferences -> Checkout & Payment section of your store's admin.  You'll need to update the <APPKEY> and <UTOKEN> in the code with your Yotpo App Key and your Yotpo User Token.<br><br>
 +
 +
One note about this DIY solution though... the UTOKEN lasts only 14 days, so you would need to update it every 14 days to keep it running.<br><br>
  
 
<pre>
 
<pre>

Latest revision as of 09:30, 13 May 2021

If you've already added the Yotpo Reviews Widget, you now have the option of adding the Mail After Purchase function. This process takes a few steps, but the benefit from this is that you can email customers automatically after they make a purchase, rather than emailing your customers manually or using a service like MailChimp to email your customers.

Most stores currently have no way of collecting reviews automatically. Yotpo's free service allows you to automatically email your customer after they've made a purchase prompting them to review your store or the product. The reviews can then either display in your store automatically, or you can use Yotpo's built-in moderation to approve reviews before they are displayed.

The setup cost of the Yotpo Mail After Purchase function is a one-off fee of $35 AUD. To have us set it up for you, please email us with the following information...

  1. The email address and password you use to log in to Yotpo. They need to be for the administrator of the Yotpo account, as we cannot generate keys without admin access.

  2. Your Yotpo App Key and Secret Key

  3. Your store's name

Retrieving your Yotpo App Key and Secret Key

App Key

  1. Log in to your Yotpo Dashboard
  2. Hover over the person icon in the top right, and click "Settings".
  3. Scroll down to the bottom of the page and copy your APP Key
  4. Paste your App Key into the email you send us.

Secret Key

  1. To retrieve your secret key, you'll need to click the "Get Secret Key" button.
  2. A link will be sent to you by email with a code.
  3. Paste the code from the email into the "Enter the code" box.
  4. Your Secret key will now be displayed.
  5. Paste your Secret Key into the email you send us.

When you have all the info we need, please email us with this info, and request that we add the conversion code to your store for you.

Want to do it yourself?

To send order data to Yotpo, you'll need to generate a user token (UTOKEN). Yotpo documentation on how to do this can be found at https://core-api.yotpo.com/v1.0/reference#about-authentication

A handy utility to do this is the Postman App.

Once you have your user token, copy the code snippet below, and paste it into the "Additional Content & Scripts" field in the Preferences -> Checkout & Payment section of your store's admin. You'll need to update the <APPKEY> and <UTOKEN> in the code with your Yotpo App Key and your Yotpo User Token.

One note about this DIY solution though... the UTOKEN lasts only 14 days, so you would need to update it every 14 days to keep it running.

<!-- Yotpo mail after purchase -->

<script>

$(document).ready(function(){
  var data = JSON.stringify({
	"platform": "general",
	"utoken": "<UTOKEN>",
	"email": "{{ customer.email }}",
	"customer_name": "{{ customer.first_name }}",
	"order_id": "{{ order_name }}",
	"order_date": "{{ order_date | date: "%Y-%m-%d" }}",
	"currency_iso": "{{ shop.currency }}",
	"products": {% for item in line_items %}{
		"{{ item.sku }}": {
			"url": "{{ item.product.url }}",
			"name": "{{ item.title }}",
			"image": "{{ item | img_url: '2048x2048' }}",
			"price": "{{ item.price | money_without_currency }}"
		}{% unless forloop.last %},{% endunless %}{% endfor %}
	}
  });

  var xhr = new XMLHttpRequest();
  var url = "https://api.yotpo.com/apps/<APPKEY>/purchases/";
  xhr.open("POST", url, true);
  xhr.setRequestHeader("Content-Type", "application/json");
  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4 && xhr.status === 200) {
        var json = JSON.parse(xhr.responseText);
        console.log(json);
    }
  };
  xhr.send(data);

});

</script>

<!-- End Yotpo mail after purchase -->