Referral Advocate Enrollments (POST)

Enroll an existing or new customer as an advocate of a referral promotion.

Special Access Rules 

To use this resource, your org must have person accounts enabled.

Resource 

1/referral-programs/$REFERRAL_PROGRAM_NAME/promotions/$PROMOTION_CODE/member-enrollments

Resource Example:

1https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/referral-programs/demoProgram/promotions/DemoPromo1/member-enrollments

Available Version 

59.0

Requires Chatter 

No

HTTP Methods 

POST

Request Body for POST 

Root XML Tag 

referralMemberEnrollmentInput

JSON Examples to Enroll an Existing Referral Program Advocate to a Promotion 

1{
2   "membershipNumber":"M125"
3}
1{
2  "contactId": "003xx000004Wsxc"
3}
1{
2  "associatedPersonAccountDetails": {
3    "firstName": "Mac",
4    "lastName": "Ray",
5    "email": "mray@salesforce.com",
6    "allowDuplicateRecords": "false",
7    "additionalPersonAccountFieldValues": {
8      "attributes": {
9        "country__c": "US"
10      }
11    }
12  },
13  "memberStatus": "Active",
14  "transactionJournalStatementFrequency": "Monthly",
15  "transactionJournalStatementMethod": "Mail",
16  "enrollmentChannel": "Email",
17  "additionalMemberFieldValues": {
18    "attributes": {
19      "state__c": "California"
20    }
21  }
22}

JSON Example to Enroll a New Customer as an Advocate of a Promotion 

1{
2  "membershipNumber": "M125",
3  "associatedPersonAccountDetails": {
4    "firstName": "Mac",
5    "lastName": "Ray",
6    "email": "mray@salesforce.com",
7    "allowDuplicateRecords": "false",
8    "additionalPersonAccountFieldValues": {
9      "attributes": {
10        "country__c": "US"
11      }
12    }
13  },
14  "memberStatus": "Active",
15  "transactionJournalStatementFrequency": "Monthly",
16  "transactionJournalStatementMethod": "Mail",
17  "enrollmentChannel": "Email",
18  "additionalMemberFieldValues": {
19    "attributes": {
20      "state__c": "California"
21    }
22  }
23}

Request Body Properties 

additionalMemberFieldValues 

Custom field values of the advocate.

Type: Map<String, String>. Optional. Available in version 59.0.

additionalPersonAccountFieldValues 

Custom field values from the advocate’s person account.

Type: Map<String, String>. Optional. Available in version 59.0.

associatedPersonAccountDetails 

Details of the advocate’s person account.

Type: Person Account Input. Optional. This field is required only if you don’t have the contact ID or the membership number of the advocate. Available in version 59.0.

contactId 

Contact ID of the advocate to enroll to the referral promotion.

Type: String. Optional. This field is required only if you don’t have the person account details or the membership number of the advocate. Available in version 59.0.

enrollmentChannel 

Channel that the advocate has used to join the referral program.

Possible values are:

  • CallCenter
  • Email
  • Franchise
  • Mobile
  • Partner
  • Pos
  • Print
  • Social
  • Store
  • Web

Type: String. Optional. Available in version 59.0.

memberStatus 

Status of the new advocate after enrollment.

Possible values are:

  • Active
  • Inactive
  • Custom value - Any value you define in your org. For example, if an advocate must be evaluated before confirming enrollment, you can create a status called On Hold and assign it to this field.

The default value is Active.

Type: String. Optional. This field is required for enrolling a new advocate. Available in version 59.0.

membershipEndDate 

Date the advocate’s referral program membership ends.

Type: String. Optional. Available in version 59.0.

membershipNumber 

Unique membership number of the advocate.

Type: String. Optional. This field is required only if you don’t have the person account details or the contact ID of the advocate. Available in version 59.0.

shouldProcessTransactionsInRealTime 

Indicates whether the transaction journals created by the API are processed as soon as they’re created (true) or not (false). The default value is true.

Type: Boolean. Optional. Available in version 59.0.

transactionJournalStatementFrequency 

Frequency at which transaction statements must be generated for the advocate.

Possible values are:

  • Monthly
  • Quarterly

Type: String. Optional. Available in version 59.0.

transactionJournalStatementMethod 

Preferred method of receiving transaction journal statements.

Possible values are:

  • Email
  • Mail

Type: String. Optional. Available in version 59.0.

isAutoEnrolled 

Indicates whether member is auto-enrolled for referral promotion (true) or not (false). The default value is false.

Type: Boolean. Optional. Available in version 64.0.

isEnrollmentActive 

Indicates if the member is enrolled for the referral promotion (true) or not (false). The default value is true.

Type: Boolean. Optional. Available in version 64.0.

Response Body for POST 

Referral Member Enrollment