Trustmary Integration for WooCommerce

By Trustmary

0+ active installationsVersion 2.0.0

Sends WooCommerce order contact details automatically to Trustmary when an order reaches a selected status.

Description

Trustmary Integration for WooCommerce connects your WooCommerce store with the Trustmary review and feedback platform.

You create triggers. Each trigger decides:

  1. When – one or more order statuses (completed, processing, refunded, …).
  2. For which orders – optional filters: products (a parent product covers its variations), billing country, minimum or maximum order total, first order only. Conditions are combined with AND; use another trigger for OR.
  3. What to do – add the contact to one or more Trustmary lists (a list connected to a survey sends it), or only create/update the contact.
  4. Which data – a field mapping from order data to Trustmary contact fields, including your own custom fields. By default only email, name and order source information are sent.

All triggers run in parallel, so you can for example send a different survey for each product.

Features:

  • Unlimited triggers, each with its own statuses, filters, lists and field mapping
  • Product search, country, order total and first-order filters
  • Field mapping to standard and custom Trustmary contact fields, fixed values and order meta
  • “Create default fields” creates the plugin’s custom fields in Trustmary with one click
  • Sending runs in the background (Action Scheduler) – checkout never waits for the API; temporary errors are retried
  • Each trigger sends an order only once unless “Send again” is enabled
  • Broken triggers (deleted product, missing list) are flagged and paused automatically
  • API key stored encrypted
  • All events logged to the WooCommerce log (channel: woocommerce-trustmary), without personal data
  • HPOS-compatible (WooCommerce 8+)
  • Developer filters: tmwc_contact_data, tmwc_order_fields, tmwc_order_values

External services

This plugin connects to the Trustmary API (https://api.trustmary.io/v1) to deliver customer contact data collected from WooCommerce orders.

What data is sent and when:
When a WooCommerce order matches a trigger configured by the store administrator, the plugin sends the order data selected in that trigger’s field mapping to the Trustmary API. By default this is the customer’s email address, first and last name, the order ID and status, and the names of the purchased products. The administrator can add or remove fields (for example phone, company, address, country or product details). The order number is always sent as the contact’s external ID.

The settings page also calls the API to test the connection, list your Trustmary lists and contact fields, and create the plugin’s default contact fields.

No data is sent unless an API key has been configured and at least one trigger is active.

Service provider: Trustmary Group Oy

  • Terms of Service: https://trustmary.com/terms-of-service/
  • Privacy Policy: https://trustmary.com/privacy-policy/

Installation

  1. In your WordPress admin, go to Plugins → Add New and search for Trustmary Integration for WooCommerce.
  2. Click Install Now and then Activate.
  3. Go to WooCommerce → Settings → Trustmary.
  4. Enter your Trustmary API key (found in your Trustmary account under Settings → Developers) and click Test API connection. A successful test shows the name of your Trustmary organization and saves the key.
  5. Click Add trigger, choose the order status, optional filters and Trustmary lists, and save.

FAQ

Where do I find my Trustmary API key?

Log in to your Trustmary account, go to Settings → Developers, and create a new API key.

Can the same order be sent more than once?

Each trigger sends an order only once, unless you enable “Send again” for that trigger. Different triggers work independently, so one order can be sent by several triggers.

How do I send a different survey for each product?

Create one trigger per product: set the product filter and choose the list connected to that product’s survey.

What happens when several triggers match the same order and map the same field?

Each matching trigger sends its own update, so the contact keeps the value from whichever trigger was processed last. List memberships are not affected: the customer is added to the lists of every matching trigger. If you need the product in a contact field, map a different target field in each trigger, or use the source field “Product names (comma separated)”, which contains all products of the order.

I use both this plugin and another WooCommerce integration for Trustmary. Will I get duplicate contacts?

Contacts are matched by email, and the order number is sent as the contact’s external ID, so the same order updates the same contact.

How can I customise the data that is sent?

Use the tmwc_contact_data filter. It receives the contact payload, the order and the trigger. Return an empty value to skip sending.

add_filter( 'tmwc_contact_data', function( $contact, $order, $rule ) {
    $contact['field_MYFIELD'] = 'value';
    return $contact;
}, 10, 3 );

To offer your own order data in the field mapping, register it with tmwc_order_fields (key => label) and provide the value with tmwc_order_values.

Where can I see what the plugin has sent?

Go to WooCommerce → Status → Logs and select the woocommerce-trustmary channel. Every status change shows which triggers matched and why others did not.

Screenshots

Changelog

2.0.0

  • Added: Triggers. Create any number of triggers, each with its own order statuses, filters, Trustmary lists and field mapping.
  • Added: Filters by product (parent covers variations), billing country, order total and first order.
  • Added: Field mapping to standard and custom Trustmary contact fields, fixed values and order meta; “Create default fields” and “Reset default mapping”.
  • Added: Background sending with Action Scheduler and automatic retry on temporary API errors (429/5xx).
  • Added: Broken-trigger warning for deleted products and missing lists.
  • Added: API key is stored encrypted.
  • Added: “Test API connection” shows the Trustmary organization the key belongs to and saves the key when the test succeeds.
  • Changed: Redesigned settings page: connection status card, trigger and step cards, status badges, Trustmary colours.
  • Added: The site administrator is emailed (at most once a day) if the saved API key can no longer be decrypted, for example after AUTH_KEY changes. Filter tmwc_notification_email changes the recipient.
  • Changed: The order number is sent as the contact’s external ID.
  • Changed: The tmwc_contact_data filter now receives the trigger as the third argument.
  • Migration: your existing settings are moved to a trigger called “Default” that works as before.

1.1.0

  • Added: Browse and select Trustmary lists directly from the settings page.
  • Added: Selected lists are loaded and pre-selected automatically on page load.
  • Improved: More robust handling of different Trustmary API response formats.
  • Changed: Removed separate “send per product” mode to simplify the settings.

1.0.0

  • Initial release.