Skip to content

Commit b7edf25

Browse files
committed
few change in doc according to our api
1 parent 0ee4b3f commit b7edf25

File tree

1 file changed

+37
-5
lines changed
  • src/connections/destinations/catalog/rehook

1 file changed

+37
-5
lines changed

src/connections/destinations/catalog/rehook/index.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rewrite: true
44
id: 64c02312ff0ce798cc8d1a7e
55
---
66

7-
[Rehook](https://rehook.ai/){:target="_blank"} is a powerful and dedicated user-incentivization solution that enables businesses to reward and engage users without any dependency on tech. With an elegant, easy-to-use interface, Rehook is designed to help you run user-promotion campaigns that are flexible, customizable, and scalable.
7+
[Rehook](https://rehook.ai/){:target="_blank"} is a powerful and dedicated user-incentivization solution that enables businesses to reward and engage users without any dependency 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.
88

99

1010
Rehook maintains this destination; for any issues with the destination, [contact the Rehook Support team](mailto:[email protected]).
@@ -29,6 +29,7 @@ Rehook supports the following methods, as specified in the [Segment Spec](/docs/
2929

3030
Take a look at the [Identify method documentation](/docs/connections/spec/identify) to learn about what it does.
3131

32+
#### Example 1:
3233
```js
3334
analytics.identify('userId12345', {
3435
firstName: 'Bob',
@@ -39,27 +40,58 @@ analytics.identify('userId12345', {
3940
});
4041
```
4142

43+
#### Example 2:
44+
```js
45+
analytics.identify('userId12345', {
46+
firstName: 'Bob',
47+
lastName: 'Dole',
48+
49+
company: 'Initech',
50+
employees: 234,
51+
referral_code: "ERTYUS"
52+
});
53+
```
54+
4255
Every time you make an identify call with userId included:
4356
1. Rehook verifies that the userId exists.
44-
2. If the userId doesn’t 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.
57+
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.
4558
3. If the userId exists, Rehook updates the user properties for the Customer against the Segment `traits` sent in the identify call payload.
59+
4. If referral_code is unique, Rehook updates the user properties in its database.
4660

4761
All the [special traits](/docs/connections/spec/identify#traits) recognized by Segment are translated and matched with the Rehook user properties for a Customer. These fields are automatically created or mapped for a Customer in Rehook and are available for personalization and advance segmentation.
4862

63+
> info "How Rehook handles incoming userId and referral_code in identify call"
64+
> * The userId field is required. Rehook drops identify calls without a userId.
65+
> * If a call is made with anonymousID, Rehook drops the identify call.
66+
> * If referral_code matches with another userId, Rehook drops the identify call.
67+
4968
### Track
5069

5170
Take a look at the [Track method documentation](/docs/connections/spec/track) to learn about what it does. An example call looks like:
5271

72+
#### Example 1:
5373
```js
5474
analytics.track('Product Viewed', {
55-
userId: "97980cfea0067",
56-
product_id: '507f1f77bcf86cd799439011',
75+
userId: "userId12345",
76+
product_id: '507f1f779439011',
5777
name: 'Monopoly: 3rd Edition',
5878
price: 18.99,
5979
url: 'https://www.example.com/product/path',
6080
image_url: 'https://www.example.com/product/path.jpg'
6181
});
6282
```
83+
84+
#### Example 2:
85+
```js
86+
analytics.track('signup', {
87+
userId: "userId12345",
88+
referral_code: 'ERTYUS'
89+
});
90+
```
91+
6392
Segment sends `Track` calls to Rehook as a Custom Event. When you call the track, Segment sends the event to Rehook with the event name and all properties that you specified.
6493

65-
Be sure if you send an Identify or Track call without userId, the call will be dropped.
94+
> info "How Rehook handles incoming userId and referral_code in track call"
95+
> * The userId field is required. Rehook drops track calls without a userId.
96+
> * If a call is made with anonymousId, Rehook drops the track call.
97+
> * The referral_code field is required, if event name is set as a conversion event on Rehook.

0 commit comments

Comments
 (0)