Newer Version Available
Referral Event
Create referral event records when an advocate refers a friend, or when referred friends
sign up or make a purchase.
Supported REST HTTP Methods
- URI
- /services/data/vXX.X/actions/standard/processB2bReferralEvent
- Formats
- JSON
- HTTP Methods
- POST
- Authentication
- Authorization: Bearer Token
Inputs
Outputs
Example
Sample Request
1{
2 "inputs":[
3 {
4 "accountId": "001xx000003Ge9HAAS",
5 "activityDateTime": "2025-02-13T00:00:00",
6 "referralCode": "FR886GFJ-NONMCB2B",
7 "eventType": "Refer",
8 "purchaseAmount": 40000,
9 "purchaseQuantity": 34
10 }
11 ]
12}Sample Response
1
2 {
3 "actionName": "processB2bReferralEvent",
4 "errors": null,
5 "invocationId": null,
6 "isSuccess": true,
7 "outcome": null,
8 "outputValues": {
9 "accountId": "001xx000003Ge9HAAS",
10 "opportunityId": "006xx000001a3e8",
11 "voucherList": [
12 {
13 "effectiveDate": "2025-06-26T00:00:00.000Z",
14 "expirationDate": "2026-06-30T00:00:00.000Z",
15 "transactionJournalId": "0lVxx00000003Fd",
16 "voucherCode": "Z41TNEH9",
17 "voucherDefinition": "vdef",
18 "voucherId": "0kDxx00000000xhEAA"
19 },
20 {
21 "effectiveDate": "2025-06-26T00:00:00.000Z",
22 "expirationDate": "2026-06-30T00:00:00.000Z",
23 "transactionJournalId": "0lVxx00000003Fe",
24 "voucherCode": "YTARIRO3",
25 "voucherDefinition": "vdef",
26 "voucherId": "0kDxx00000000xiEAA"
27 }
28 ],
29 "transactionJournalIds": [
30 "0lVxx00000003Fd",
31 "0lVxx00000003Fe"
32 ],
33 "referralStage": "Referral Closure/Converts",
34 "referralId": "0wixx00000000b7",
35 "extendedRewardList": [],
36 "leadId": "00Qxx000002TSFi"
37 },
38 "sortOrder": -1,
39 "version": 1
40 }
41]