How to Use UnifyPort with Trengo: Unified Messaging Guide

Connect UnifyPort's unified messaging API to Trengo so WhatsApp, Telegram, LINE, and more land in one team inbox. Setup, webhook flow, and examples.

How to Use UnifyPort with Trengo: Unified Messaging Guide

Trengo gives your support and sales teams one shared inbox for customer conversations. UnifyPort gives your developers one REST API and one webhook stream for reaching messaging channels like WhatsApp, Telegram, LINE, TikTok, Zalo, and X. Put them together and you get a clean division of labor: UnifyPort handles channel connectivity and delivery reliability, while Trengo handles who replies, how fast, and with what automation.

This guide explains how the two platforms fit together, walks through the setup, and shows practical examples you can adapt to your own stack.

Why combine UnifyPort and Trengo?

First viewport screenshot of Auto-parts & shops

First viewport screenshot of Auto-parts & shops.

Most teams that run Trengo hit the same wall eventually: Trengo's native channel list covers the big platforms, but your product or your customers live on channels that aren't natively supported, or you need programmatic control over sending that a dashboard alone can't give you.

UnifyPort solves that by normalizing provider messages, status updates, and account events into a stable JSON shape. Instead of maintaining separate integrations for each provider, you write against one API. The platform also provides a webhook control plane for signatures, subscriptions, retry behavior, and failure tracking, plus a delivery queue with rate limits, retries, idempotency, and failure isolation.

Trengo solves the other half: routing conversations to the right agent, applying SLAs, running flowbots, and keeping a shared history. Combining them means your engineering team stops building channel-specific plumbing, and your support team keeps working in the interface they already know.

How the integration works

At a high level, there are two directions of traffic, and it helps to think about them separately.

Outbound: your systems to the customer

  1. Your application calls the UnifyPort send API with a channel, an account reference, and the message payload.
  2. UnifyPort normalizes the request, applies rate limits and idempotency keys, and queues it for delivery.
  3. The provider delivers the message to the customer.
  4. UnifyPort emits a status event (sent, delivered, read, failed) on the standard webhook stream.

You can trigger this from anywhere: a backend job, a CRM workflow, or a Trengo automation that calls your middleware.

Inbound: the customer to your team

  1. A customer replies on WhatsApp, Telegram, LINE, or another connected channel.
  2. UnifyPort receives the provider callback, verifies it, and normalizes it into a standard event.
  3. UnifyPort delivers the event to your webhook endpoint, signed with HMAC-SHA256.
  4. Your endpoint validates the signature and creates or updates the corresponding conversation in Trengo.
  5. Trengo assigns the conversation, applies routing rules, and notifies the right team.

This is the pattern that makes the combination useful: UnifyPort is the translation and reliability layer, Trengo is the human and automation layer.

Prerequisites

Before you start, make sure you have:

  • A UnifyPort workspace with at least one messaging account authorized. Free messaging accounts are available in every workspace, and pricing is graduated by messaging account, so you can test before committing.
  • A Trengo account with API access and the permissions needed to create contacts and conversations.
  • A publicly reachable HTTPS endpoint to receive UnifyPort webhooks.
  • One of the official UnifyPort SDKs if you prefer not to hand-roll HTTP calls. Node.js, PHP, Go, and Python are supported.

Step-by-step setup

First viewport screenshot of Stay ahead of the curve with engagement for automotive | Trengo

First viewport screenshot of Stay ahead of the curve with engagement for automotive | Trengo.

Step 1: Authorize your messaging accounts in UnifyPort

Create or connect the accounts you want to use. Depending on the channel, authorization flows include QR code, code, password, Passkey, or session import. Once an account is connected, UnifyPort treats it as a first-class resource you can send from and subscribe to events for.

If you are connecting several channels, do this one at a time and label the accounts clearly. Account lifecycle management gets much easier when names map to real business units.

Step 2: Generate API keys and store your signing secret

UnifyPort uses API key authentication for outbound calls and HMAC-SHA256 signatures for inbound webhooks. Keep the signing secret in your secret manager, not in source control. Rotate keys on a schedule that matches your security policy.

Step 3: Register your webhook subscription

The webhook control plane lets you define which event types you want, where they should be delivered, and how failures should be handled. Subscribe to inbound messages and status events at minimum. If you also need to react to account events, such as a session expiring, add those too.

Configure retry behavior deliberately. A short retry window with a dead-letter destination is usually better than infinite retries against an endpoint that is down.

Step 4: Build the webhook receiver

Your receiver should do four things in order:

  1. Verify the HMAC-SHA256 signature against the raw request body.
  2. Return a 2xx response quickly, before doing slow work.
  3. Push the event onto a queue for asynchronous processing.
  4. Use idempotency keys to avoid creating duplicate conversations when the same event is retried.

Skipping step 4 is the most common cause of duplicate tickets. UnifyPort retries are a feature, not a bug, so your consumer has to be idempotent.

Step 5: Map UnifyPort events to Trengo conversations

This is where you define your own business logic. A typical mapping looks like this:

  • Use the channel plus the customer identifier as your lookup key.
  • If a Trengo contact exists, attach the message to the open conversation.
  • If not, create the contact and open a new conversation.
  • Set channel metadata so agents can see which platform the customer came from.
  • Apply labels or teams based on the channel or the message content.

Because UnifyPort normalizes provider payloads, this mapping code stays stable even when you add a new channel later. That is the main architectural payoff.

Step 6: Wire outbound replies

When an agent replies in Trengo, your middleware picks up the reply event, resolves the correct UnifyPort account for that channel, and calls the send API. Include an idempotency key derived from the Trengo message ID so a retry never double-sends.

Step 7: Monitor both sides

Watch UnifyPort's failure tracking for delivery problems and your own queue depth for processing lag. A message that is delivered by UnifyPort but stuck in your consumer looks identical to a lost message from the customer's point of view.

Practical examples

First viewport screenshot of B2B eCommerce

First viewport screenshot of B2B eCommerce.

Example 1: A Telegram support channel inside Trengo

Your customers in a specific region prefer Telegram, but your support team works entirely in Trengo. You authorize a Telegram account in UnifyPort, subscribe to inbound message events, and create a Trengo conversation for each new chat. Agents reply in Trengo; your middleware forwards the reply through the UnifyPort send API. The team never opens Telegram, and the customer never leaves it.

Example 2: Order status notifications with delivery tracking

Your eCommerce backend sends order updates through UnifyPort on WhatsApp. Each send includes an idempotency key tied to the order ID, so a retry from your job runner cannot produce a duplicate notification. Status events flow back through the webhook stream, and you store them against the order record. If a message fails, your system can escalate to email or flag the order for manual review.

Example 3: Routing inbound messages by channel

Different channels deserve different SLAs. Inbound events from X might go to a social media team, while LINE messages go to a regional support pod. Because UnifyPort delivers a consistent event shape, your routing rules can key off a single field rather than branching on provider-specific payloads.

Where each platform should own the logic

First viewport screenshot of Customer engagement platform for seamless omnichannel communication

First viewport screenshot of Customer engagement platform for seamless omnichannel communication.

It is tempting to push everything into one system. Resist that. A clean split looks like this:

Concern Owner
Channel authorization and session lifecycle UnifyPort
Message normalization and delivery retries UnifyPort
Signature verification and webhook subscriptions UnifyPort
Agent assignment and SLAs Trengo
Conversation history and CSAT Trengo
Flowbots and auto replies Trengo
Business-specific routing rules Your middleware

If you find yourself building channel-specific branching logic in your middleware, that is usually a sign the logic belongs in UnifyPort's event layer instead. If you find yourself building agent routing inside your middleware, that belongs in Trengo.

Common problems this combination solves

  • Channel sprawl. Instead of separate integrations per provider, you maintain one API contract and one event stream.
  • Duplicate tickets. Idempotency keys on the UnifyPort side plus idempotent consumers on your side prevent the same message from opening two conversations.
  • Silent delivery failures. Status events and failure tracking surface problems that a fire-and-forget send would hide.
  • Inconsistent agent experience. Trengo stays the single place agents work, regardless of how many channels are connected underneath.
  • Fragile webhook handling. Signature verification, retry configuration, and failure isolation are platform features rather than things you build from scratch.

If you are evaluating the broader messaging stack around this pattern, the comparison of UnifyPort vs Syniverse CPaaS vs Infobip covers API model, channel coverage, and pricing trade-offs. Teams that already run Zendesk alongside Trengo will find the UnifyPort and Zendesk integration guide useful, since the webhook-to-ticket pattern is nearly identical. For a deeper look at making webhook consumers reliable, see Real-Time Sync Webhooks: A Developer's Architecture Guide.

Related reading

Sources and further reading

FAQ

Does UnifyPort replace Trengo?

No. They operate at different layers. UnifyPort is a unified messaging API platform for connecting to channels and normalizing events. Trengo is an omnichannel customer engagement platform for managing conversations, agents, and automation. Most teams use both.

Which channels can I add to Trengo through UnifyPort?

UnifyPort supports WhatsApp, Telegram, LINE, TikTok, Zalo, and X, among others. You can connect any supported channel and route its events into Trengo conversations.

Do I need to write code for this integration?

Yes, at least a webhook receiver and an outbound send path. Official SDKs for Node.js, PHP, Go, and Python reduce the amount of boilerplate, but some middleware is always required to map UnifyPort events to Trengo conversations.

How do I prevent duplicate conversations when webhooks retry?

Use idempotency keys on outbound sends and make your inbound consumer idempotent. Derive a stable key from the event ID or the provider message ID, and check it before creating a Trengo conversation.

Is there a cost to testing this setup?

UnifyPort offers free messaging accounts in every workspace, and pricing is graduated by messaging account, so you can validate the integration before scaling up.

What happens if my webhook endpoint goes down?

UnifyPort's webhook control plane lets you configure retry behavior and track failures. Pair that with a queue on your side so a brief outage does not turn into lost messages.

Conclusion

UnifyPort and Trengo solve complementary problems. UnifyPort absorbs the complexity of connecting to multiple messaging providers and keeping delivery reliable. Trengo gives your team a single place to work, with the routing, automation, and reporting that customer-facing teams need.

The integration itself is not complicated, but it rewards care in three places: signature verification, idempotent event handling, and a clear boundary between channel logic and agent logic. Get those right and adding a new channel becomes a configuration change rather than a project.

Start with one channel, one webhook subscription, and one Trengo team. Once that path is stable, expanding to the rest of your channels is mostly repetition.