> ## Documentation Index
> Fetch the complete documentation index at: https://partner-integrations.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lipscore

Brands are increasingly collecting feedback on their products and customer's in-store experiences. Lipscore is a nordic leader in this space. Lipscore reviews and ratings can be easily incorporated into Engage.

In Engage, the data from Lipscore can be used for the segmentation of customers based on their reviews, ratings, and other data, enabling targeted communication to customers.

## How it works

Here is how the integration works:

1. Lipscore is configured to fetch contact and product data, as well as transactions and their line items, from Engage using Engage's **Delta Share** service.
2. Lipscore processes this data to decide which contacts should be sent an email prompting them to leave a product review, and which products should be included in the prompt.
3. The email can be sent from Lipscore or from Engage. If the second option, the processed data goes to a **custom automation trigger** that must be already set up to receive the data and send the email.
4. The processed contact / product data can optionally also be sent to Engage as an **interaction**. This allows it to be saved and used for segmentation.

### In Email Design Studio

After you have added the custom trigger (see below) the Lipscore starter module can be found in the module **Starter library** in the "Partner" category. Add the module to the canvas and save it in your Team library for future use in sendouts. As the module is based on HTML code sent by Lipscore, you will not be able to style the content.

<Frame caption="In Email Design Studio">
  <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-01.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=c345074d7ba7548676383b5b6a99c5d9" alt="In Email Design Studio" width="339" height="373" data-path="images/lipscore/lipscore-01.png" />
</Frame>

### In classic email editor

The custom trigger request to Engage contains HTML-code (reviewHTML), generated by Lipscore, which must be personalized and rendered in the email template in Engage.

Below are examples of the different emails that can be sent:

<AccordionGroup>
  <Accordion title="Delivery confirmation email">
    <Frame>
      <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-02.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=1d95a7ea92e4b9edac3d9fddad231e6a" alt="Delivery confirmation email" width="517" height="250" data-path="images/lipscore/lipscore-02.png" />
    </Frame>
  </Accordion>

  <Accordion title="Product review email">
    <Frame>
      <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-03.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=e8d3624b3c490088b9987ba560421989" alt="Product review email" width="510" height="250" data-path="images/lipscore/lipscore-03.png" />
    </Frame>
  </Accordion>

  <Accordion title="Service review email">
    <Frame>
      <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-04.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=baa8e1f1478ec9dc3ef8928f3d8d5958" alt="Service review email" width="567" height="250" data-path="images/lipscore/lipscore-04.png" />
    </Frame>
  </Accordion>
</AccordionGroup>

## Setting up delta share access

This integration requires [delta sharing](https://developer.voyado.com/docs/delta-sharing/delta-sharing) to be correctly set up for you. This is done in the Engage back end. Contact your Voyado PM about this.

## Setting up custom trigger

You'll need to create a custom automation trigger to use the Lipscore integration with Engage. This trigger can be set up in the Engage Config Hub.

Once you have access to Config Hub, follow the steps below.

<Steps>
  <Step title="Create the trigger">
    Select **Create custom trigger**.
  </Step>

  <Step title="Define the custom trigger">
    Enter `Name`, `TriggerId` and `Description` for your custom trigger.

    * **Name**: A human readable name, shown in the Engage UI
    * **TriggerId**: The unique ID for this custom trigger
    * **Description**: A summary of what the trigger is used for

    <Frame>
      <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-05.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=4291daf169e384bf091321a23e6aae84" alt="Custom trigger creation" width="1454" height="1184" data-path="images/lipscore/lipscore-05.png" />
    </Frame>

    <Warning>
      It's important that `TriggerId` and `Name` here are correct.
    </Warning>
  </Step>

  <Step title="Next step">
    Select **Next**.
  </Step>

  <Step title="Add the fields">
    Now you will add the fields that Lipscore will send in the payload request. For each one, select **Add field** and then enter "Name" and "Description" as in the table. Press **Save** after each one.

    | **Name**   | **Description**                                                                                                                                              |
    | :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | reviewHTML | A HTML block creating the look and feel for the email. Currently included are the 5 stars, a link to a landing page, and product data such as name and image |
    | type       | Type of send-out, either `productReview` or `serviceReview`                                                                                                  |
    | language   | Language from Lipscore (as ISO 639)                                                                                                                          |
    | sourceName | Source name is assigned during integration by Lipscore. Usual format is “\[your base store name] – \[your Voyado store name]”                                |
    | sourceId   | Source ID is the external store ID of your Engage store                                                                                                      |
  </Step>

  <Step title="Custom trigger ready">
    Your custom trigger should now show up on the list of triggers when you create a new automation in Engage. It is recommended to use `type` as the entry criteria for the automation.
  </Step>
</Steps>

## Setting up automation for review emails

Lipscore has a guide for sending review emails through Engage:

<Card title="See Lipscore's guide" icon="right" horizontal href="https://lipscore.com/ikb/setting-up-lipscore-email-inside-of-voyado" />

## Interactions in Lipscore

The Lipscore integration allows data to be sent to Engage using an *interaction*. Data sent this way can be viewed in the Engage UI and also stored and used for segmentation.

<Card title="Learn about interactions" href="https://developer.voyado.com/docs/loyalty/interactions" icon="https://mintcdn.com/voyado-partners/0IxEIB2Y6a--gNYY/icons/developer-link.png?fit=max&auto=format&n=0IxEIB2Y6a--gNYY&q=85&s=36f1df27b0269657d842f3301d440083" horizontal width="128" height="128" data-path="icons/developer-link.png" />

### 1 - Creating the interaction schema

Interactions in Engage are defined by a schema. This is the structure of the schema used for the Lipscore integration:

<Accordion title="Lipscore schema for an interaction">
  ```json theme={null}
  {
    "jsonSchema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "ratingId": {
          "type": "integer",
          "displayName": "Rating ID",
          "showInContactCard": "false"
        },
        "rating": {
          "type": "integer",
          "displayName": "Rating",
          "showInContactCard": "true",
          "addToSegmentation": "true"
        },
        "comment": {
          "type": "string",
          "displayName": "Comment",
          "showInContactCard": "true"
        },
        "productSku": {
          "type": "string",
          "displayName": "Sku",
          "showInContactCard": "true",
          "addToSegmentation": "true"
        },
        "name": {
          "type": "string",
          "displayName": "Name",
          "showInContactCard": "true"
        },
        "brand": {
          "type": "string",
          "displayName": "Brand",
          "showInContactCard": "true"
        },
        "type": {
          "type": "string",
          "displayName": "Type",
          "showInContactCard": "true",
          "addToSegmentation": "true"
        },
        "sourceId": {
          "type": "string",
          "displayName": "Source ID",
          "showInContactCard": "true"
        }
      }
    },
    "id": "completedProductRating",
    "displayName": "Completed product rating"
  }
  ```
</Accordion>

To create the Interaction, the schema above is sent to this endpoint:

```http theme={null}
POST api/v3/interactionschemas
```

Lipscore will set up the schema on their end. Some configuration in Engage needs to be done before this schema can be used so get in touch with Voyado before setup.

### 2 - Sending 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'll send looks like this:

```json theme={null}
{
  "contactId": "930dca46-7ed5-4761-84f5-b18d010f031b",
  "schemaId": "completedProductRating",
  "payload": {
    "ratingId": 6028323,
    "rating": 4,
    "comment": "This is sooooooooo cool..",
    "productSku": "",
    "name": "The Collection Snowboard: Liquid",
    "brand": "Hydrogen Vendor",
    "type": "productReview"
  }
}
```

The schemaId (is this case "completedProductRating") must match the one used in the schema definition payload.

The attribute "type" can have the following values:

* **productReview**: The first time this contact reviews this product
* **productRating**: The first time this contact rates this product
* **serviceReview**: The first time this contact reviews this service
* **serviceRating**: The first time this contact rates this service
* **updated\_productReview**: Contact updates an existing product review
* **updated\_productRating**: Contact updates an existing product rating
* **updated\_serviceReview**: Contact updates an existing service review
* **updated\_serviceRating**: Contact updates an existing service rating

This payload is sent to the interactions endpoint:

```http theme={null}
POST api/v3/interactions
```

### 3 - Using the interaction data

An interaction is picked up in Engage by either the "New Interaction" or "New specific interaction" automation triggers. It can then be used to start an automation.

Use the "New specific interaction" trigger here since it allows you to pick certain values inside the interaction to decide whether to trigger the automation or not.

<Frame>
  <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-06.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=238a212f3e17813789dca44b2a43f880" alt="&#x22;New specific interaction&#x22; trigger" width="1092" height="1416" data-path="images/lipscore/lipscore-06.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/voyado-partners/8fqsH35fRlfr-n92/images/lipscore/lipscore-07.png?fit=max&auto=format&n=8fqsH35fRlfr-n92&q=85&s=76b3af157f4cc140d071e13abfc10fce" alt="Filtering the criteria" width="1060" height="496" data-path="images/lipscore/lipscore-07.png" />
</Frame>

You will also be able to filter via specific fields that were sent by Lipscore:

<Frame>
  <img src="https://mintcdn.com/voyado-partners/nmAs2IuTCbOjF32N/images/lipscore/lipscore-08.png?fit=max&auto=format&n=nmAs2IuTCbOjF32N&q=85&s=f2339b4d671d3fc6183efcb9c5dd4d8d" alt="Filtering by Lipscore fields" width="1060" height="782" data-path="images/lipscore/lipscore-08.png" />
</Frame>

Interaction data will be displayed on the contact card (in the "Interactions" tab).

<Frame>
  <img src="https://mintcdn.com/voyado-partners/nmAs2IuTCbOjF32N/images/lipscore/lipscore-09.png?fit=max&auto=format&n=nmAs2IuTCbOjF32N&q=85&s=acc04ffe20462d1fc6e4d2f21b901049" alt="Interactions on contact card" width="1567" height="521" data-path="images/lipscore/lipscore-09.png" />
</Frame>

The data received from interactions can also be used for segmentation.

### 4 - Updating an existing review

When a product review is updated through an interaction, the “type” in the payload will be set to "updated\_productReview". By specifying in your automation trigger which values of "type" will trigger the automation (for example, "productReview" and "serviceReview") you can prevent the automation from running in cases like this.

For example, you might just want to send a mail when the review is first sent, and not when it is updated.

If such an update is sent to Engage, Lipscore will remove the original review and create a new one, since existing interactions can't be updated.

## Lipscore data fields

These are the Engage data fields used by the Lipscore integration.

### Contact

| Data fields         |
| :------------------ |
| contact.contactId   |
| contact.email       |
| contact.firstName   |
| contact.lastName    |
| contact.mobilePhone |
| contact.countryCode |

### Receipt

| Data fields               |
| :------------------------ |
| receipt.receiptId         |
| receipt.receiptNumber     |
| receipt.externalId        |
| receipt.createdOnDateTime |
| receipt.storeExternalId   |
| receiptItem.articleNumber |
| receiptItem.articleName   |
| receiptItem.localPrice    |
| receiptItem.localCurrency |
| receiptItem.articleGroup  |

### Article

| Data fields           |
| :-------------------- |
| article.articleId     |
| article.articleNumber |
| article.gtin          |
| article.sku           |
| article.articleName   |
| article.brand         |
| article.mainCategory  |
