Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Rehook Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as Rehook in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.
  • This destination is in Beta

Rehook(link takes you to an external page) is a powerful and dedicated user-incentivization solution that enables businesses to reward and engage users without depending on tech teams. With an elegant and easy-to-use interface, Rehook is designed to help you run user-promotion campaigns that are flexible, customizable and scalable.

This destination is maintained by Rehook. For any issues with the destination, contact the Rehook Support team.


Getting started

getting-started page anchor
  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for Rehook in the Destinations Catalog, and select the Rehook destination.
  3. Select which Source should send data to the Rehook destination.
  4. Open the Rehook Dashboard(link takes you to an external page) and navigate to Settings > API Keys & Secret Key. Copy your key.
  5. Open the Segment app and paste the API Key & Secret Key in the Rehook destination settings page.

Rehook's destination is designed to support the following Segment Spec methods. Because this is an Actions Destination, you can also map other Segment methods.

Identify

identify page anchor

If you're not familiar with the Segment Spec, take a moment to understand what the Identify method does. An example call looks like this:

Example 1:

example-1 page anchor
1
analytics.identify('userId12345', {
2
firstName: 'Bob',
3
lastName: 'Dole',
4
email: 'bob.dole@example.com',
5
company: 'Initech',
6
employees: 234
7
});
1
analytics.identify('userId12345', {
2
firstName: 'Bob',
3
lastName: 'Dole',
4
email: 'bob.dole@example.com',
5
company: 'Initech',
6
employees: 234,
7
referral_code: "ERTYUS"
8
});

Every time you make an Identify call with an included userId:

  1. Rehook verifies that the userId exists.
  2. If the userId does not exist, Rehook adds the user as a Customer to the Rehook database and matches user properties with the Segment traits sent in the Identify call payload.
  3. If the userId exists, Rehook updates the user properties for the Customer against the Segment traits sent in the Identify call payload.
  4. If referral_code is unique, Rehook updates the user properties in its database.

All of the traits recognized by Segment are translated and matched with the Rehook Customer user properties. These fields are automatically created or mapped for a Customer in Rehook and are available for personalization and advanced segmentation.

(information)

How Rehook handles incoming userId and referral_code in Identify calls:

  • The userId field is required. Rehook drops Identify calls without a userId.
  • If a call is made with anonymousID, Rehook drops the Identify call.
  • If referral_code matches with another userId, Rehook drops the Identify call.

If you're not familiar with the Segment Spec, take a moment to understand what the Track method does.

An example call looks like this:

1
analytics.track('Product Viewed', {
2
userId: "userId12345",
3
product_id: '507f1f779439011',
4
name: 'Monopoly: 3rd Edition',
5
price: 18.99,
6
url: 'https://www.example.com/product/path',
7
image_url: 'https://www.example.com/product/path.jpg'
8
});
1
analytics.track('signup', {
2
userId: "userId12345",
3
referral_code: 'ERTYUS'
4
});

Segment sends Track calls to Rehook as a Custom Event. When you make a Track call, Segment sends the event to Rehook with the event name and all properties that you specified.

(information)

How Rehook handles incoming userId and referral_code in Track calls:

  • The userId field is required. Rehook drops Track calls without a userId.
  • If a call is made with anonymousId, Rehook drops the Track call.
  • The referral_code field is required if event name is set as a conversion event in Rehook.

Property nameTypeRequiredDescription
Api Keystring
required

Your Rehook API Key


Api Secretstring
required

Your Rehook API Secret


Build your own Mappings. Combine supported triggers with the following Rehook-supported actions:

(information)

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Send the identify event to create or update the customer in rehook.

Identify User is a Cloud action. The default Trigger is type = "identify"

Property nameTypeRequiredDescription
Source IDSTRING
required

The unique user identifier set by you


User MetadataOBJECT

Optional

Properties to set on the user profile


Referral CodeSTRING

Optional

The referral code of the user

Send the Track event to rehook.

Track Event is a Cloud action. The default Trigger is type = "track"

Property nameTypeRequiredDescription
Event NameSTRING
required

The name of the event being performed.


Source IDSTRING
required

The unique user identifier set by you


Event PropertiesOBJECT

Optional

An object of key-value pairs that represent event properties to be sent along with the event.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to Rehook may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
Api Keystring
required

Your Rehook API Key


Api Secretstring
required

Your Rehook API Secret