Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Friendbuy Legacy Source


Source Info
  • The Friendbuy Legacy Source is an Object Cloud source. This means that it sends information (traits) about a thing that exists and persists over time, such as a person or company, and which can be updated over time. Data from this source can only be exported directly to a warehouse, but it can then be used for further analysis. Learn more about cloud sources.
(warning)

This Source is supported in US data processing regions.

This Source is only supported in workspaces configured to process data in the US region. Workspaces configured with data processing regions outside of the US cannot connect to this source. For more information, see Regional Segment.

Friendbuy(link takes you to an external page) is a referral marketing platform that powers modern day word of mouth. Designed for growth marketers, Friendbuy allows companies to acquire new customers at scale through seamlessly integrated referral and influencer campaigns.

Adding Friendbuy as a source to Segment is a surefire way to elevate analysis of your referral program performance. Friendbuy will automatically send referral events and important metadata to Segment.

These events can be passed to your Segment destinations such as data warehouses and analytics tools. Joined with data from other marketing programs, you can start telling a unified story of each customer's journey and tailor your reporting to the KPIs that matter most.


Getting started

getting-started page anchor
  1. From your Sources page in Segment, click Add source.
  2. Choose Friendbuy.
  3. Click Connect.
  4. Give the Source a nickname. The nickname will be used to designate the Source in the Segment interface.
  5. Copy the Segment Write key for Friendbuy from the Overview page.
  6. Log in to your Friendbuy account, navigate to Settings > Configurations > Integrations and enter the Segment write key.
  7. Click Save.
Friendbuy integrations page showing Segment write key input and save button.
  1. From your Segment account, click into your Friendbuy Source and you'll be able to add other downstream Destinations where you want to see referral events.

Referral events such as shares, conversions, and reward evaluations will now be sent to Segment and any other destinations that you've enabled.


All referral events provided to Segment are in the context of specific customer (the advocate). The following table outlines the customer attributes that Friendbuy provides to Segment along with these events. Wherever possible, customer data is mapped to Segment's reserved properties as defined in the Segment Identify spec.

Trait nameDescription
idCustomer id assigned by the Merchant (Segment reserved property)
emailCustomer email address (Segment reserved property)
firstNameCustomer first name (Segment reserved property)
lastNameCustomer last name (Segment reserved property)
friendbuy_idInternal id of the customer record in Friendbuy
stripe_customer_idCustomer id of the advocate in Stripe
chargebee_customer_idCustomer id of the advocate in Chargebee

The following table lists the events that Friendbuy sends to Segment. These events will also appear in your Destinations, depending on which platforms you've enabled in Segment.

Event nameDescription
Referral SharedAn advocate shares with a friend through a Friendbuy referral widget (or REST API) to a channel such as email, Facebook, Messenger, Twitter, etc.
Referral ConvertedA referred friend signs up or orders through an advocate's referral
Referral Reward EvaluatedA conversion is evaluated for fraud checks and criteria to determine if an advocate reward should be approved or rejected

Referral shared

referral-shared page anchor

The following properties are included in the Referral Shared event payload.

Property nameProperty description
share_idFriendbuy internal id of the share
share_dateDate and time of the share
ip_addressIp_address of advocate at time of share
referral_codeFriendbuy internal identifier used to make attribution between friend order and advocate referral
messageAdvocate provided message to the friend
channelFriendbuy channel the share was issued from (email, facebook, facebook messenger, twitter)
recipientsArray of recipient email addresses for shares sent using email
variant_idFriendbuy internal id for the widget variant the share is associated with
variant_nameMerchant defined name for the widget variant
reward_typeMerchant defined Reward Type for the advocate reward
reward_amountMerchant defined Reward Amount for the advocate reward
newsletter_opt_inIndicates if an advocate opted in to receiving newsletter communications
reminder_opt_inIndicates if an advocate requested Friendbuy to send referred friend a reminder if they haven't converted within 3 days

The followig properties are included in the Referral Converted event payload. Wherever possible, referral conversion data is mapped to Segment's reserved properties as defined in the Segment Ecommerce spec.

Property nameProperty Description
conversion_idFriendbuy internal id of the conversion
conversion_dateDate and time of the conversion
order_idOrder id of the order (Segment reserved property)
totalTotal amount of the order (Segment reserved property)
couponCoupon code used at checkout (Segment reserved property)
productsArray of products in the order
products.skuSku for a single product (Segment reserved property)
products.pricePrice of a single product (Segment reserved property)
products.quantityQuantity of a single product (Segment reserved property)
purchase_dateDate and time of the order was placed
friend_new_customerIndicator from the merchant that the order is associated to a new customer
friend_emailEmail address of the purchaser
flagged_self_referralIndicates a self referral based fraud checks enabled by the merchant
fraud_same browserResult of Friendbuy's automatic comparison of referrals and orders made by the same browser and session
fraud_same_customer_idResult of Friendbuy's automatic comparison of referrals and purchases with the same email addresses
fraud_normal_sensitivity_email_addressResult of Friendbuy's automatic comparison of referrals and orders with a similar email address based on a basic algorithm that uses case normalization and strips domain
fraud_high_sensitivity_email_addressResult of Friendbuy's automatic comparison of referrals and orders with a similar email address based on a advanced algorithm with an adjustable threshold
fraud_same_ip_addressResult of Friendbuy's automatic comparison of referrals and orders made with the same IP addresses
fraud_same_ip_and_user_agentResult of Friendbuy's automatic comparison of referrals and orders with made with the same IP addresses and same user agent
share_idFriendbuy internal id of the share (NULL if channel is PURL)
referral_codeFriendbuy internal identifier used to make attribution between friend order and advocate referral
channelFriendbuy channel the share was issued from (email, facebook, facebook messenger, twitter)
variant_idFriendbuy internal id for the widget variant the share is associated with
variant_nameMerchant defined name for the widget variant
reward_typeMerchant defined Reward Type for the advocate reward
reward_amountMerchant defined Reward Amount for the advocate reward

Referral reward evaluated

referral-reward-evaluated page anchor

The following properties are included in the Referral Reward Evaluated event payload.

Property nameProperty description
idFriendbuy internal id of the reward
reward_dateDate and time the pending reward record was created
evaluated_dateDate and time the reward was evaluated and set to rejected or approved
statusStatus of the reward, either rejected or approved
rejected_reasonsReason(s) why a reward was rejected based on fraud and reward criteria evaluation
share_idFriendbuy internal id of the share
conversion_idFriendbuy internal id of the conversion
referral_codeFriendbuy internal identifier used to make attribution between friend order and advocate referral
channelFriendbuy channel the share was issued from (email, facebook, facebook messenger, twitter)
variant_idFriendbuy internal id for the widget variant the share is associated with
variant_nameMerchant defined name for the widget variant
reward_typeMerchant defined Reward Type for the advocate reward
reward_amountMerchant defined Reward Amount for the advocate reward

Prerequisites for source integration

prerequisites-for-source-integration page anchor

To take advantage of this source integration, you must be sending Friendbuy customer data either through their 'track','order' JavaScript integration(link takes you to an external page) or by POSTing shares and orders to the REST API(link takes you to an external page).


The Friendbuy Source works better when you also connect Friendbuy as a downstream destination within Segment. With the Friendbuy Destination, you can use Segment's snippets to load Friendbuy's JavaScript integration used to power loading widgets and tracking of customers, orders, and products. See the Friendbuy Destination documentation to get started.