Loading
Referral Marketing
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Referral Event Business API

          Referral Event Business API

          Use the Referral Event Business API to create tracking records for referral activities that advocates and their referred friends complete during the last three stages of promotions. The API also automates the issuing of rewards after advocates and their referred friends complete eligible activities. For each activity, a transaction journal is created and other records are created or updated. Integrate the API with any site or external website where advocates and their referred friends perform the activities. For example, you can integrate the API with your ecommerce site, point of sale (POS), or customer portal.

          Required Editions

          Available in: Lightning Experience
          Available in: EnterprisePerformance, Unlimited, and Developer Editions with Referral Marketing

          About the Referral Event Business API

          To learn more about the Referral Event Business API’s resource, request body, and response body, see Referral Event in the Referral Marketing Developer Guide.

          Stage 3

          During the first and second stages, the promotion only interacts with the advocates. In the third stage, advocates refer their friends. To track an advocate’s referral, run the API with these fields:

          • eventType—Specify the event type as Refer.
          • referralCode—Specify the code of the advocate who referred their friend and the code of the promotion that the activity is a part of, separated by a hyphen.
          • activityDateTime—Specify the date and time when the advocate referred their friend.
          • firstName—Specify the first name of the referred friend.
          • lastName—Specify the last name of the referred friend.
          • email—Specify the email address of the referred friend.

          If a contact exists for the friend in the org, specify the contact ID of the friend instead of the first name, last name, and email address.

          Stage 4

          After advocates refer their friends in the third stage, the referred friends engage with the brand for the first time. The ways of engagement can differ based on your business requirements or industry. To track a referred friend engaging with the brand, run the API with these fields:

          • eventType—Specify the event type as Enrollment.
          • referralCode—Specify the code of the advocate who referred their friend and the code of the promotion that the activity is a part of, separated by a hyphen.
          • contactId—Specify the ID of the friend’s Contact record.
          • activityDateTime—Specify the date and time when the friend signed up.

          If a contact doesn’t exist for the friend, specify the first name, last name, and email address of the friend instead of the contact ID.

          Stage 5

          After referred friends engage with the brand for the first time, they must complete an activity. The activity varies based on your promotion's goals and industry. To track the completion of an activity by a referred friend, run the API with these fields:

          • eventType—Specify the event type as Purchase.
          • referralCode—Specify the code of the advocate who referred their friend and the code of the promotion that the activity is a part of, separated by a hyphen.
          • contactId—Specify the ID of the friend’s contact record.
          • activityDateTime—Specify the date and time when the friend completed their first purchase.

          If a contact doesn’t exist for the friend, specify the first name, last name, and email address of the friend instead of the contact ID.

          Tip
          Tip To ensure that the Referral Event Business API doesn’t create duplicate contacts for advocates and duplicate contacts and person accounts for referred friends, create matching rules and duplicate rules on the Contact and Person Account objects.
           
          Loading
          Salesforce Help | Article