Skip to content

Commit 1c0034a

Browse files
authored
add offering id field to experiment enrollment (#1328)
1 parent 1b0edda commit 1c0034a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

code_blocks/integrations/webhooks/sample-event-experiment-enrollment.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"original_app_user_id":"$RCAnonymousID:12345678-1234-1234-1234-123456789123",
99
"experiment_id":"prexpca1234abcd",
1010
"experiment_variant":"b",
11+
"offering_id":"experiment_offering_b",
1112
"experiment_enrolled_at_ms":1658726378679,
1213
"type":"EXPERIMENT_ENROLLMENT",
1314
"id":"12345678-1234-1234-1234-123456789012"

docs/integrations/webhooks/event-types-and-fields.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RevenueCat sends webhooks in response to events that occur in your app. Here the
2727
| `REFUND_REVERSED` | A refund has been reversed. | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
2828
| `INVOICE_ISSUANCE` | A new invoice has been issued for the purchase. This event is sent when a new invoice is created for a subscription or non-renewing purchase that has not yet been paid. This event is only available for Web Billing purchases, and applies both to new purchases (via the checkout) and subscription renewals scheduled by the billing engine. | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
2929
| `VIRTUAL_CURRENCY_TRANSACTION` | A virtual currency transaction had occurred, such as currency being granted from a purchase or removed due to a refund. For subscriptions that grant virtual currency, this event is sent for the entire subscription lifecycle (initial purchase, renewals, refunds, etc.) whenever there is an adjustment to be made to the currency balance. This event provides details about the virtual currency adjustment, including the amount, currency type, and source of the change. | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
30-
| `EXPERIMENT_ENROLLMENT` | A customer was enrolled in an experiment. The webhook contains [fields unique to experiment enrollments](#experiment-enrollment-event-fields): the experiment id, the experiment variant and the enrollment timestamp. This event is not associated with a store. | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
30+
| `EXPERIMENT_ENROLLMENT` | A customer was enrolled in an experiment. The webhook contains [fields unique to experiment enrollments](#experiment-enrollment-event-fields): the experiment id, the experiment variant, the offering id of the variant, and the enrollment timestamp. This event is not associated with a store. | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
3131

3232
## Events Format
3333

@@ -132,4 +132,5 @@ The following fields are specific to `VIRTUAL_CURRENCY_TRANSACTION` events:
132132
| -------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
133133
| `experiment_id` | String | The ID of the experiment that the customer was enrolled in. |
134134
| `experiment_variant` | String | The variant of the experiment that the customer was enrolled in. |
135+
| `offering_id` | String | The offering ID of the variant the customer was enrolled in. |
135136
| `enrolled_at_ms` | Integer | The time when the customer was enrolled in the experiment. Measured in milliseconds since Unix epoch. |

0 commit comments

Comments
 (0)