
The RTB House engine, one of its kind powered by deep learning algorithms, identifies potential buyers and boosts performance via 1:1 ultra-personalized retargeting up to 50 percent more efficient than standard machine learning AI-based approaches.

Thanks to the RTB House integration with Synerise, you can enhance your advertising performance by creating segments of people based on behavioral and contextual activities in your integrated online and offline ecosystem. You can choose among various segments in Synerise, for example - customers who are ready to buy or those with the highest propensity to purchase.  

The following example shows how to create a simple integration - sending all online and offline transactions to RTB House so that this data can be used in, for example, retargeting activities. 

## Prerequisites
---
Obtain the following data from RTB House (you need to contact their support):
- `pkey`, which is a static key unique to your RTB house account,
- hash of the source, needed to put into the `tag` parameter.

## Building the workflow
---
1. Go to **Automation Hub > Workflows > New workflow**.
1. Add a Profile Event trigger node, where the condition is only that the event is `transaction.charge`
2. Add an outgoing integration node:
    1. As the integration type, choose **Custom webhook**.
    2. As the method, select **POST**.
    3. As the URL, paste the following string:  
       `https://omni.creativecdn.com/partner/omni/postbacks?pkey=<PKEY>&uid={{customer['uuid']}}&time={{event.params.time}}&tag=pr_<SOURCE-HASH>_orderstatus2_{{event.params.$totalAmount}}_{{event.params.$orderId}}_{% set tab = [] %}{% for p in event.params.products %}{% do tab.append(p.sku) %}{% endfor %}{{tab|join(',')}}`  
    
       <details class="accordion"><summary>Click to see the explanation of the parameters</summary><div class="accordion-content"><ul> <li><code>pkey</code>: the unique static key of your RTB House account</li> <li><code>uid={{customer[&#39;uuid&#39;]}}</code>:the customer&#39;s identifier; UUID from Synerise database; inserted dynamically by Jinjava</li> <li><code>time={{event.params.time}}</code>: the timestamp of the event; Synerise uses Unix time; inserted dynamically by Jinjava</li> <li><code>tag</code>: contains the source hash and variables inserted dynamically by Jinjava: the cost of the transaction, the ID of the transaction in Synerise database, and all items in the transaction</li> </ul></div></details>

    1. In the URL, replace :
        1. `<PKEY>` with the pkey you received from RTB House.
        2. `<SOURCE-HASH>` with the source hash you received from RTB House.  
    2. Leave the other integration parameters (headers, body, authorization) at default.  

   **Result:**  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/rtb-outgoing-webhook.png" class="large" alt="Outgoing Integration definition"><figcaption>Outgoing Integration definition</figcaption></figure>

1. Add an end node.  
2. Click **Save and Run**.

    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/rtb_workflow.png" class="large" alt="Overview of the workflow"><figcaption>The structure of a complete workflow</figcaption></figure>

## What's next
---
To test the automation:
    1. Send a `transaction.charge` event from a test customer profile.
    2. Verify that an automation event is visible in the test profile's customer card.
    3. Verify that the data from the test event was uploaded to RTB House.

## Read more
---
- [Automation Hub](/docs/automation)
- [Integration](/docs/automation/integration)