Skip to content

Trustpilot

Trustpilot is an online review platform that enables customers to share feedback and allows you to manage and respond to reviews.

This page provides a step-by-step guide for:

  • Creating review invitations using Trustpilot’s Create Invitation API
  • Personalizing messages with product reviews through Trustpilot’s Product Reviews API

Prerequisites

Before you start, you’ll need the following:

Integration

Step 1: Get your Trustpilot API credentials

  1. Log into Trustpilot with your credentials.
  2. Create or retrieve the API key and secret in the Trustpilot dashboard by going to Integrations > Developers > APIs. If you don’t already have an API key, create a new one:
    1. Go to Application Name > Create Application
    2. Copy your API key and secret, which will be used to authenticate your Connected Content requests.

Sending Trustpilot review invitations

Step 1: Set up a Braze webhook campaign

Set up an action-based Braze webhook campaign to trigger the Trustpilot APIs to send email review invitations to users. For example, you could send a review invitation after a user places an order with the following webhook details:

  • Webhook URL: https://invitations-api.trustpilot.com/v1/private/business-units/{businessUnitId}/email-invitations
  • Method: POST
  • Add the relevant customer information as key-value pairs

Step 2: Retrieve the access token

  1. Use Connected Content to make a request to Trustpilot’s Authentication endpoint to retrieve the Access Token.
  2. 부여 유형을 사용하고 client_credentials 부여 유형을 사용하고 연결된 콘텐츠 태그에 API 키와 비밀번호를 입력하여 토큰을 검색합니다. The Connected Content request can be entered into the request header. The Connected Content may look like this:
1
2
3
4
5
6
7
8
9
10
11
{% connected_content 
https://api.trustpilot.com/v1/oauth/oauth-business-users-for-applications/accesstoken
:method post
:headers {"Content-Type": "application/x-www-form-urlencoded", "Authorization": "Basic {{'API_KEY:API_SECRET' | base64_encode}}" }
:body grant_type=client_credentials
:save token
:retry
:cache_max_age 3600 %}

{{token.access_token}}

3. Add the access token to the request header of your webhook campaign.

Personalizing messages with product review insights

In your Braze campaign, make a Connected Content call to request data from Trustpilot’s Get product reviews summary endpoint (https://api.trustpilot.com/v1/product-reviews/business-units/{businessUnitId}). This method retrieves product reviews for specific SKUs from the business unit. The following example specifies the specific product SKU and filters for five-star reviews.

1
2
3
4
{% connected_content https://api.trustpilot.com/v1/product-reviews/business-units/66ea0530xxxxxx/reviews?sku={{event_properties.${item_sku}}}&stars=5
   :method get
   :headers {"apikey": "xxxxx"}
   :content_type application/json :save result %}

Liquid를 사용하여 정보를 가져오는 이메일의 연결된 콘텐츠.

The Connected Content request will return the product reviews.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  {
   "productReviews": [
       {
           "id": "670d5810ba62e6b31de97de9",
           "createdAt": "2024-10-14T17:42:40.286Z",
           "stars": 5,
           "content": "Such a great toy truck, my kids really enjoy it! ",
           "consumer": {
               "id": "6176xxxx",
               "displayName": "Kevin Bob"
           },
           "language": "en",
           "attributeRatings": [],
           "attachments": [],
           "firstCompanyComment": null
       }
   ],
   "links": []

2. Use Liquid syntax to pull the relevant content into your message. For example, to pull in the product review’s content, use the Liquid tag {{result.productReviews[0].content}}.

사용자가 장바구니에 담아둔 장난감 트럭에 대한 리뷰가 포함된 개인화된 이메일.

New Stuff!