How to Integrate Friendbuy as a Segment Source

Samantha Brown Updated by Samantha Brown

How to Integrate Friendbuy as a Source in Segment

Getting Started

  1. Login to your Segment workspace
  2. From your Segment UI’s Sources page click on “Add Source”.
  3. Search for Friendbuy within the Sources Catalog and confirm by clicking Connect
  4. Give the Source a nickname and follow the set up flow to “Add Source”. The nickname will be used to designate the source in the Segment interface, and Segment will create a related schema name. The schema name is the namespace you’ll be querying against in your warehouse. The nickname can be whatever you like, but we recommend sticking to something that reflects the source itself and distinguishes amongst your environments (eg. SourceName_Prod, SourceName_Staging, SourceName_Dev).
  5. Copy the Write key from the Segment UI
  1. Login to Friendbuy. Navigate to Developer Center > Integrations
  2. Select Segment
  1. Add the Segment Write Key
  1. Select the Referral and/or Loyalty events you want to send to Segment. By default, every event is pre-selected
Note: You can choose to exclude certain campaigns from sending events

Below is a list of the event properties Friendbuy sends to Segment

Friendbuy Advocate Created

Definition: Customer submits their name, email and/or phone number in an Advocate widget on your site

Attributes Included

Field Name

Property Description

Customer Email

Email address of the Advocate created

Customer Phone Number

Phone number of the Advocate created

Customer ID

Customer ID of the Advocate created. This will be the same value as the User ID that Segment receives for this event.

Customer IP Address

IP address of the Advocate created

Friendbuy Referral Link

Referral link assigned to the Advocate created. A Referral link, also called a personal referral link or personal URL (PURL), is a link that uniquely associates an advocate to a referral program. An advocate uses their personal referral link to refer friends to a site or business. When this link is clicked by a friend, the friend is taken to the associated destination URL. Also, the referred friend’s browser will be cookied by Friendbuy with information about the referral.

Friendbuy Referral Code

Referral code assigned to the Advocate created. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friendbuy Campaign Name

The name of the referral campaign associated with the Advocate widget that was used to create this Advocate

Friendbuy Campaign ID

The ID of the referral campaign associated with the Advocate widget that was used to create this Advocate

Friendbuy Customer Name

Name of the Advocate created

Friendbuy Widget Name

The name of the Advocate widget that was used to create this Advocate

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Email Marketing Opt-In Status

The email subscription status of the Advocate create

Friendbuy SMS Marketing Opt-In Status

The SMS subscription status of the Advocate create

Friendbuy Referred Friend Created

Definition: Customer submits their name, email and/or phone number in a Friend widget on your site

Attributes Included

Field Name

Description

Customer Email

Email address of the Friend created

Customer Phone Number

Phone number of the Friend created

Customer ID

Customer ID of the Friend created. This will be the same value as the User ID that Segment receives for this event.

Customer IP Address

IP address of the Friend created

Friendbuy Advocate Referral Code

Referral code of the Advocate who referred this Friend. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friendbuy Campaign Name

The name of the referral campaign associated with the Friend widget that was used to create this Friend

Friendbuy Campaign ID

The ID of the referral campaign associated with the Friend widget that was used to create this Friend

Friendbuy Customer Name

Name of the Friend created

Friendbuy Widget Name

The name of the Friend widget that was used to create this Friend

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Email Marketing Opt-In Status

The email subscription status of the Friend create

Friendbuy SMS Marketing Opt-In Status

The SMS subscription status of the Friend create

Friendbuy Referral Share

Definition: Advocate shares the referral program offer through the widget with a Friend via Email, PURL, SMS or Social (Facebook, Messenger, Twitter)

Attributes Included

Field Name

Description

Customer Email

Email address of the Advocate

Customer ID

Customer ID of the Advocate. This will be the same value as the User ID that Segment receives for this event.

Customer IP Address

IP address of the Advocate

Friendbuy Share Channel

The share channel used by the Advocate. An advocate can refer a friend through several different channels, including email, personal referral link (PURL), SMS, or social channels like Facebook, Messenger, Twitter or WhatsApp.

Friendbuy Referral Link (PURL)

Referral link assigned to the Advocate. A Referral link, also called a personal referral link or personal URL (PURL), is a link that uniquely associates an advocate to a referral program. An advocate uses their personal referral link to refer friends to a site or business. When this link is clicked by a friend, the friend is taken to the associated destination URL. Also, the referred friend’s browser will be cookied by Friendbuy with information about the referral.

Friendbuy Email Share Reminder

Indicates whether the Advocate chose to send the Friend a reminder email after 3 days

Friendbuy Referral Code

Referral code assigned to the Advocate. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friendbuy Campaign Name

The name of the referral campaign associated with this referral share

Friendbuy Campaign ID

The ID of the referral campaign associated with this referral share

Friendbuy Widget Name

The name of the Advocate widget that was used to create this referral

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Referral Advocate Reward Earned

Definition: Advocate earns a reward after a referred Friend completes the referral conversion event and passes all business rules/fraud checks

Attributes Included

Field Name

Description

Customer Email

Email address of the Advocate

Customer ID

Customer ID of the Advocate. This will be the same value as the User ID that Segment receives for this event

Customer IP Address

IP address of the Advocate that earned the reward

Friendbuy Coupon Code

The code used to receive a discount on a purchase, commonly set up as a percentage or dollar amount off an item. In a refer-a-friend program, a coupon code can be used to reward advocates or incentivize friends to make a purchase. The code can also be used to establish attribution between the referred friend and the advocate

Friendbuy Reward Value

The value of the reward earned by the Advocate

Friendbuy Reward Currency

The currency of the reward earned by the Advocate

Friendbuy Campaign Name

The name of the referral campaign associated with this Advocate reward

Friendbuy Campaign ID

The ID of the referral campaign associated with this Advocate reward

Friendbuy Conversion Event

The type of event the Friend needs to perform, in order for the Advocate to earn this reward (e.g. purchase, email capture, sign up, or custom event) This is configured in Friendbuy, in the Advocate Reward tab of the referral campaign, under the setting How should the Reward be triggered?*

Friend Email

The email address of the Friend who performed the referral conversion event

Friend Customer ID

Customer ID of the Friend who performed the referral conversion event

Friend IP Address

IP address of the Friend who performed the referral conversion event

Friend Purchase Total

The total amount that the Friend spent at the time of conversion

Friend Order ID

The Order ID of the purchase that the Friend made at the time of conversion

Friend New Customer Status

Indicates whether the Friend is a new customer

Friendbuy Reward Tier

The Reward Tier of the Advocate

Friendbuy Widget Name

The name of the Advocate widget that was used to refer the Friend that converted

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Share Channel

The share channel used by the Advocate. An advocate can refer a friend through several different channels, including email, personal referral link (PURL), SMS, or social channels like Facebook, Messenger, Twitter or WhatsApp.

Friendbuy Referral Code

Referral code assigned to the Advocate. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friendbuy Referral Advocate Reward Rejected

Definition: Advocate reward is rejected and not distributed because they did not passes all business rules/fraud checks

Attributes Included

Field Name

Description

Customer Email

Email address of the Advocate

Customer ID

Customer ID of the Advocate. This will be the same value as the User ID that Segment receives for this event

Customer IP Address

IP address of the Advocate that earned the reward

Friendbuy Rejection Reasons

The reason or reasons that this Advocate reward was rejected. This could be due to one or more business rules not being passed, such as a Friend who completed a conversion, but did so outside of an established attribution window. This could be due to fraud detection, such as the referred Friend and the Advocate sharing the same IP address.

Friendbuy Campaign Name

The name of the referral campaign associated with this Advocate reward

Friendbuy Campaign ID

The ID of the referral campaign associated with this Advocate reward

Friendbuy Conversion Event

The type of event the Friend needs to perform, in order for the Advocate to earn this reward (e.g. purchase, email capture, sign up, or custom event) This is configured in Friendbuy, in the Advocate Reward tab of the referral campaign, under the setting How should the Reward be triggered?*

Friend Email

The email address of the Friend who performed the referral conversion event

Friend Customer ID

Customer ID of the Friend who performed the referral conversion event

Friend IP Address

IP address of the Friend who performed the referral conversion event

Friend Purchase Total

The total amount that the Friend spent at the time of conversion

Friend Order ID

The Order ID of the purchase that the Friend made at the time of conversion

Friend New Customer Status

Indicates whether the Friend is a new customer

Friendbuy Reward Tier

The Reward Tier of the Advocate

Friendbuy Widget Name

The name of the Advocate widget that was used to refer the Friend that converted

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Share Channel

The share channel used by the Advocate. An advocate can refer a friend through several different channels, including email, personal referral link (PURL), SMS, or social channels like Facebook, Messenger, Twitter or WhatsApp.

Friendbuy Referral Code

Referral code assigned to the Advocate. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friendbuy Referral Friend Incentive Earned

Definition: Referred Friend completes the referral conversion event, passes all business rules/fraud checks, and then earns an incentive

Attributes Included

Field Name

Description

Customer Email

Email address of the Friend that earned the incentive

Customer ID

Customer ID of the Friend that earned the incentive. This will be the same value as the User ID that Segment receives for this event.

Customer IP Address

IP address of the Friend that earned the incentive

Friendbuy Coupon Code

The coupon code provided to the Friend, in order to incentivize them to make a purchase. A code used to receive a discount on a purchase, commonly set up as a percentage or dollar amount off an item. The code can also be used to establish attribution between the referred friend and the advocate.

Friendbuy Reward Value

The value of the incentive earned by the Friend

Friendbuy Reward Currency

The currency of the incentive earned by the Friend

Friendbuy Campaign Name

The name of the referral campaign associated with this Friend incentive

Friendbuy Campaign ID

The ID of the referral campaign associated with this Friend incentive

Friendbuy Conversion Event

The type of event the Friend needs to perform, in order for the Advocate to earn a reward (e.g. purchase, email capture, sign up, or custom event) This is configured in Friendbuy, in the Advocate Reward tab of the referral campaign, under the setting How should the Reward be triggered?*

Friendbuy Reward Tier

The Reward Tier of the Advocate

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Share Channel

The share channel used by the Advocate. An advocate can refer a friend through several different channels, including email, personal referral link (PURL), SMS, or social channels like Facebook, Messenger, Twitter or WhatsApp.

Friendbuy Referral Code

Referral code assigned to the Advocate. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Advocate Email

The email address of the Advocate who referred the Friend that earned this incentive

Advocate Customer ID

The Customer ID of the Advocate who referred the Friend that earned this incentive

Advocate IP Address

The IP address of the Advocate who referred the Friend that earned this incentive

Friendbuy Widget Name

The name of the Advocate widget that was used to refer the Friend that converted

Friend Purchase Total

Total amount that the Friend purchased

Friend Order ID

Order ID of referred Friend

Friend New Customer Status

Will let Friendbuy know if a referred Friend is a new customer. Displays as either "True" or "False"

Friendbuy Referral Friend Incentive Rejected

Definition: Referred Friend completes the referral conversion event, but does not pass all business rules/fraud checks, and incentive is not distributed

Attributes Included

Field Name

Description

Customer Email

Email address of the Friend that earned the incentive

Customer ID

Customer ID of the Friend that earned the incentive. This will be the same value as the User ID that Segment receives for this event.

Customer IP Address

IP address of the Friend that earned the incentive

Friendbuy Rejection Reasons

The reason or reasons that this Friend incentive was rejected. This could be due to one or more business rules not being passed, such as the Friend needing to be a new customer, or needing the purchase to be a certain minimum order amount.. This could be due to fraud detection, such as the referred Friend and the Advocate sharing the same IP address.

Friendbuy Campaign Name

The name of the referral campaign associated with this Friend incentive

Friendbuy Campaign ID

The ID of the referral campaign associated with this Friend incentive

Friendbuy Conversion Event

The type of event the Friend needs to perform, in order for the Advocate to earn a reward (e.g. purchase, email capture, sign up, or custom event) This is configured in Friendbuy, in the Advocate Reward tab of the referral campaign, under the setting How should the Reward be triggered?*

Advocate Email

The Customer ID of the Advocate who referred the Friend that earned this incentive

Advocate Customer ID

The IP address of the Advocate who referred the Friend that earned this incentive

Advocate IP Address

The name of the Advocate widget that was used to refer the Friend that converted

Friendbuy Reward Tier

The Reward Tier of the Advocate

Friendbuy A/B Test Variant ID

The ID of the variant used

Friendbuy Widget Name

The name of the Advocate widget that was used to refer the Friend that converted

Friendbuy Share Channel

The share channel used by the Advocate. An advocate can refer a friend through several different channels, including email, personal referral link (PURL), SMS, or social channels like Facebook, Messenger, Twitter or WhatsApp.

Friendbuy Referral Code

Referral code assigned to the Advocate. A referral code is a unique code generated by Friendbuy to associate an advocate to a referral campaign. A referral code can be used to look up the advocate’s name, the advocate’s customer ID and offer information for that particular referral campaign. Note: referral code is not a coupon code. It solely provides information to associate the advocate to a campaign.

Friend Purchase Total

Total amount the referred Friend purchased.

Friend Order ID

Order ID of the referred Friend.

Friend New Customer Status

Will let Friendbuy know if a referred Friend is a new customer. Will display as either "True" or "False"

Loyalty Events Friendbuy is Sending to Segment:

Friendbuy Loyalty Reward Earned from a Specific Earning Event

Note: The property Friendbuy Conversion Event is populated using the earning event name that is configured in your Friendbuy Loyalty Event configuration. Ex. Joined the Loyalty Program

Definition: The reward earned from completing any loyalty earning event that is configured for your Loyalty Program

Attributes Included

Field Name

Description

Customer Email

Email address of the loyalty member

Customer ID

Customer ID of the loyalty member. This will be the same value as the User ID that Segment receives for this event

Customer IP Address

IP address of the loyalty member

Friendbuy Conversion Event

The type of event the loyalty member needed to perform, in order to earn this reward (e.g. Joined Program, Purchase, Refer a Friend, Sign Up, or Custom Event). This is configured in Friendbuy, in the Earning Events tab of the Loyalty page.

Friend Email

The email address of the Friend who performed the referral conversion event

Friend Customer ID

The Customer ID of the Friend who performed the referral conversion event

Friend IP Address

The IP address of the Friend who performed the referral conversion event

Friendbuy Coupon Code

The coupon code provided to the loyalty member, in order to redeem this reward. A code used to receive a discount on a purchase, commonly set up as a percentage or dollar amount off an item.

Friendbuy Reward Value

The value of the reward earned by the loyalty member

Friendbuy Reward Currency

The currency of the reward earned by the loyalty member

Friendbuy Campaign Name

The name of the loyalty campaign associated with this loyalty reward

Friendbuy Campaign ID

The ID of the loyalty campaign associated with this loyalty reward

Order ID

The Order ID of the purchase, that the loyalty member made, that created this rewardable event

Purchase Total

The total amount spent by the loyalty member, on the purchase that created this rewardable event

Birthday

The birth date of the loyalty member

Below is a description of Earning Events that would be sent from Friendbuy to Segment

Event Name

Sub-attribute

Definition

Friendbuy Loyalty Reward Earned

>>>

Joined Program

Loyalty member joins the program, passes all associated earning event rules, and earns a reward

>>>

Purchase

Loyalty member makes a purchase, passes all associated earning event rules, and earns a reward

>>>

Refer a Friend

Loyalty member refers a friend, passes all associated earning event rules, and earns a reward

>>>

Sign Up

Loyalty member completes a designated sign up event, passes all associated earning event rules, and earns a reward

>>>

Custom Event

Loyalty member completes a designated custom event, passes all associated earning event rules, and earns a reward

Friendbuy Loyalty Credit Event

Definition: Segment receives this event when there is an update to a loyalty member’s credit. For example, when a Friendbuy Loyalty Credit is redeemed or expires.

Below is a description of the different Loyalty Credit Event Options

Friendbuy Loyalty Credit Redeemed

>>>

Redemption

Redeemed by customer through a Friendbuy widget

>>>

Manual

Manually added by CX rep

>>>

Reversal

Reversal of credits from our checkout widget

Friendbuy Loyalty Credit Expired

Attributes Included

Customer Email

Email address of the loyalty member

Customer ID

Customer ID of the loyalty member. This will be the same value as the User ID that Segment receives for this event

Friendbuy Credit Amount

The amount of the update to the loyalty member’s credit

Friendbuy Reward Currency

The currency of the update to the loyalty member’s credit

Friendbuy Customer Running Balance

The current balance of the loyalty member’s credit

Friendbuy Credit Event Type

The type of update to the loyalty member’s credit (e.g. loyalty credit redeemed, and loyalty credit expired)

Friendbuy Credit Issuer

Indicates which party issued the credit (e.g. Friendbuy, merchant, or third-party platform)

Friendbuy Credit Description

A description of the type of credit

Friendbuy Earning Event

The type of event the loyalty member performed, in order to earn this reward (e.g. Joined Program, Purchase, Refer a Friend, Sign Up, or Custom Event) This is configured in Friendbuy, in the Earning Events tab of the Loyalty page.

How did we do?

How to set up the Segment Web-Mode (Destination Actions) Integration

Contact