The Trustvoice integration in Engage involves Interactions and custom contact attributes. A custom automation trigger will be added in a later iteration.
Follow the steps below to integrate.
Setup in Engage
These are the steps to follow:
- Enable interactions - Must be done in the backend by a Voyado representative
- Create API keys that will be shared with Trustvoice
- Create custom attributes (explained below)
- Set up a custom trigger - used to trigger review emails
- Set up Delta share - Must be done in the backend by a Voyado representative
1 - Enable Interactions
Start by activating Interactions for your Engage tenant (ask your Voyado PM to do this for you).
See here for more about Interactions in Engage.
2 - Define the interaction schema
Every Interaction in Engage is defined by a schema.
Here is the structure of the schema used for the Trustvoice integration:
{
"jsonSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"productSku": {
"type": "string",
"displayName": "Sku",
"showInContactCard": "true",
"addToSegmentation": "true"
},
"rating": {
"type": "integer",
"displayName": "Rating",
"showInContactCard": "true",
"addToSegmentation": "true"
},
"comment": {
"type": "string",
"displayName": "Comment",
"showInContactCard": "true"
}
}
},
"id": "completedProductRating",
"displayName": "Completed Trustvoice review"
}
To create the Interaction, this schema is sent to the endpoint:
POST api/v3/interactionschemas
3 - Create the custom attributes
Trustvoice uses some custom contact attributes in Engage to send review information. You'll need to set there attributes up first. Navigate to Administration > Configure Engage and then Contact attributes. Now create the following three custom attributes:
| Id | Name | Type | Description |
| reviewLatest | Review Latest | Date | The most recent date of a review |
| reviewLatestValue | Review Latest Value | Integer | The score / value of the contact's latest review |
| reviewAverageGrade | Review Average Grade | Number |
The contact's overall review rating |
Make these attributes "Segmentable", "Exportable" and "Read-only in contact card".
You should also map these three custom attributes to a specific contact panel giving you an easy way to view them (for example, a tab on the contact card named "Rating and Review").
Here is a payload sent from Trustvoice to Engage to update these attributes for a contact:
{
"reviewAverageGrade":4.5,
"reviewLatest":"2024-11-20T13:00:00.000Z",
"reviewLatestValue":5,
"interests":"sport"
}
This is sent to this endpoint:
POST api/v2/contacts/{contactId}
Or for API v3:
PATCH api/v3/contacts/{contactId}
4 - Send the interaction
Once the schema has been created and posted, you can send interactions of this type. In the case of the schema above, the interactions you send will look like this:
{
"schemaId": "completedProductRating",
"contactId": "ea50e150-e12a-49f9-a496-b21001450d55",
"createdDate": "2022-07-05T09:26:01.000Z",
"payload": {
"productSku": "17184225",
"rating": 5,
"comment": "Ett bra grepp precis som jag förväntade mig. "
}
}
schemaId (in this case "completedProductRating") must match the one used in the schema definition payload.This payload is sent to the interactions endpoint:
POST api/v3/interactions
The interaction can be picked up in Engage by a custom automation trigger and used to start an automation. An example of the response is:
{
"id": "gvwixukdja3w5v6afac47pkoi27346i52wyeu37faaqik76cocyjv4ih2gj7zwyiojsxm2lfo5jwk3tu",
"self": {
"contactId": "6e48d16c-05c0-46bd-be1d-b06f0085c2b0",
"href": "https://qaretail1.acceptanstest.voyado.com/api/v3/interactions/gvwixukdja3w5v6afac47pkoi27346i52wyeu37faaqik76cocyjv4ih2gj7zwyiojsxm2lfo5jwk3tu",
"created": "2023-12-14T10:56:16+00:00"
}
}
The Interaction details can be viewed on the contact card, on the "Interactions" tab.
5 - Set up the custom automation trigger
This functionality is coming soon.
Set up the custom trigger according to the instructions here.
- Name the custom trigger “Trustvoice review”
- Give it the triggerId of “sendReview”
Add the three fields to be used in the custom trigger's payload:
| Name | Description |
| reviewHTML | The products to review |
| type | Type of send-out |
| language | Language in Trustvoice |
6. Request deltashare to be setup by Voyado team
This will be setup by a CX engineer from the Voyado team. Please contact your account manager to enable this functionality.
Article last reviewed
Comments
0 comments
Please sign in to leave a comment.