ReferralAPIManager
The ReferralAPIManager class invokes and manages
referral-related REST API requests. Use this class to interact with the Salesforce Referral
Marketing APIs and manage referral-related operations.
Methods
referralEnrollment
Enroll an existing member to a given promotion using the membership number.
Enroll an existing member to a given promotion using the contact ID.
Enroll a new member to a given promotion.
| Parameter | Type | Description |
|---|---|---|
| contactID | String | Required. The contact ID of the existing member. Provide either the contact ID, the membership number, or the person account details (first name, last name, and email), and not all. |
| country | String | The name of the country of the member. |
| devMode | Boolean | Indicates whether the method is run in the developer mode (true) or not (false). |
| String | Required. The email ID of the member. | |
| enrollmentChannel | String | Channel used to join the referral program. Possible values are:
|
| firstName | String | Required. The first name of the member. Provide either the contact ID, the membership number, or the person account details (first name, last name, and email), and not all. |
| lastName | String | Required. The last name of the member. Provide either the contact ID, the membership number, or the person account details (first name, last name, and email), and not all. |
| memberStatus | String | Status of the new advocate after enrollment. Possible values are:
|
| membershipNumber | String | Required. The membership number of the existing member. Provide either the contact ID, the membership number, or the person account details (first name, last name, and email), and not all. |
| promotionCode | String | Required. The promotion code to enroll for. |
| state | String | The name of the state of the member. |
| transactionalJournalFrequency | String | The frequency at which transaction statements must be generated for the
advocate. Possible values are:
|
| transactionalJournalMethod | String | Preferred method of receiving transaction journal statements. Possible values are: |
| version | String | The API version. |
referralEvent
Send referral emails to the given recipients.
| Parameter | Type | Description |
|---|---|---|
| devMode | Boolean | Indicates whether the method is run in the developer mode (true) or not (false). |
| emails | String[] | Required. A list of recipient emails to share the referral code with. |
| eventType | String | The type of event. Possible values are:
The default value is Refer. |
| referralCode | String | Required. The referral code to share with the recipients. |
| version | String | The API version. |