TrustMate integration

TrustMate is a tool that enables building online brand image through management of reviews of your online shop or company. You can integrate it with Synerise using webhooks to build a variety of business scenarios.

One of the scenarios is building a workflow that generates a survey link from TrustMate and saves it in Synerise, so you can later reuse the survey link in communication with customers to encourage them to leave their feedback, for example, on the transaction process.

TrustMate integration
TrustMate integration

Prerequisites


Contact TrustMate to get the value of the x-api-key header dedicated for your account. This header is required while creating a workflow.

Process overview


  1. Create a workflow that retrieves a link to the survey
  2. Use survey links in communication with customers
  3. Track survey answers

Create a workflow which is triggered by every purchase. In response to the purchase, the system sends a webhook to TrustMate with the details of a purchased product and in return a link to the survey is sent to Synerise. Once the link is received, Synerise generates an event on a customer’s profile with the link to the survey which is available in the event parameters.

Trustmate integration workflow
Trustmate integration workflow

Trigger


  1. In Synerise, go to Automation > Workflows > New workflow.
  2. Add the first node - Client Event. In the node configuration:
    1. Select an event that signifies a purchase of an item (in this use case it’s product.buy).
    2. Confirm by clicking Apply.
      Configuration of the Client Event node
      Configuration of the Client Event node

Outgoing integration


  1. Add the Outgoing integration node. In the node configuration:

    1. Enter the name of the node: generate survey link
    2. Select the Custom webhook tab.
    3. In the Webhook name, enter the name of the webhook which will be available in the webhook.response event as the action.name parameter.
    4. Select the POST method.
    5. Enter the URL of the endpoint. Refer to the documentation of TrustMate to get the endpoint URL.
    6. In the headers section:
      • Leave content-type at default.
      • Add x-api-key header and enter the key you received from TrustMate.
    7. Enter the request body:
        
      {
          "customer_name": "{{customer['firstname']}}",
          "send_to": "{{customer['email']}}",
          "type": "email",
          "language": "pl",
          "products": [
             {
              "name": "{{ event.params['$name'] }}",
              "category": "{{ event.params['$category']|join(' / ') }}",
              "id": "{{ event.params['$sku'] }}",
              "image_url": "{{ event.params['image-link'] }}",
              "product_url": "{{event.params['$url'] }}",
              "group_id": "{{ event.params['mpn'] }}"
          } 
      ]
      }
              

    This request body contains the required frame structure which includes the following transaction parameters in the Jinjava format from Synerise:

Note: Read more about Jinjava in Automation here.
Parameter Jinjava
name of the customer {{customer['firstname']}}
email address of the customer {{customer['email']}}
name of the purchased product {{ event.params['$name']}}
category of the purchased product {{ event.params['$category']<br>\|join(' / ') }}
ID of the purchased product {{ event.params['$sku']}}
link to the image of the purchased product {{ event.params['image-link']}}
link to the purchased product {{event.params['$url']}}
group ID of the purchased product {{ event.params['mpn']}}
WARNING: The name of the parameters you send in the transaction events may differ in your case, so make sure the names in the square brackets correspond with the parameter names you send in the transaction events.
Configuration of the Outgoing integration node
Configuration of the Outgoing integration node

Event Filter


  1. Add the Event Filter node. In the node configuration:
    1. Select webhook.response.
    2. Select the name parameter.
    3. In the text field, enter generate survey link (name of the Outgoing integration node).
    4. Confirm by clicking Apply.
      Configuration of the Event Filter node
      Configuration of the Event Filter node
Tip: If you cannot find the webhook.response event or the event parameter on the event list (especially, when you execute the webhook for the first time), you can go to Data Management > Events and create needed event and its parameters. Learn more about events here.
Note: Time range in configuration of this node lets you avoid freezing your customer in the workflow for 30 days in the case API does not respond.

  1. Add the Generate Event node. In the node configuration:
    1. Enter the name of the event with the link to the survey which will be generated in the customer’s profile.
    2. In the Label field, enter the description of the event. It will be displayed in the header of the event on a client card (see picture below).
      Example of Label
      Example of the Label use
    3. In the body of the event, enter:
      {
        "link_ocena": "{{ event.params['body.product[0]'] }}",
        "link_ocena_firmy": "{{ event.params['body.company[0]'] }}",
        "link_optOut": "{{ event.params['body.optOut'] }}",
        "orderId": "{{ automationPathSteps['boughtProduct'].event.params.$orderId }}"
      }
              
      Important: You don’t have to change anything.
    4. Confirm by clicking Apply. As a result, this event will be available on the customer’s profile.
      Configuration of the Generate event node
      Configuration of the Generate event node
  2. Add the End node.
  3. Launch the workflow by clicking Save&Run.
    Result: The event is generated on the customer’s profile.
    Event generated on the customer's profile
    Event generated on the customer's profile

The survey link is saved in the details of the event. To be able to use the link in the communication with customer, you need to create an aggregate with this link.

Create an aggregate


  1. In Synerise, go to Analytics > Aggregates > New aggregate.
  2. As the aggregate type, select LAST.
  3. Select the event that contains the link to the survey (in this example it is trustMate.link).
  4. Select the parameter which contains the link to the survey.
  5. Optionally, switch the Show in client card toggle on, to show this aggregate on the customer’s profile.
  6. Complete the aggregate by clicking Save.
    Configuration of the aggregate
    Configuration of the aggregate

Prepare a message template


  1. In Synerise, go to the Communication module. In this use case SMS channel is used.
    Tip: You can read more about SMS in Synerise.
  2. Prepare copy for your message, for example: Hi! Give us feedback on your latest purchase.
  3. In the copy of the message, add: {% shortlink %}{% aggregate aggregate-hash %}{aggregate result [0]}{% end aggregate %}{% endshortlink %}. Replace aggregate-hash with the ID of the aggregate you created in this part of the process.
    Tip: The ID of the aggregate is available in the URL of the aggregate.
    Result:
    Example communication that reuses survey feedback
    Example communication that reuses survey feedback
  4. You can use send this template manually in the Communication module or send it by means of the Automation module.
    Tip: Read more about sending SMS through Automation here.

Track survey answers


Optionally, you can level up your communication with customers based on the answers from the survey. To make it possible, configure a custom event that will be sent to Synerise via API and which will include the rate of a product. When a customer fills in the survey, this event will be sent to Synerise.

Exemplary event frame:

  
{
   "action":"client.review",
   "client":{
      "email":"string"
   },
   "params":{
      "author_name":"string",
      "created_at":"2021-04-28T14:09:27.000Z",
      "grade":0,
      "brand":"string",
      "category":"string",
      "group_id":"string",
      "gtin":"string",
      "image_url":"string",
      "local_id":"string",
      "name":"string",
      "product_url":"string",
      "public_identifier":"string"
   }
}

Tip: You can find the API method here.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker