# Get token Source: https://docs.cello.so/api-reference/authentication/get-token POST /token Obtain accessToken & refreshToken using your accessKeyId and secretAccessKey, or obtain a new accessToken using a refreshToken. # Send new event Source: https://docs.cello.so/api-reference/generic-events/send-event POST /events Report referral-related events such as signups, purchases, and refunds. # Introduction Source: https://docs.cello.so/api-reference/introduction Overview of Cello API for referral codes, authentication, and quickstart. ## Cello API The Cello API provides endpoints to: * Validate referral codes (`ucc`) * Retrieve active referral links * Send referral events for signups and purchases *** ## Base URLs Use the URL that matches your environment: | Environment | Base URL | | ----------- | ------------------------------- | | Sandbox | `https://api.sandbox.cello.so/` | | Production | `https://api.cello.so/` | *** ## Authentication Authenticate API requests using an `accessToken` in the Authorization header. Obtain your `accessKeyId` and `secretAccessKey` from the [Access Keys](https://portal.cello.so/integrations/accesskeys) page in your dashboard. # Fetch active link Source: https://docs.cello.so/api-reference/referral-codes/fetch-active-link GET /referral-codes/active-link/{productUserId} Retrieve an active UCC and invite link for a given user to support contextual sharing. # Fetch referral code info Source: https://docs.cello.so/api-reference/referral-codes/fetch-referral-code-info GET /referral-codes/{code} Validate a referral code (UCC) and discover associated user/campaign. # Mobile Signup Flow Source: https://docs.cello.so/attribution/for-mobile Learn how to set up mobile app referral attribution This guide explains how to add referral tracking capabilities to your existing attribution links without creating new ones. In this guide, we'll use Branch.io as an example. The implementation is similar if you use other attribution libraries like [AppsFlyer](https://www.appsflyer.com/), [Singular](https://www.singular.net/) or [Adjust](https://www.adjust.com/). Mobile attribution builds on top of [web attribution](/attribution/for-web) since users typically click referral links on web before downloading your app. The web setup captures the initial referral code that will later be attributed to the mobile app installation and signup. ## Overview The referral flow works as follows: * Existing user shares their unique referral link * New user clicks the link and is directed to your landing page * User then clicks on AppStore or Google Play app download * New user installs and opens the app * App receives referral data and attributes the installation * Backend records the referral during signup ## Basic Concept Instead of creating new links for each referrer, you'll append referral data to your existing Branch.io (or other attribution library) app install link: ```html Original: https://yourbrand.app.link/abc123 With Referral: https://yourbrand.app.link/abc123?referral_ucc=A1B2C ``` ## Data Persists Through Installation When a user clicks the referral link, Branch.io stores the referral data (including the referral\_ucc) in their servers and associates it with the user's device fingerprint. This allows the data to persist through: * App Store redirect * App download * First app launch ## Data Flow Sequence #### Link Click ```html https://yourbrand.app.link/abc123?referral_ucc=A1B2C ↓ Branch.io captures and stores: - referral_ucc: A1B2C - Device fingerprint - Click timestamp ``` #### App Installation ```html User installs app from store ↓ Branch SDK initializes on first launch ↓ Branch matches device to stored click data ↓ Delivers referral data to app ``` ## Accessing Referral Data in Your App #### iOS Implementation ```swift import Branch class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { Branch.getInstance().initSession(launchOptions: launchOptions) { (params, error) in // Check if the user came from a Branch link if let clickedBranchLink = params?["+clicked_branch_link"] as? Bool, clickedBranchLink { // Extract referral code if let referralCode = params?["referral_ucc"] as? String { print("Referral Code: \(referralCode)") // Store for use during signup UserDefaults.standard.set(referralCode, forKey: "pending_referral_code") } } } return true } } ``` #### Android Implementation ```kotlin class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Branch.getAutoInstance(this).initSession({ branchUniversalObject, linkProperties, error -> if (error == null) { // Check if user came from Branch link if (linkProperties?.has("+clicked_branch_link") == true) { // Get referral code val referralCode = linkProperties.get("referral_ucc") referralCode?.let { Log.d("Branch", "Referral Code: $it") // Store for signup getSharedPreferences("app_prefs", Context.MODE_PRIVATE) .edit() .putString("pending_referral_code", it) .apply() } } } }, this.intent.data, this) } } ``` #### React Native Implementation ```javascript import branch from 'react-native-branch'; function DeepLinkHandler() { useEffect(() => { // Handle deep link when app is already running const subscription = branch.subscribe({ onNewIntent: ({ error, params, uri }) => { if (error) { console.error('Branch link error:', error); return; } if (params['+clicked_branch_link']) { handleDeepLink(params); } } }); return () => subscription(); }, []); const handleDeepLink = async (params) => { const referralCode = params.referral_ucc; if (referralCode) { await AsyncStorage.setItem('pending_referral_code', referralCode); // Handle navigation or other logic based on deep link } }; return null; } ``` ## Using the Referral Data During Signup When the user completes signup, retrieve the stored referral code and include it in your signup API call: #### iOS Implementation ```swift // iOS Example class SignupViewController: UIViewController { func completeSignup(email: String, password: String) { // Get stored referral code let referralCode = UserDefaults.standard.string(forKey: "pending_referral_code") // Include in signup API call let signupData = [ "email": email, "password": password, "referral_code": referralCode ] api.signup(signupData) { result in if result.success { // Clear stored referral data after successful signup UserDefaults.standard.removeObject(forKey: "pending_referral_code") } } } } ``` #### Android Implementation ```kotlin // Android Example class SignupActivity : AppCompatActivity() { private fun completeSignup(email: String, password: String) { val prefs = getSharedPreferences("app_prefs", Context.MODE_PRIVATE) val referralCode = prefs.getString("pending_referral_code", null) val signupData = HashMap().apply { put("email", email) put("password", password) referralCode?.let { put("referral_code", it) } } api.signup(signupData) { success -> if (success) { // Clear stored referral data prefs.edit().remove("pending_referral_code").apply() } } } } ``` #### React Native Implementation ```javascript function SignupScreen({ navigation }) { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const handleSignup = async () => { try { const referralCode = await AsyncStorage.getItem('pending_referral_code'); const response = await api.signup({ email, password, referral_code: referralCode }); if (response.success) { await AsyncStorage.removeItem('pending_referral_code'); navigation.navigate('Home'); } } catch (error) { console.error('Signup error:', error); } }; return ( // Your signup form JSX ); } ``` # Web Signup Flow Source: https://docs.cello.so/attribution/for-web Learn how to capture referral codes on your website When users click referral links, they land on your website first. Capture the referral code (`ucc`) on this landing page to properly attribute future conversions. Follow these steps to set up referral code capture: ## Step 1: Set up your landing page Create a landing page for referral traffic. Choose one approach: * Dedicated referral landing page * Home page with Cello New User Banner See the [landing page optimization guide](/guides/user-experience/optimizing-landing-pages) for best practices. ## Step 2: Install attribution script The attribution script detects the `ucc` query parameter and stores it as a first-party cookie for later attribution of conversion events. Install the Cello attribution script - [Attribution JS](/sdk/client-side/attribution-js-introduction) - using one of these methods: The attribution script also enables you to: * Fetch referrer names for [landing page personalization](/guides/user-experience/personalizing-referrals) * Get campaign parameters to [display discounts](/guides/user-experience/new-user-discounts) * Attach `ucc` to signup forms See the [Attribution JS reference](/sdk/client-side/attribution-js-introduction) for complete details. ## Step 3: Verify installation Verify that the `ucc` is available on your signup page: 1. Test your website with these query parameters: ```html https://yourwebsite.com/?productId=test&ucc=test ``` 2. Verify these values are saved as cookies: `cello-product-id` and `cello-referral` 3. On your signup page, test `ucc` access from the browser console: ```javascript window.CelloAttribution('getUcc') ``` Expected response: ```javascript Promise {: 'test'} ``` If this test passes, the script is installed correctly. **Using referral codes at signup** Use `getUcc()` during user signup to retrieve the referral code, then pass it in the [signup event](/attribution/tracking-signups) to Cello. For complex flows, save the `ucc` with your user record so it's available when sending [signup events](/attribution/tracking-signups). # HubSpot Forms Source: https://docs.cello.so/attribution/hubspot Integrate the Cello attribution library with HubSpot forms to track referral conversions ## Overview This guide shows you how to capture referral codes (`ucc`) from visitors and automatically populate them into HubSpot forms when users submit lead generation or contact forms. This enables you to track which referrals lead to qualified leads and conversions. ## Considerations when creating the `ucc` property in HubSpot When creating a custom property in HubSpot, it is important that the internal name of the property is `ucc`. This sets up the property in either company or deal. The one to choose depends on your specific sales process and the corresponding HubSpot setup. These instructions describe creating the `ucc` property in the object type **Company**, group **Company information**. Often, it can make sense to create the `ucc` property in the **Deal** object type. A custom property can be created following the instructions of HubSpot [here](https://knowledge.hubspot.com/properties/create-and-edit-properties). ## Step 1: Create a form with a hidden `ucc` field in HubSpot To properly capture referral data, you need to add a `ucc` field to your HubSpot form: 1. Create a customized form in HubSpot by following the instructions [here](https://knowledge.hubspot.com/forms/create-forms). 2. In your form, create a hidden field called `ucc`. This field automatically picks up the `ucc` from the link and feeds it into the create `ucc` property in HubSpot. The result should look like this: Cello Attribution Capture UCC HubSpot deal with Hubspot Form ## Step 2: Include the Cello Attribution Library Add the Cello attribution script to your website's `` section or before the closing `` tag: ```html ``` ## Step 3: Add the Attribution Command Queue Since HubSpot forms are loaded dynamically, include this script to handle race conditions between your code and the Cello library loading: ```html ``` **Important:** This script must be added before any calls to `window.CelloAttribution()` to prevent race conditions. ## Step 3: Integrate with HubSpot Form Creation When creating your HubSpot form, use the `onFormReady` callback to populate the referral code. Replace the placeholder values with your actual HubSpot configuration: ```javascript hbspt.forms.create({ region: "AAA", // Replace with your HubSpot region (e.g., "na1") portalId: "BBB", // Replace with your HubSpot Portal ID formId: "CCC", // Replace with your HubSpot Form ID onFormReady(form, ctx) { window.CelloAttribution('getUcc').then((celloUcc) => { console.log('Incoming Referral:', celloUcc); // Find all ucc fields and populate them document.querySelectorAll('input[name="ucc"]').forEach( el => { el.value = celloUcc; } ); }).catch((error) => { console.log('No referral code found or error occurred:', error); }); } }); ``` ## Test Your Implementation ### 1. Test Referral Code Capture 1. Visit your page with a referral parameter: ``` https://yoursite.com/landing-page?ucc=test123&productId=yourproduct ``` 2. Open browser developer tools and check: ```javascript // Test if ucc is available window.CelloAttribution('getUcc') ``` Expected response: `Promise {: 'test123'}` ### 2. Test Form Integration 1. Open the page with the created form 2. Add `?ucc=demo12345687` to the link and reload the page. After the initialization of the config, this will be added automatically to the link by Cello 3. Enter some test data into the form. The result should look similar to the following Cello Attribution Capture UCC HubSpot deal with Hubspot Form 4. Submit your HubSpot form 5. HubSpot should now have created a new contact and a new company. In the new company, you should find the `ucc` property filled with the entered value `demo12345687` 6. The test was successful. You can now move ahead to the section on providing the required data to Cello. Cello Attribution Capture UCC HubSpot deal with Hubspot Form ## Troubleshooting ### Common Issues and Solutions **1. "getReferral is not supported" error** * Make sure you're using `getUcc()` instead of `getReferral()` * This is the correct method for the latest attribution library **2. Form fields not getting populated** * Verify your form has a field with `name="ucc"` * Check that the field selector in `querySelectorAll()` matches your form * Ensure the `onFormReady` callback is executing **3. Referral code is undefined** * Test with a URL containing the `ucc` parameter: `?ucc=test123` * Check browser cookies for `cello-referral` * Verify the attribution script loaded properly **4. Script loading order issues** * Always include the command queue script before any attribution calls * Use the `async` attribute on the attribution library script ## HubSpot Scheduling Pages Integration You can also use the Cello attribution library with HubSpot scheduling pages to capture referral codes when prospects book meetings or demos. This is particularly useful for sales-led referral programs where referrals often lead to booked consultations or product demos. ### How it works HubSpot scheduling pages include built-in forms that collect contact information before allowing visitors to book meetings. You can integrate Cello attribution with these forms using the same approach as regular HubSpot forms. ### Setup Steps The integration process for scheduling pages is identical to regular forms: 1. Include the Cello Attribution Library (Steps 2-3 above remain the same) 2. Set up the `ucc` property in your HubSpot contacts/companies 3. Add a hidden `ucc` field to your scheduling page form 4. Configure the scheduling page to populate the referral code ### Adding `ucc` Field to Scheduling Pages 1. Create or edit a scheduling page ([HubSpot's scheduling page guide](https://knowledge.hubspot.com/meetings/create-scheduling-pages)) 2. In the "Form" section, add the created `ucc` parameter to the form. You can't hide this field on a scheduling page. This field automatically picks up the `ucc` parameter from the link and feeds it into the created `ucc` property in HubSpot. The result should look like this: Cello Attribution Capture UCC HubSpot deal with Hubspot Form ### JavaScript Integration for Scheduling Pages Since scheduling pages are embedded HubSpot components, you'll add the same integration code to the page where your scheduling page is embedded: ```html ``` ### Testing Your Scheduling Page Integration 1. Visit your scheduling page with a referral parameter: ``` https://yoursite.com/book-demo?ucc=demo12345687 ``` 2. Start the booking process and fill out the form 3. Complete the booking 4. Check the created contact in HubSpot - the `ucc` field should contain `demo12345687` ### Key Differences from Regular Forms * **Timing**: Scheduling pages load asynchronously, so we use MutationObserver to detect when the form is ready * **Form structure**: Scheduling page forms are embedded HubSpot components with specific styling * **Optional field**: Make the `ucc` field optional since not all meeting bookings will come from referrals * **Meeting context**: The referral code will be associated with the contact and any resulting deals from the meeting **For sales-led businesses**: Integrating referral tracking with scheduling pages is crucial for tracking which referrals lead to qualified sales conversations and ultimately closed deals. # Introduction Source: https://docs.cello.so/attribution/introduction Learn how to implement referral attribution to track signups and purchases back to their original referrers Referral conversion enables you to track and attribute user signups and purchases back to their original referrers and reward them for conversions. Cello helps you capture referral codes `ucc` from landing pages and maintains attribution throughout the entire user journey, from initial visit to final purchase. # How it works The referral conversion process follows a four-step attribution flow: Cello Referral conversion process four-step attribution flow overview diagram 1. **Referral Link Sharing** - Referrers share links containing unique codes (`ucc` parameters) 2. **Landing Page Capture** - Your website captures and stores referral codes `ucc` as first-party cookies 3. **Signup Tracking** - New user registrations are linked to their referrer 4. **Purchase Tracking** - Revenue events are attributed back to the original referrers Accurate referral conversion tracking depends on properly passing the referral code `ucc` through each step of the referral journey. **Attribution based on organization level** If the buying persona is the organization and you want to attribute purchases on the organization level always provide the **ID of the organization** in the parameter `payload.newUserId` # Getting started with referral conversion tracking Learn how to track conversions with Cello in the following resources: Capture referral code during web signup flow Capture referral code during mobile signup A full guide on tracking signup events A full guide on tracking purchase events or choose a step-by-step quickstart guide for your integration scenario: # Track Purchases Source: https://docs.cello.so/attribution/tracking-purchase Learn how to track purchase events with Cello To complete the conversion tracking and reward referrers, you will need to send Cello purchase events. A purchase event is sent when a user pays for a subscription or a product. # Prerequisites Before you can send Cello purchase events, make sure you are already: * [Capturing referral code on your landing page](https://docs.cello.so/attribution/for-web) * [Tracking signups](https://docs.cello.so/attribution/tracking-signups) **Attribution based on organization level** If the buying persona is the organization and you want to attribute purchases at the organization level, always provide the **ID of the organization** in the parameter `payload.newUserId` # Track purchase events with Webhooks Depending on which payment gateway you’re using, we offer webhooks for the following: } href="/integrations/webhooks/stripe-webhook" > Send events using Stripe Webhook } href="/integrations/webhooks/chargebee-webhook" > Send events using Chargebee Webhook # Track purchase events with Cello API If you’re not using any of the gateways listed above, you can also send purchase events using Cello API `POST /events` API endpoint. Here are the 2 events you will need to send: ## `invoice-paid` This event is sent every time a transaction based on the provided subscription is successful or a new user buys a one-time plan, a license or something similar. ```bash POST https://api.cello.so/events { "eventName": "ReferralUpdated", "payload": { "ucc": "cello-ucc", "newUserId": "new-user-product-user-id", // or 'new-user-organization-id' "price": 100, "currency": "EUR" }, "context": { "newUser": { "id": "new-user-product-user-id", "email": "new-user@gmail.com", "organizationId": "new-user-organization-id" }, "event": { "trigger": "invoice-paid", "timestamp": "2022-10-05 14:14:34" }, "subscription": { "invoiceId": "34hsjdh34jfksd", "interval": "one-time", "productKey": "Pro License" } } } ``` Here are the properties you can include when sending a `invoice-paid` event: | Property | Required | Description | | ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ucc` | yes | A referral code (`ucc`) identifying the referrer. You can retrieve this code using [attribution script](/sdk/client-side/attribution-js-introduction) `getUcc ()` method, you have installed as a prerequisite to this guide | | `newUserId` | yes | A unique ID in your system, identifying the **new user** who just signed up. Can also be **organization ID**, if your referrers can refer organizations and you want to **reward them for organization account expansion** | | `price` | yes | Amount on the invoice | | `currency` | yes | Currency of the amount | | `newUser.id` | yes | A unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (`productUserId`) you will use to boot the [Referral component](/referral-component/introduction), when this user logs into your app | | `newUser.email` | yes | New user email | | `newUser.organizationId` | no | Organization ID. Add this field if your referrers can **refer an organization** and you want to reward them for **organization account expansion** | | `event.trigger` | yes | `invoice-paid` | | `event.timestamp` | yes | Event timestamp in **ISO8601 format** | | `subscription.invoiceId` | yes | ID of the invoice that was paid or refunded | | `subscription.interval` | yes | Interval of the payment. Available options: `one-time`, `monthly`, `quarterly`, `yearly`, `biennial`, `triennial`, `lifetime`, `bi-weekly`, `semi-annual` | | `subscription.productKey` | yes | Name of the product or plan purchased | Full API referrence for `POST /events` API endpoint can be found [here](/api-reference/generic-events/send-event). ## `charge-refunded` This event is sent if the payment of the new user was refunded. ```bash POST https://api.cello.so/events { "eventName": "ReferralUpdated", "payload": { "ucc": "cello-ucc", "newUserId": "new-user-product-user-id", // or 'new-user-organization-id' "price": 1000, "currency": "EUR" }, "context": { "newUser": { "id": "new-user-product-user-id", "email": "new-user@gmail.com", "organizationId": "new-user-organization-id" }, "event": { "trigger": "charge-refunded", "timestamp": "2022-10-05 14:14:34" }, "subscription": { "invoiceId": "34hsjdh34jfksd" } } } ``` Here are the properties you can include when sending a `charge-refunded` event: | Property | Required | Description | | ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ucc` | yes | A referral code (`ucc`) identifying the referrer. You can retrieve this code using [attribution script](/sdk/client-side/attribution-js-introduction) `getUcc ()` method, you have installed as a prerequisite to this guide | | `newUserId` | yes | A unique ID in your system, identifying the **new user** who just signed up. Can also be **organization ID**, if your referrers can refer organizations and you want to **reward them for organization account expansion** | | `price` | yes | Amount refunded | | `currency` | yes | Currency of the amount | | `newUser.id` | yes | A unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (`productUserId`) you will use to boot the [Referral component](/referral-component/introduction), when this user logs into your app | | `newUser.email` | yes | New user email | | `newUser.organizationId` | no | Organization ID. Add this field if your referrers can **refer an organization** and you want to reward them for **organization account expansion** | | `event.trigger` | yes | `charge-refunded` | | `event.timestamp` | yes | Event timestamp in **ISO8601 format** | | `subscription.invoiceId` | yes | ID of the invoice that was paid or refunded | Full API referrence for `POST /events` API endpoint can be found [here](/api-reference/generic-events/send-event). # Track Signups Source: https://docs.cello.so/attribution/tracking-signups Learn how to track signup events with Cello When a referee signs up or otherwise shows interest in your product - like booking or attending a demo - you need to send this event to Cello. This allows Cello to attribute this conversion to the referrer, so they can be rewarded if a purchase happens later. You can also choose to reward users for actions like signups or demos by configuring this in your [Campaign settings](/guides/campaigns/setting-up-campaigns). # Prerequisites Before you can send Cello signup events, you need to make sure that you are able to **capture the referral code** `ucc`**during signup or demo booking**: * [When users sign up in your web app](/attribution/for-web) * [When users sign up in your mobile app](/attribution/for-mobile) * When users book a demo using [Hubspot](/attribution/hubspot) or [Typeform](/attribution/typeform) forms or scheduling **Attribution based on organization level** If the buying persona is the organization and you want to attribute purchases at the organization level, always provide the **ID of the organization** in the parameter `payload.newUserId` # Tracking signup events For a SaaS application signup flow, you will track a signup event or equivalent. Depending on how you create a new user and which payment gateway you are using, you can choose from the following options to send Cello signup events. ## Option 1: Using Stripe - I create Stripe Customer at Signup Use this option if your payment gateway is Stripe and you **create a Stripe customer at signup** To track a signup, you can pass the following `metadata` to Stripe [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata) on customer creation. * `cello_ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](https://docs.cello.so/sdk/client-side/attribution-lib) `getUcc ()` method, you have installed as a prerequisite to this guide. * `new_user_id` - a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (`productUserId`) you will use to boot the [Referral component](https://docs.cello.so/sdk/client-side/cello-js), when this user logs into your app * `new_user_organization_id` (optional) - add this, if your referrers can refer an organization rather then a single user and you want to reward based on that. Modify customer fields you send upon customer creation. Here is an example for a NodeJS App that does that: ```javascript const stripe = require('stripe')('sk_test_51KiCYYCSMQAUBF...'); const customer = await stripe.customers.create({ description: 'New Stripe Customer', metadata: { cello_ucc: "hdz7afhs7", new_user_id: "xcsdad", // product user id of the new user new_user_organization_id: "123456" // organization id of the new user } }); ``` Now that the customer is created in Stripe with Cello metadata, a `customer.created` event will be sent with [Stripe Webhook](/integrations/webhooks/stripe-webhook), which we will count as a signup event in Cello. ## Option 2: Using Chargebee - I create Chargebee customer at signup Use this option if your payment gateway is Chargebee and you **create a Chargebee customer at signup** You can pass the following metadata to Chargebee on customer creation. You can also choose to use **Chargebee custom fields (CF\_)** to add referral data to the event. Learn more about custom fields in the [**Chargebee documentation**](https://www.chargebee.com/docs/billing/2.0/site-configuration/custom_fields) * `cello_ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](/sdk/client-side/attribution-js-introduction) `getUcc ()` method, you have installed as a prerequisite to this guide. * `new_user_id` - a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (`productUserId`) you will use to boot the [Referral component](/referral-component/introduction), when this user logs into your app * `new_user_organization_id` (optional) - add organization ID, if your referrers can **refer an organization** and you want to reward them for **organization account expansion**. Modify customer fields you send upon customer creation. Here is an example for a NodeJS App that does that: ```javascript var chargebee = require("chargebee"); chargebee.configure({site : "getmoonly-v3-test", api_key : "test_jqXGuQLkBHUSR2PM0qgUV21W1VqSFJIU"}); chargebee.customer.create({ first_name : "Bob", last_name : "Bobsky", //... // other customer fields //... meta_data: { cello_ucc: "hdz7afhs7", new_user_id: "xcsdad", // product user id of the new user new_user_organization_id: "123456" // organization id of the new user } // .. // }) ``` Now that the customer is created in Chargebee with Cello metadata, a `Customer Created` event will be sent with [Chargebee Webhook](/integrations/webhooks/chargebee-webhook), which we will count as a signup event in Cello. ## Option 3: Using Cello API POST /events API endpoint Use this option for all other use cases. For example: * You use Stripe or Chargebee, but customer is created in the payment gateway **at purchase**. * Your payment gateway is Paddle, Recurly or other, including in-house built payment gateways Send a `new-signup` event to the Cello API with the following values in the payload: * `ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](/sdk/client-side/attribution-js-introduction) `getUcc ()` method, you have installed as a prerequisite to this guide. * `newUserId` - a unique ID in your system, identifying the **new user** who just signed up. Can also be **organization ID**, if your referrers can refer organizations and you want to **reward them for organization account expansion**. * `user.id` - unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (`productUserId`) you will use to boot the [Referral component](/referral-component/introduction), when this user logs into your app * `user.email` - new user email * `user.name` - new user name * `user.organizationId`(optional) - add organization ID, if your referrers can **refer an organization** and you want to reward them for **organization account expansion**. Here is an example of the `POST /events` call to send a `new-signup` event: ```bash POST https://api.cello.so/events { "eventName": "ReferralUpdated", "payload": { "ucc": "cello-ucc", "newUserId": "new-user-product-user-id", // or "new-user-organization-id" "price": 0, "currency": "" }, "context": { "user": { "id": "new-user-product-user-id", "email": "new_user@gmail.com", "name": "new-user-name", "organizationId": "new-user-organization-id" }, "event": { "trigger": "new-signup", "timestamp": "2022-10-05 14:14:34" } } } ``` # Tracking "demo attended" event Use this option if your product follows a sales-led model where successful conversions are driven by users attending a demo call. Send a `demo-attended` event to the Cello API with the following values in the payload: * `ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](/sdk/client-side/attribution-js-introduction) `getUcc ()` method, you have installed as a prerequisite to this guide. * `newUserId` - a unique ID in your system, identifying the **new user** who just signed up. Can also be **organization ID**, if your referrers can refer organizations and you want to **reward them for organization account expansion**. * `user.id` - unique ID of the new user (not the organization, if you are rewarding on organization level). This should be the same ID (`productUserId`) you will use to boot the [Referral component](/referral-component/introduction), when this user logs into your app * `user.email` - new user email * `user.name` - new user name * `user.organizationId`(optional) - add organization ID, if your referrers can **refer an organization** and you want to reward them for **organization account expansion**. Here is an example of the `POST /events` call to send a `new-signup` event: ```bash POST https://api.cello.so/events { "eventName": "ReferralUpdated", "payload": { "ucc": "cello-ucc", "newUserId": "product-user-id" // or 'new-user-organization-id' }, "context": { "newUser": { "id": "new-user-product-user-id", "email": "new-user@gmail.com", "name": "new-user-name", "organizationId": "new-user-organization-id" }, "event": { "trigger": "demo-call-attended", "timestamp": "2022-10-05 14:14:34" } } } ``` # Typeform Forms Source: https://docs.cello.so/attribution/typeform Ingest Cello's referral code (ucc) into HubSpot using Typeform forms This page guides you through the required steps to ingest **Cello's referral code (`ucc`) into HubSpot using Typeform forms**. ## Create a form with a hidden ucc field in Typeform Create a new form in Typeform On the initial question in your form, go to **Hidden Fields** via **Logic → Hidden Fields** on the panel on the right Add a new field named `ucc` and click Save Cello Capture UCC Typeform hidden fields setup ## Setup of Sync from Typeform to HubSpot Navigate to the **Connect** Section in the header of Typeform and connect HubSpot After the authorization is done, you can select the HubSpot object to which you want to sync the `ucc`. In the below example the `ucc` is synced to a deal in HubSpot. You can also sync the `ucc` to multiple objects at the same time: contact, company and deals. If you sync the `ucc` to a deal, you have to specify in which pipeline at which stage the deals should be created After finalizing the setup of the integration, save the settings and run a short test run Cello Capture UCC Typeform HubSpot integration setup ## Test the created Typeform and HubSpot integration Open the created Typeform Add either `?ucc=12341234` or `&ucc=12341234` to the link depending on if there is already a "?" present in the link Cello Capture UCC Typeform URL with UCC parameter Submit the Typeform Open HubSpot and check that the contact, company or deal was created and the `ucc` was synced correctly Cello Capture UCC Typeform HubSpot deal with UCC ## Further hints You can also embed a Calendly in Typeform to allow customers to schedule e.g. a demo from the Typeform. Documentation can be found [here](https://www.typeform.com/connect/calendly/). # Chargebee Webhook Quickstart Source: https://docs.cello.so/attribution/use-cases/chargebee Learn how to integrate Cello if you are using Chargebee JS to create Chargebee customer and Chargebee Webhook to send Cello conversion events. This guide is **optimized for the typical freemium scenario with Chargebee**. Use this guide if you: * Create Chargebee customer on signup * Use Chargebee webhook to send Cello referral conversion events # Step 1: Integrate the Referral Component First, integrate Cello Referral Component into your web app to provide referrers with full referral experience. Referral Component is integrated using one of our SDKs. For your web app, use Cello JS - our client-side SDK. You can install it by: 1. Adding a script tag to the `` of your application 2. Generating a JWT token for user authentication 3. Booting the component with the provided token and user details Follow this installation guide: You can also integrate Referral Component into your mobile applications: # Step 2: Capture referral codes on landing page Next, you will need to add [Cello attribution script](https://docs.cello.so/sdk/client-side/attribution-lib) to your referral landing page: 1. Setup a [landing page](https://docs.cello.so/docs/optimize-landing) for your referral links to redirect to 2. Install attribution script. Choose one of the following installation options best suited for your setup: 3. Verify the installation To verify, follow these steps: 1. Add `?productId=test` and `?ucc=test` to your website URL ```html https://yourwebsite.com/?productId=test&ucc=test ``` 2. Make sure that these values are saved in the cookies as `cello-product-id` and `cello-referral` 3. Navigate to your signup page and try to access the ucc using the `getUcc()` method from the browser console ```javascript window.CelloAttribution('getUcc') ``` This method should return a promise with value `test` ```javascript Promise {: 'test'} ``` **If this check passes, the script is installed correctly.** For capturing referral code in your mobile signup flow, follow this guide: # Step 3: Add Cello metadata or custom fields on Chargebee customer creation To track a signup, you can pass the following metadata to Chargebee on customer creation. You can also choose to use **Chargebee custom fields (CF\_)** to add referral data to the event. Learn more about custom fields in the [**Chargebee documentation**](https://www.chargebee.com/docs/billing/2.0/site-configuration/custom_fields) * `cello_ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](https://docs.cello.so/sdk/client-side/attribution-lib) `getUcc ()` method, you have installed as a prerequisite to this guide. * `new_user_id` - a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (`productUserId`) you will use to boot the [Referral component](https://docs.cello.so/sdk/client-side/cello-js), when this user logs into your app * `new_user_organization_id` (optional) - add this, if your referrers can refer an organization rather then a single user and you want to reward based on that. Modify customer data you send upon customer creation. Here is an example for a NodeJS App that does that with `meta_data`: ```javascript var chargebee = require("chargebee"); chargebee.configure({site : "getmoonly-v3-test", api_key : "test_jqXGuQLkBHUSR2PM0qgUV21W1VqSFJIU"}); chargebee.customer.create({ first_name : "Bob", last_name : "Bobsky", //... // other customer fields //... meta_data: { cello_ucc: "hdz7afhs7", new_user_id: "xcsdad", // product user id of the new user new_user_organization_id: "123456" } // .. // }) ``` Now that the customer is created in Chargebee with Cello metadata, a `Customer Created` event will be sent with [Chargebee Webhook](https://docs.cello.so/integrations/webhooks/chargebee-webhook), which we will count as a signup event in Cello. # Step 4: Connect Chargebee Webhook to send signup and purchase events To send Cello signup and purchase events, you will need to connect Chargebee Webhook to Cello. Follow this guide to connect the webhook: } href="/integrations/webhooks/chargebee-webhook" > Send events using Chargebee Webhook **Congratulations!** You are done and now able to try out the full Cello referral experience 🎉 # Stripe Webhook Quickstart Source: https://docs.cello.so/attribution/use-cases/stripe Learn how to integrate Cello if you are using Stripe JS to create Stripe customer and Stripe Webhook to send Cello conversion events. This guide is **optimized for the typical freemium scenario with Stripe**. Use this guide if you: * Create Stripe customer on signup * Use Stripe webhook to send Cello referral conversion events # Step 1: Integrate the Referral Component First, integrate Cello Referral Component into your web app to provide referrers with full referral experience. Referral Component is integrated using one of our SDKs. For your web app, use Cello JS - our client-side SDK. You can install it by: 1. Adding a script tag to the `` of your application 2. Generating a JWT token for user authentication 3. Booting the component with the provided token and user details Follow this installation guide: You can also integrate Referral Component into your mobile applications: # Step 2: Capture referral codes on landing page Next, you will need to add [Cello attribution script](https://docs.cello.so/sdk/client-side/attribution-lib) to your referral landing page: 1. Setup a [landing page](https://docs.cello.so/docs/optimize-landing) for your referral links to redirect to 2. Install attribution script. Choose one of the following installation options best suited for your setup: 3. Verify the installation To verify, follow these steps: 1. Add `?productId=test` and `?ucc=test` to your website URL ```html https://yourwebsite.com/?productId=test&ucc=test ``` 2. Make sure that these values are saved in the cookies as `cello-product-id` and `cello-referral` 3. Navigate to your signup page and try to access the ucc using the `getUcc()` method from the browser console ```javascript window.CelloAttribution('getUcc') ``` This method should return a promise with value `test` ```javascript Promise {: 'test'} ``` **If this check passes, the script is installed correctly.** For capturing referral code in your mobile signup flow, follow this guide: # Step 3: Add Cello metadata on Stripe customer creation To track a signup, you can pass the following `metadata` to Stripe [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata) on customer creation. * `cello_ucc` - ucc, a referral code identifying the referrer. You can retrieve this code using [attribution script](https://docs.cello.so/sdk/client-side/attribution-lib) `getUcc ()` method, you have installed as a prerequisite to this guide. * `new_user_id` - a unique user ID in your system, identifying the new user who just signed up. This should be the same ID (`productUserId`) you will use to boot the [Referral component](https://docs.cello.so/sdk/client-side/cello-js), when this user logs into your app * `new_user_organization_id` (optional) - add this, if your referrers can refer an organization rather then a single user and you want to reward based on that. Modify customer fields you send upon customer creation. Here is an example for a NodeJS App that does that: ```javascript const stripe = require('stripe')('sk_test_51KiCYYCSMQAUBF...'); const customer = await stripe.customers.create({ description: 'New Stripe Customer', metadata: { cello_ucc: "hdz7afhs7", new_user_id: "xcsdad", // product user id of the new user new_user_organization_id: "123456" // organization id of the new user } }); ``` Now that the customer is created in Stripe with Cello metadata, a `customer.created` event will be sent with [Stripe Webhook](https://docs.cello.so/integrations/webhooks/stripe-webhook), which we will count as a signup event in Cello. You will connect Stripe Webhook in the next step. # Step 4: Connect Stripe Webhook to send signup and purchase events To send Cello signup and purchase events, you will need to connect Stripe Webhook to Cello. Follow this guide to connect the webhook: } href="https://docs.cello.so/integrations/webhooks/stripe-webhook" > Send events using Stripe Webhook **Congratulations!** You are done and now able to try out the full Cello referral experience 🎉 # HubSpot Reports Source: https://docs.cello.so/guides/attribution/hubspot-reports This guide will walk you through exporting attribution and event reports from HubSpot This guide will walk you through exporting attribution and event reports from HubSpot. You'll create a view in HubSpot and export it as a .csv file. However, keep in mind that steps may vary based on your specific HubSpot setup and its objects and properties. For more detailed instructions, please refer to the [HubSpot documentation](https://knowledge.hubspot.com/) and specifically [Create and export a view](https://knowledge.hubspot.com/crm-setup/create-customize-and-manage-your-saved-views). ## Creating and Exporting a View 1. Navigate to your deals pipeline in HubSpot and create a new view. Create new view in HubSpot deals pipeline 2. In the view you just created, click **Apply Filter** to show only deals where Cello's referral code (`ucc`) is known. Apply filter for Cello referral code (ucc) 3. Select the required columns for the **Attribution & Event report**. Make sure that the exported records can be linked with the records in the **Purchases report** via a common field, either the `Referred Account ID` or Cello's referral code (`ucc`). The Attribution & Event report should, at the very least, contain the following fields: * `Referred Account ID` (which equates to the `Internal Account ID`) * `Cello's referral code (`ucc`)` * `Custom Event` * `Create Date` * `Last Modification Date` Select required columns for Attribution & Event report 4. Save the view. 5. Finally, click **Export** to export the view to a .csv file. Export view to CSV file With these steps, you should be able to successfully create and export your custom HubSpot reports for use with Cello. # Manual Attribution Source: https://docs.cello.so/guides/attribution/manual-attribution At Cello, we understand that there may be instances where automated referral attribution doesn't work as expected At Cello, we understand that there may be instances where automated referral attribution doesn't work as expected. In such cases, our platform provides the flexibility to manually attribute referrals to ensure that your users receive the proper rewards for their efforts. This guide will walk you through the steps of manually attributing referrals within the Cello platform. ## When to Manually Attribute Referrals 1. **Technical Glitches**: If you encounter technical issues or glitches that prevent automated attribution, manual attribution allows you to override these challenges. 2. **User Disputes**: In cases where users claim they referred someone but the system did not capture it correctly, manual attribution provides a resolution path. 3. **Custom Scenarios**: For unique situations or custom referral setups, manual attribution offers a tailored solution. ## How to Manually Attribute Referrals 1. Customer gets `cello_ucc` of referrer from the Cello Portal and retrieves `cello_ucc` of referrer and `new_user_id` (former product\_user\_id) new user from their own system. If data cannot be found, please reach out to Cello. 2. Customer adds `cello_ucc` of referrer and `new_user_id` (former product\_user\_id) ID of new user to the existing Stripe customer of new user in Stripe. 3. Cello receives a `customer.updated` event from Stripe for the customer. 4. If there were already paid invoices, please resend the past `invoice.paid` events of the new user to Cello. This can be done by: 1. Go to the transaction 2. Select the `invoice.paid` event in the feed at the bottom 3. Click **View event details** 4. Check webhook attempts and resend the event Step 4a,b: Open invoice.paid event Step 4c: View event details Step 4d: Resend past invoice.paid events 1. Customer gets `cello_ucc` of referrer from the Cello Portal and retrieves `cello_ucc` of referrer and `new_user_id` (former product\_user\_id) ID of new user from their own system. If data cannot be found, please reach out to Cello. 2. In Chargebee, you add `cello_ucc` of referrer and `new_user_id` (former product\_user\_id) of new user to the metadata of the new user's Chargebee customer. 3. We automatically receive a `customer_changed` event via the webhook. 4. If there were already payments from the new user, you need to resend the past `payment_succeeded` events via the webhook. You can trigger this inside Chargebee manually. 1. Customer gets `cello_ucc` of referrer from the Cello Portal and retrieves `new_user_id` ID of new user from their own system. If data cannot be found, please reach out to Cello. 2. Customer resends the signup event manually via the Cello API. Fields are filled as in the automated Cello API events. The detailed documentation can be found in the [Example Requests](/api-reference/generic-events/send-event). 3. To add the parameters to the metadata in your payment gateway and resend past transactions, follow step 2-4 from the tab applicable for your payment gateway. In case Cello API events can not be resend via API, manual reports can be provided to Cello. The reports need to contain equivalent information as the specific event. Exemplary reports can be found in [Sample Data and Reports](/guides/integration/report-automation#sample-data-and-reports) 1. Customer gets `cello_ucc` of referrer from the Cello Portal and retrieves `new_user_id` ID of new user from their own system. If data cannot be found, please reach out to Cello. 2. Customer resends the signup event manually via the Cello API. Fields are filled as in the automated Cello API events. The detailed documentation can be found in the [Example Requests](/api-reference/generic-events/send-event). 3. Customer resends past transaction events manually via the Cello API. Fields are filled as in the automated Cello API events. The detailed documentation can be found in the [Example Requests](/api-reference/generic-events/send-event). In case Cello API events can not be resend via API, manual reports can be provided to Cello. The reports need to contain equivalent information as the specific event. Exemplary reports can be found in [Sample Data and Reports](/guides/integration/report-automation#sample-data-and-reports) ## Contact Support If you encounter challenges or have questions during the manual attribution process, our support team is here to assist you. Reach out to us via [support@cello.so](mailto:support@cello.so) with detailed information about the referral in question, and we'll promptly assist you in resolving the matter. # Attribution Overview Source: https://docs.cello.so/guides/attribution/overview Understanding your options for tracking referral attribution and measuring program performance Attribution is the foundation of any successful referral program – it's how you connect new customers back to the users who referred them. Cello provides multiple attribution tracking options to fit different technical setups and business needs, from fully automated solutions to manual reporting workflows. ## How Referral Attribution Works Every referral follows a four-step attribution flow: Cello Referral conversion process four-step attribution flow overview diagram 1. **Referral Link Sharing** - Referrers share links containing unique codes (`ucc` parameters) 2. **Landing Page Capture** - Your website captures and stores referral codes as first-party cookies 3. **Signup Tracking** - New user registrations are linked to their referrer 4. **Purchase Tracking** - Revenue events are attributed back to the original referrers ## Attribution Tracking Options Cello offers three main approaches to attribution tracking, each suited for different technical capabilities and business requirements: ### 1. Automated Attribution (Recommended) **Best for:** Teams with development resources who want real-time, accurate tracking **Technical Implementation Required:** Yes - Developer integration needed Automated attribution provides real-time tracking of referral conversions through technical integrations: * **[Web Integration](/attribution/for-web)** - Capture referral codes on landing pages using JavaScript * **[Mobile Integration](/attribution/for-mobile)** - Track app installs through deep linking platforms like Branch.io * **[API Integration](/attribution/tracking-signups)** - Send conversion events programmatically * **[Webhook Integration](/integrations/introduction)** - Automatic tracking via Stripe/Chargebee webhooks ### 2. Auto-Attribution (Backup Safety Net) **Best for:** Additional coverage to catch missed attributions **Technical Implementation Required:** No - Works automatically Cello's auto-attribution system acts as a safety net, detecting and recovering missed referral attributions: * Automatically identifies potential referrals when users first open the referral widget * Uses stored referral cookies to detect attribution gaps * Marks recovered referrals with "AA" designation in reports * Delays reward processing by 7 days for verification [Learn more about Auto-Attribution →](/guides/attribution/auto-attribution) ### 3. Manual Attribution & Reporting **Best for:** Teams without development resources or specific business requirements **Technical Implementation Required:** No - Report-based workflow Manual attribution relies on data exports and reports rather than real-time tracking: #### Manual Report Generation Guides * **[Stripe Reports](/guides/attribution/stripe-reports)** - Export customer and payment data from Stripe * **[HubSpot Reports](/guides/attribution/hubspot-reports)** - Create filtered views and export referral data * **[Salesforce Reports](/guides/attribution/salesforce-reports)** - Generate custom reports with referral attribution #### Manual Attribution Process When automated tracking fails, use [Manual Attribution](/guides/attribution/manual-attribution) to: * Resolve user disputes about missing referrals * Handle technical glitches in automated systems * Address custom referral scenarios * Backfill historical referral data ## Choosing Your Attribution Strategy Most successful referral programs use a combination of attribution methods: ### Recommended Setup 1. **Primary:** Implement automated attribution for real-time tracking 2. **Backup:** Enable auto-attribution to catch missed referrals 3. **Fallback:** Use manual attribution for edge cases and disputes ## Getting Started 1. **Assess your technical resources** and choose your primary attribution method 2. **Review your current data flow** to identify integration points 3. **Start with one method** and add additional coverage over time 4. **Test attribution accuracy** before launching to all users Attribution accuracy directly impacts referrer satisfaction and program success. Most customers start with manual reporting for immediate launch, then add automated attribution for scale and accuracy. # Salesforce Reports Source: https://docs.cello.so/guides/attribution/salesforce-reports This guide provides the necessary steps to create and export attribution and event reports from Salesforce as a .csv file, suitable for importation into Cello This guide provides the necessary steps to create and export attribution and event reports from Salesforce as a .csv file, suitable for importation into Cello. Refer to Salesforce's official documentation for a more in-depth guide on [Building a Report](https://help.salesforce.com/articleView?id=reports_builder.htm\&type=5) and [Exporting a report](https://help.salesforce.com/s/articleView?id=sf.reports_export.htm\&type=5). ## Step-by-step guide Follow these steps to generate a report that is compatible with Cello: 1. Navigate to **Reports** in Salesforce and select **New Report**. Salesforce Reports navigation 2. Select **Opportunities** from the available report types and click **Continue**. Select Opportunities report type 3. Configure your report by applying the necessary filters and selecting the desired columns from the panel on the left-hand side. Configure report filters and columns 4. Save the report for potential future exports by selecting the **Save** option. 5. Click **Export** to save the report data to a .csv file, suitable for import into Cello. Export report to CSV Following these steps will yield a .csv report structured for import into Cello that can be leveraged for attribution and event reporting. # Stripe Reports Source: https://docs.cello.so/guides/attribution/stripe-reports With Stripe, you can manually export and import them into Cello. This feature is especially handy when you need to conduct some tests before enabling full automation With Stripe, you can manually export and import them into Cello. This feature is especially handy when you need to conduct some tests before enabling full automation. ## Generating a Stripe Customer Export After you've enriched the Stripe Customer with the right metadata, you're ready to export it as a .csv file. To do so: Stripe Customers Overview page 1. Navigate to **Customers** > **Overview**, and then click **Export**. 2. Specify the details for the export: * **Date range**: If you're submitting reports weekly or even more frequently, you can always opt for **Last 7 days**. Cello is designed to avoid importing duplicates. * **Columns**: You only need to include **ID** and **Created (UTC)**. If `cello_ucc` has been added to the Customer metadata, it will always be added as a column in the exported file. Stripe customer export configuration The exported .csv file for a Stripe Customer Export might look like this: Example Stripe customer export CSV ## Generating a Stripe Payment Export Stripe allows you to export payments as a .csv file. To do so: Stripe Payments All Payments page 1. Go to **Payments** > **All Payments**, choose **Successful**, and then click **Export**. 2. Specify the details for the export: 1. **Date range**: Just as with the customer export, you can opt for **Last 7 days** if you're submitting reports frequently. Cello will prevent duplicate imports. 1. **Columns**: The data we suggest including in the report are: **ID**, **Description**, **Created (UTC)**, **Amount**, **Currency**, **Converted Amount**, **Fee**, **Tax**, **Converted Currency**, **Customer ID**. Stripe payment export configuration # Contextual Sharing Source: https://docs.cello.so/guides/best-practices/contextual-sharing Guide for increasing referral sharing at key moments Increase sharing by creating referral program awareness, keeping it top of mind for users and making referrals part of your main user flow. To achieve this, we recommend utilizing **moments of delight** and regular communication. How to encourage referrers to share at key moments in the user journey: * [Add a CTA to refer your product](#add-a-cta-to-refer-your-product) * [Send an instant message to introduce the referral program](#send-an-instant-message-to-introduce-the-referral-program) * [Add referral link to regular emails](#add-referral-link-to-regular-emails) **Contextual sharing can increase sharing rates by 3.4x** Adding sharing prompts to just a few moments of delight can increase sharing rates more than x3. Contextual sharing strategy overview showing integration points in user journey ## Add a CTA to refer your product A product lifecycle naturally has **moments of delight** when a user would be more likely to share their satisfaction with the product within their network. Add a CTA to open the [referral component](/sdk/client-side/cello-js-usage) at such moments and make referring part of this flow. Examples of referral CTAs integrated at moments of delight ### How to implement? For Developers You can add a custom button anywhere in your UI at the moment of delight and have it open the Referral Component. 1. Identify where to add the button together with your Growth manager and UX designer 2. Use [window.Cello("open")](/sdk/client-side/cello-js-usage#open-destination) method to open the Referral Component when the button is clicked. ```javascript window.Cello("open"); ``` ## Send an instant message to introduce the referral program When your user reaches a **moment of delight** in their journey, that's the time to prompt them to share your product with an introductory in-product message i.e. [announcement](/guides/user-experience/referral-notifications-and-emails#announcement). This introduces the referral program to the user at the time they feel compelled to share their experience and effectively boost the conversion rate from users to referrers. In-app announcement introducing referral program at moment of delight ### How to implement? For Developers You can trigger [an announcement](/guides/user-experience/referral-notifications-and-emails#announcement) using [Cello.js](/sdk/client-side/cello-js-usage) client-side JS method at any point of the user journey. Here is how to do it: 1. Add [announcement to your custom launcher](/referral-component/custom-launcher#add-announcement-selector), so they are displayed when triggered. 2. Use [window.Cello("showAnnouncement")](/sdk/client-side/cello-js-usage#showannouncement-announcement) method to open the Referral Component when the button is clicked. Below example will trigger a default [welcome announcement](/guides/user-experience/referral-notifications-and-emails#announcement): ```javascript window.Cello("showAnnouncement", { "type": "welcome-announcement-1" } ); ``` You can also use a server-side API to trigger the announcement. Check out this guide [on behaviour-based triggers](/guides/best-practices/behavior-based-triggers). ## Add referral link to regular emails Use regular communication with your users as an opportunity to remind them about the referral program and keep it top of mind. For example, add their personal invite link to your weekly updates or transactional emails. Email template with referral link integration example ### How to implement? For Developers Depending on your email sending service, you can add additional content to your email, in this case, a personal invite link. To get the link for each referrer, you can use our Cello API [/active-link endpoint](/api-reference/user-referrals/get-active-referral-link) and enrich the emails you already send to your users with information about referral program and their personal invite link. # Improve User Activation Source: https://docs.cello.so/guides/best-practices/improve-user-activation Recommendations to optimize the signup conversion of referred users This page provides recommendations to optimize the signup conversion of referred users. Cello offers a variety of options that range from stunning new user experiences with personalized website content to easy setup solutions. ## Increase discoverability of your referral program Referral program discoverability **Get started now:** 🔗 [Show Cello floating button](/sdk/client-side/cello-js#show) by default. Contact your CS team for adjustments to the floating button. 🔗 [Custom launcher](/referral-component/custom-launcher) to add menu integrations (paid feature). ## Integrate referral ask at moments of delight Moments of delight **Get started now:** 🔗 **Simple option**: Add [button or UI for opening referral widget](/sdk/client-side/cello-js#open-destination) to your existing user flows. 🔗 **Advanced option**: Set up [behavior-based triggers](/guides/best-practices/behavior-based-triggers) to send a custom message to users upon completion of a defined trigger moment. Integration example ## Enable essential notifications with Cello email campaigns Email campaigns **Get started now:** Contact your Cello CS team to activate email campaigns in Slack or at [support@cello.so](mailto:support@cello.so). Email addresses need to be provided on boot of Cello to activate certain types of emails. ### Customize Cello in-app messages In-app messages **Get started now:** Contact your Cello CS team to activate the activation campaigns and customize messages [here](https://getcello.typeform.com/to/Np4C9iiO). # Optimize signup conversion Source: https://docs.cello.so/guides/best-practices/optimizing-signup-conversion Recommendations to optimize the signup conversion of referred users This page provides recommendations to optimize the signup conversion of referred users. Cello offers a variety of options that range from stunning new user experiences with personalized website content to super simple setup solutions. ## Increase conversion by showing discount info on website Website discount info **Get started now:** 🔗 Docs: [Personalizing referrals](/guides/user-experience/personalizing-referrals) 🔗 [Wise referral program with personalization](https://wise.com/invite/dic/tanjam2?utm_source=desktop-invite-tab-copylink\&utm_medium=invite\&utm_campaign=\&utm_content=\&referralCode=tanjam2) 🔗 [MeetGeek website with personalized new user banner](https://meetgeek.ai/meetgeek-referral?productId=app.meetgeek.ai\&ucc=vTlj7ne4Fkf\&n=VG9iaWFz) Divider ## Increase conversion with stand-alone landing page Stand-alone landing page **Get started now:** Once your referral landing page is ready to go, reach out to your Cello CS team in Slack or at [support@cello.so](mailto:support@cello.so) to enable forwarding new users directly to the page. 🔗 [Typeform landing page](https://www.typeform.com/refer-a-friend/invite/?utm_medium=referrerlink\&utm_source=typeform\&utm_campaign=refer_a_friend_cello\&productId=admin.typeform.com\&ucc=ARn30TGHAsq) 🔗 [Superhuman landing page with personalization](https://superhuman.com/refer?utm_source=product\&utm_medium=signature\&utm_campaign=bob%40bobinsky.me) 🔗 [Heyflow standalone landing page](https://get.heyflow.app/referral-lp?productId=go.heyflow.app\&utm_source=cello\&utm_medium=referral\&utm_campaign=Cello-RS20-C1000-D50\&ucc=2dRGoRjgP7A#start) 🔗 [Cello standalone landing page with direct signup](https://cello.so/invitation/) # Reward structure FAQs Source: https://docs.cello.so/guides/campaigns/faqs Frequently asked questions about campaign setup, reward structures, and referral program management to help you optimize your program performance. ## What is a convincing reward for the referrer? Cello provides a recommendation on how to set the reward structure during the onboarding. You can find it on your individual “Set the reward structure” page on the Onboarding Notion. ## Does Cello allow to set different reward parameters for different user segments? Currently only one campaign can be configured. One campaign comprises both the configuration of the referral experience flow and the reward parameters specified in that flow. Cello plans to support multiple campaigns in the near future. ## Is it possible to change the reward parameters retroactively for referrals that are already completed? Cello considers a referral as completed with the referred account becoming a paying customer of the referred product. Once a referral is completed the parameters for this referral cannot be changed anymore. Changing rewards retroactively would potentially lead to a disappointing user experience for the referrer. ## Is it possible to change the reward parameters in the future? It is possible to change the reward parameters for the referral program for future referrals. To bring the adjustment live, both the reward parameters and the referral flow have to be updated. Once the update is live, all future completed referrals will be rewarded according to the updated reward parameters. This is also the case even if the referrer shared the referral link still seeing the previous reward structure. ## Which currencies does Cello support for rewarding users? Currently, rewards for referrers are available in all currencies that Paypal supports. You can find more details in the Paypal documentation. ## From which reward options can a referrer choose? Cello currently offers payouts via Paypal. The list of supported countries for payouts is ”Austria, Belgium, Canada, Czechia, Denmark, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Netherlands, Norway, Poland, Portugal, Romania, Spain, Sweden, Switzerland, United Kingdom, United States” Additional reward options like gift cards, bank transfers, donations are on our backlog. Venmo is available for the US upon request. # Setting Up Campaigns Source: https://docs.cello.so/guides/campaigns/setting-up-campaigns Cello makes it easy to automatically notify and reward your users for making successful referrals Cello makes it easy to automatically notify and reward your users for making successful referrals. This is done by creating **campaigns** with specific **payout rules.** Your rules are then automated based on confirmation of **events** and **purchases.** These can be based on transactions for referred contacts, but can also be based on free trials, demos, or events you define. ## Example: Recurring Rewards Encourage Continuous Sharing In this typical example, a referrer is rewarded **50%** for each referral up to a **\$100 maximum reward cap** with a **\$5 signup bonus**. The referee initially purchases a **\$10** subscription for herself, and then **upgrades her team** in the following month. The reward is paid to the referrer over a 6 month period until the referrer reaches a **maximum cap of \$100** for this referral. In the meantime, these regular rewards encourage further sharing. Recurring rewards example over 6 months It's important to note that the **new user also receives an exclusive 50% discount** from the referrer when purchasing for the first 6 months. Our research shows that **symmetric rewards** (i.e., the referrer and the referred have incentives of similar values) work best because referrers invest their social capital when recommending a product; having similar incentives makes the referral look fair to both parties involved. ## Campaign Settings All campaigns must have one or more rules to reward referrers for the referrals they made. **Campaign** settings can be configured in the [Cello portal in the Setup section](https://portal.cello.so/setup/campaigns). Campaign settings in Cello Portal Rewards are typically based on a **percentage** of the transaction amount generated when new customers make a payment up to a **maximum** amount per referral. Additional rewards can also be set on other key events such as **signups** and **purchases** to help encourage more engagement and sharing. | **Section** | **Rule** | **Description** | | --------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Referrer Reward | Percentage of revenue | Percentage of attributed new revenue that will be paid as a reward | | Referrer Reward | Maximum reward (per referrer) | The maximum reward that can be earned per referral | | Referrer Reward | Bonus rewards | Additional rewards that can be set for signups or purchases to encourage more sharing. Bonus rewards are also recommended for products with longer free to paid conversion times. | | New User Reward | Percent Discount and Months | The new user discount to encourage additional sharing. | Cello uses the new user reward settings to display to the new user on your signup screens. You will need to take additional steps to implement the discount at the point of purchase. See the docs [here](referee-rewards-in-stripe) for more information. ### A note on optimizing your campaigns In this example, while the referrer would not receive a payout beyond their 6th month, it is likely that more referrals are made within this 6-month period that are likely to convert to paid plans within the 6-month period. This is based on the actual conversion rate of this specific product. Overall, this campaign was designed to create a rewarding experience with continuous, regular incentives that encourage referrers to continue sharing with new contacts. We recommend that you design and optimize your campaigns in a similar way to build trust and encourage continued sharing behaviors with your referrers. # Introduction Source: https://docs.cello.so/guides/introduction Your complete playbook for building and optimizing successful referral programs with Cello Welcome to the Cello Growth Guides – your comprehensive resource for maximizing the impact of your referral program. These guides are designed specifically for growth managers, marketing leaders, and customer success teams who want to turn their users into their most valuable acquisition channel. ## What You'll Find Here Our guides are organized into strategic areas that address the full lifecycle of referral program management, from initial setup to advanced optimization techniques. ### Campaign Management **Set up reward structures that drive results** * [Campaign Setup](/guides/campaigns/setting-up-campaigns) – Configure reward percentages, caps, and payout rules that motivate both referrers and new users * Master symmetric reward strategies that balance **referrer incentives** with **new user discounts** ### User Experience Optimization **Create seamless referral experiences that users love** * [Referral Component Overview](/guides/user-experience/overview) – Understand all the features available in your referral widget * [Component Configuration](/guides/user-experience/configuring-referral-component) – Customize appearance, messaging, and behavior * [Landing Page Optimization](/guides/user-experience/optimizing-landing-pages) – Design high-converting referral landing pages * [In-app and Email Notifications](/guides/user-experience/referral-notifications-and-emails) – Keep users engaged with timely updates * [Personalized Experiences](/guides/user-experience/personalizing-referrals) – Add referrer names and custom messages * [New User Discounts](/guides/user-experience/new-user-discounts) – Configure discount strategies for referred users ### Growth Best Practices **Proven strategies to increase sharing and conversions** * [Contextual Sharing](/guides/best-practices/contextual-sharing) – Prompt referrals at high-intent moments * [Behavior-Based Triggers](/guides/best-practices/behavior-based-triggers) – Automate referral prompts based on user actions * [User Activation Improvement](/guides/best-practices/improve-user-activation) – Convert more referrals into active users * [Conversion Optimization](/guides/best-practices/optimizing-signup-conversion) – Maximize signup rates from referral traffic ### Partner Program Management **Scale beyond user referrals with strategic partnerships** * [Partner Program Overview](/guides/partners/partner-overview) – Set up affiliate and influencer programs * [Partner Portal](/guides/partners/partner-portal) – Provide partners with dedicated dashboards and resources * [Partner Management](/guides/partners/manage-partners) – Invite, onboard, and manage your partner network ### Attribution & Reporting **Track performance and prove ROI** * [Auto-Attribution](/guides/attribution/auto-attribution) – Automatically track referral conversions * [CRM Integration Reports](/guides/attribution/hubspot-reports) – Connect referral data to HubSpot, Salesforce * [Payment Platform Reports](/guides/attribution/stripe-reports) – Track revenue attribution through Stripe ### Data & Integrations **Connect Cello to your growth stack** * [Data Exports](/guides/data-sync/cello-data-exports) – Extract referral data for analysis * [API Data Sync](/guides/data-sync/api-data-sync) – Programmatically sync referral data * [Event Testing](/guides/integration/event-testing) – Validate your referral tracking setup ## Getting Started If you're new to Cello or referral programs: 1. **Start with [Campaign Setup](/guides/campaigns/setting-up-campaigns)** to configure your reward structure 2. **Review [User Experience Overview](/guides/user-experience/overview)** to understand the referral component features 3. **Implement [Contextual Sharing](/guides/best-practices/contextual-sharing)** strategies to increase sharing rates 4. **Set up [Attribution](/guides/attribution/auto-attribution)** to track and reward successful referrals ## Need Help? Each guide includes actionable steps and real examples from successful Cello customers. For additional support: * Contact your Customer Success team via Slack * Email [support@cello.so](mailto:support@cello.so) for technical questions * Schedule a strategy session to review your program performance These guides focus on growth strategy and program optimization. For technical implementation details, visit our [Developer Documentation](/referral-component/quickstart) and [API Reference](/api-reference/introduction). # Manage Partners Source: https://docs.cello.so/guides/partners/manage-partners Cello allows you to manage your partners and affiliates to provide them with a full portal experience Cello allows you to manage your partners and affiliates, providing them with a full portal experience for accessing their affiliate links, tracking referral progress, and receiving rewards for successful referrals. Inviting partners takes only a few clicks. ## Inviting New Partners to Your Program 1. Navigate to the **Partner Users** page in the Cello Portal and click **Add New Partner** in the upper right. If you do not see this page, contact Cello support to have additional permissions applied to your account. Partner Users page with Add New Partner button 2. Enter the **email** and **campaign** you want to assign to the partner user. **Product User ID** is optional and should be added if you want to update an existing user to partner status. Add new partner form with email, campaign, and Product User ID fields Adding a Product User ID` ensures that the referrer's referral code (`ucc\`) will be retained if they are either: (1) moving from a user-led campaign to an affiliate campaign, or (2) moving from an old affiliate campaign to a new one. If you do not specify the Product User ID, Cello automatically creates a new identifier, and the user will then have two separate referral links: one inside your product and one in the Cello portal. 3. Click **Send Invite**. 4. The partner user will receive a branded email invitation with instructions to register. 5. From this email, they can click a link to register quickly, either using **sign up with Google** or by providing an email and password. (Note: If a user signs up using email, they can later use Google to sign in with the same email address.) Partner registration email with sign up options # Overview Source: https://docs.cello.so/guides/partners/partner-overview Cello allows you to set up and manage all aspects of your own partner program, unifying user referrals and partners in one platform Cello allows you to set up and manage all aspects of your own partner program, unifying user referrals and partners in one platform. All partner features are offered as part of the core Cello platform without additional technical effort needed. Partner program overview Cello provides support on setting up your partner program or if you have an existing program that you would like to transfer to Cello. Feel free to contact our support team via Slack to guide you through the setup. You can find a [walkthrough of the Partner Portal](https://www.loom.com/share/f8f5c502832b485da6ffb1186bd00d89?sid=2f71041c-ab22-4088-9c71-e19757c229d8) end-user experience here ## Steps for setup: #### 1. Integrate Cello If you are already using Cello for user referrals, there is no additional technical effort required to enable partners. If you are not yet using Cello, your teams will need to setup a [landing page for referrals](/guides/user-experience/optimizing-landing-pages) and [referral conversion tracking](/attribution/introduction) to automate rewarding. #### 2. Set Reward Structure To incentivize affiliates, influencers, and other partners to share your product, you can offer partners exclusive reward structures. Lifetime rewards and one-off compensation components increase the engagement of your partners and make the program more attractive. You can also see what other customers are doing in [this slide deck](https://app.pitch.com/app/presentation/e0b19633-db69-4984-840e-59184b90c2cf/1f57b9cf-0721-401e-89e8-f14f4f84980c/8ee44ff9-aac6-49cb-84e8-d31e1b118d89) #### 3. Invite Partners The Cello [Partner Portal](/guides/partners/partner-portal) provides partners with a full experience that includes details of your program, their personal sharing link, updates on the status of their referrals and rewards. You can invite new partners to your program from the [Manage Partners](/guides/partners/manage-partners) page in the Cello portal. ## Optional steps: For an optimal partner experience, we recommend several best practices to improve performance. You can find more information [here](https://pitch.com/v/h7cf3r/99812f2e-e331-4c58-b84b-009723fc3220). **1. Create a Media Kit (Optional)** We recommend providing [media kits](https://pitch.com/v/h7cf3r/46528f51-d7b5-4e45-a94c-e4521d3b55b1) for partners on your ambassador page. Prewritten messages and branded assets make sharing frictionless for your partners and allows you to ensure brand consistency across all collaborations. **2. Create an Ambassador Landing Page (Optional)** Implementing a dedicated [ambassador landing page](https://pitch.com/v/h7cf3r/467b3ed2-b50f-4dd9-a280-e358ce2e8ea3) for your partners provides clear guidance on how they can get access to your program, what your program offers, and guidelines for collaboration. Moreover, an ambassador landing page can allow you to effortlessly collect applications from potential partners interested in joining your program. ## Transfer an existing program (optional): It's easy to transfer an existing partner program using another product or in-house tools to Cello. Once transferred your existing partners can get rewarded on Cello and use the new links to make referrals. Cello can share details and assist upon request. # Partner Portal Source: https://docs.cello.so/guides/partners/partner-portal The partner portal provides full portal experience for accessing their affiliate link, tracking progress on referrals, and getting rewarded for successful referrals The partner portal provides full portal experience for accessing their affiliate link, tracking progress on referrals, and getting rewarded for successful referrals. Inviting partners only take a few clicks. Partner portal interface overview Accessing Program Details Partners can access program details by clicking on **Your Sharing Link** on the left navigation. All details are provided from the Cello referrals component, in the same way your users access Cello from within your application. ## Getting Rewarded Clicking on **Your Reward Details** opens the Cello component with details of all rewards. Partners who have not provided payment details can do so from this page. ## Partner Analytics Cello provides partners with detailed analytics for tracking program performance on their referrals. An overview is provided on the **Home** page, with more details provided on the full funnel from the **New User Signups** and **New User Purchases** page . # Partner Resources Source: https://docs.cello.so/guides/partners/partner-resources This guide is designed to help Partner Managers effectively use the Partner Resources feature to add, manage, and share guides and resources with partners This guide is designed to help Partner Managers effectively use the Partner Resources feature to add, manage, and share guides and resources with partners. Partner Resources dashboard overview The Partner Resources section is a dedicated space for creating and managing guides and content that can be shared with your partners. It allows you to: 1. Add new guides with detailed descriptions and cover images. 2. Organize resources for easy partner access. 3. Provide links to videos, articles, or pages to help partners promote your products or services. ### Adding a New Guide Add new guide interface If no resources are added yet, you'll see a placeholder message encouraging you to create your first guide. 1. **Click the "Add New Guide" Button**: * Located at the top right of the Partner Resources dashboard. 2. **Fill Out the Form**: * **Title**: Enter a clear and concise title for the guide. * **Description**: Provide a brief description of the guide's purpose. * **Cover Image**: Upload an image to visually represent the guide. Use the "Select files" area to drag and drop or browse files from your machine. * **Link**: Add a URL to direct partners to the guide's content, such as a video, article, or webpage. 3. **Save the Guide**: * Click the **Add** button to save the guide. 💡 **Once added, guide is instantly visible for your partners.** Partner view of resources ### Managing Existing Guides Once guides are added, they appear as individual cards in the Partner Resources dashboard. Each card includes: 1. **Title and Description**: A quick summary of the guide. 2. **Actions**: * **Edit**: Use the pencil icon to update the guide's details. * **Delete**: Use the trash icon to remove the guide. 3. **Call-to-Action Buttons**: * Depending on the link type, buttons like "Watch Video," "Read Article," or "Go to Page" will appear, directing users to the linked resource. ## Best Practices for Creating Guides 1. **Use Descriptive Titles and Images**: * Ensure titles are specific and relevant to the guide's content. * Upload visually appealing and professional cover images to attract attention. 2. **Organize by Purpose**: * Group guides by themes, such as "Overview," "Sharing Tips," or "Content Creation Examples," for easier navigation. 3. **Test Links**: * Verify that all links lead to the correct resource and are accessible to partners. ## Example Use Cases ### Case 1: Sharing Partner Links Create a guide titled **"Overview"** with a description like: "Share your partner link with contacts and followers." Include a video tutorial link to help partners understand how to use their referral links. ### Case 2: Promoting Your Product Add a guide titled **"Share"** with instructions on promoting your product. Link to an article that offers best practices for sharing content on social media. ### Case 3: Content Creation Support Provide a guide titled **"Content"** with social media post templates and examples. Link to a page where partners can download assets or view tips. ## Frequently Asked Questions (FAQs) ### Q: Can I reorder the guides? A: Currently, guides are displayed in the order they were added. You may delete and recreate guides to adjust the sequence if necessary. ### Q: What file formats are supported for cover images? A: Common image formats like JPG, PNG, and GIF are supported. ### Q: How do I ensure partners can access the links? A: Use publicly accessible links or grant appropriate permissions to ensure partners can view the resources. *** # Configuring Referral Component Source: https://docs.cello.so/guides/user-experience/configuring-referral-component The Referral Component is an all-in-one referral experience, easily added to your web application The Referral Component is an all-in-one referral experience, easily added to your web application. It takes care of things like referrer first-time experience, enabling users to share links, updating them on progress, and handling rewards. ## Adding the component to your product First, add the Referral Component into your application with the help of your developer. Simply follow the instructions on the [Referral Component integration guide](/referral-component/quickstart). ## Customize referrer experience After adding component to your application, you now can customize referrer experience in Cello Portal. ### Choose Cello button design and position You can use either the default Cello button (FAB) or integrate Cello into a menu via the [custom launcher](/referral-component/custom-launcher), or both as the launcher. If you do not want to use the Cello button, simply uncheck "Show Cello button". If you are using the Cello button, you can choose on of **3 styles**, configure its position and also specify how would you like to display the [announcements](/guides/user-experience/Referral-Notifications-And-Emails#announcement). Cello button configuration options ### Choose component type Component can be displayed as a **pop-up** or a **modal**. When you choose pop-up view, you can also configure pop-up position on the screen. Component type selection - popup or modal ### Choose your brand colors for Component You can choose primary color for your component, colors of the Cello button and color of [notification badge](/guides/user-experience/Referral-Notifications-And-Emails#alert-and-badge). Brand color configuration options ### Choose social sharing options Cello provides many sharing options to choose from. Simple link copy, social sharing including Twitter, LinkedIn, and email, and transfer to mobile by using a QR-code where a user can forward the invite using all the options provided directly from their mobile device. Social sharing options configuration ### Choose payment method options Cello allows users to receive rewards via PayPal or Venmo payments. Additional payment options are planned based on user feedback. Payment method options - PayPal and Venmo # New User Discounts Source: https://docs.cello.so/guides/user-experience/new-user-discounts Offering discounts or rewards to referees is a powerful strategy for improving signup conversion Offering discounts or rewards to referees is a powerful strategy for improving signup conversion for several reasons: 1. **Sense of Urgency:** Time-limited discounts create a sense of urgency, encouraging referees to act swiftly to take advantage of the offer. This urgency can lead to quicker decision-making and increased conversion rates. 2. **Enhancing Referral Motivation:** When referrers know that their referrals lead to tangible benefits like discounts for their contacts, they're more likely to actively promote your product. This not only increases the number of referrals but also the likelihood of signups. 3. **Overcoming Price Resistance:** Discounts can effectively lower financial barriers for potential users who are hesitant about the cost. By making the price more attractive, it can sway those who are undecided about trying your product or service. 4. **Building Initial Trust:** Offering a discount can foster goodwill and build initial trust with new users. A special deal can create a positive first impression of your brand, setting the stage for a lasting relationship. 5. **Competitive Advantage:** If your competitors do not offer similar incentives, your discount can give you a competitive edge. This unique selling point can make your product more appealing compared to others in the market. This page describes how a **discount to the new referred account can be automated using Stripe or Chargebee** (e. g. 50% discount for the first 6 months). ## Configure discount information Altho handling discounts needs to be done within your product and supporting systems like Stripe or Chargebee, you can specify discount information in Cello to be shown in the Referral Component and terms. Go to [Campaign settings in Cello Portal](https://portal.cello.so/setup/campaigns) and add discount information, by specifying discount percentage and duration in months: Discount configuration in Cello Portal How do I grant discounts in Chargebee? Chargebee uses **coupons** to apply discounts on subscriptions. To grant a discount for a new referred account, the following steps are required: * Create a coupon either via the [Chargebee Dashboard](https://www.chargebee.com/docs/2.0/coupons.html#creating-coupons) or the [Chargebee API](https://apidocs.chargebee.com/docs/api/coupons?prod_cat_ver=2) * Attach the coupon code to the [subscription](https://apidocs.stagingcb.com/docs/api/subscriptions?prod_cat_ver=2) ## How do I grant discounts in Stripe? Stripe uses **coupons** and **promotion codes** to apply discounts on payments. To grant a discount for new referred accounts, these coupons and promotion codes have to be set up in Stripe. This can be done in multiple ways. For both solutions, you **must first set up a coupon and then attach the discount rules** (e.g. 10% off for 3 months). * Manually using the [Stripe Dashboard](https://dashboard.stripe.com/coupons) * Programmatically using the [Stripe API](https://stripe.com/docs/payments/checkout/discounts#promotion-codes). ## Using coupons for discounts Coupons can be used to attach a discount directly to a **stripe customer** or a **subscription.** This can be achieved manually via the [Stripe Web Console](https://dashboard.stripe.com/coupons) or the [Stripe API](https://stripe.com/docs/billing/subscriptions/coupons?dashboard-or-api=api). Attach manually via **Stripe Web Console**: Stripe Web Console coupon attachment Attach the coupon during customer creation as discount field via **Stripe API:** Stripe API coupon attachment during customer creation ### Attach the coupon to the customer or subscription To give the discount to a new user, you need to attach the coupon to a customer or subscription. There are two ways to attach the coupon, manually or via API. If you attach the coupon to a customer, the discount is applied to every transaction or subscription. You can limit the coupon in settings with certain conditions. ### Manual attachment of the coupon to the customer in advance This is only possible if the stripe customer is already created and no transaction has been created yet. 1. Go to your Stripe Console 2. Open the customer, go to **Actions,** and select **Apply coupon** Stripe Console apply coupon action 3. Select the coupon you want to attach Coupon selection in Stripe Console **💸 If the customer subscribes now to a plan or performs a transaction, the discount will be automatically applied during the checkout.** ### Attach the coupon during checkout with Stripe API The prerequisite for this solution is to have implemented the [Stripe.js](https://stripe.com/docs/js) in your front end so you can modify the customer creation or subscription. Attach the discount already while creating the customer and adding the `cello_ucc` code. Example for a NodeJS App — attach coupon while creating the customer **(recommended)**: ```javascript const stripe = require('stripe')('sk_test_51KiCYYCSMQAUBF...'); const customer = await stripe.customers.create({ description: 'New Stripe Customer', coupon: 'lHTYr6Y9', metadata: { 'cello_ucc': 'hdz7afhs7', 'product_user_id': 'xcsdad' } }); ``` Example for a NodeJS App — attach coupon code during the checkout and re-use an existing customer: ```javascript const session = await stripe.checkout.sessions.create({ mode: "subscription", line_items: [ { price: priceId, quantity: 1 }, ], customer: 'cus_dbhsahd7fhsd', discounts: [{ coupon: 'lHTYr6Y9', }], }); ``` The Stripe UI will automatically pick up the discount and visualize it during the checkout Stripe checkout with discount visualization ## Using promotion codes for discounts A **Promotion Code** represents a customer-redeemable code for a coupon. They can be used for the **Stripe Payment Link** **or custom-built forms**. Here are their key characteristics: * When using a **Promotion Code,** the setup of an underlying coupon is also required. * **Promotion Codes** can be used to create multiple codes for a single coupon. * Because **Promotion Codes** are used by customers to redeem a coupon, they are exposed to customers. ### Pre-fill the promotion code in Stripe Payment Link With the URL parameter `prefilled_promo_code` a promo code can be automatically passed to the UI. The form automatically picks up the parameter from the URL and pre-fills the promotion code field. More details can be found [here](https://stripe.com/docs/payments/payment-links#url-parameters). **Example:** 10% off for 3 months via promo code `CELLO` [https://buy.stripe.com/cello?prefilled\_promo\_code=CELLO](https://buy.stripe.com/cello?prefilled_promo_code=CELLO) Stripe Payment Link with prefilled promo code # Optimizing Referral Landing Page Source: https://docs.cello.so/guides/user-experience/optimizing-landing-pages This guide focuses on optimizing landing pages for referrals, a critical step in the user journey This guide focuses on optimizing landing pages for referrals, a critical step in the user journey. A referee's first interaction with your product occurs when they follow an invite link, making the page they land on a key determinant in the success of your referral program. ### In this guide This guide walks you through the key building blocks of a referral-optimized landing page to ensure referees smoothly transition from interested to signing up. There are a few approaches you can take when designing your referee signup flow: * [Using a dedicated landing page](#dedicated-landing-page) Recommended * [Using your home page as the landing page with inline personalization](#home-page-as-the-landing-page-with-inline-personalization) * [Using your home page as the landing page with our new user banner for personalization](#home-page-as-the-landing-page-with-new-user-banner) No code ## Dedicated landing page A dedicated page that the referee lands on when clicking on the invite link has shown to have up to **x2 higher conversion rate** if done right. Below, you can find examples of the landing pages we like along with the key building blocks to make a dedicated landing page perform. Dedicated landing page examples ### Key building blocks #### Headline: Personalized Exclusivity Craft a headline that feels exclusive and personal. [Use personalization](#add-personalization) for additional social proof like adding the referrer's name, and highlight [any special discount or reward](#add-a-new-user-discount-or-reward). This approach creates a sense of trust and urgency. #### Key Value Proposition: Clarity in One Sentence Distill your product's core benefit into a single, compelling sentence. This should quickly inform the visitor whether your product meets their needs, making their decision process easier and faster. #### Content: Concise and Informative Streamline your content compared to your main homepage. Provide just enough detail to help visitors understand your product and how it can work for them, without overwhelming them or necessitating navigation away from the page. #### CTA Focus: Direct and Offer-Centric Make your Call-to-Action (CTA) clear and direct, with an emphasis on the action you want the referee to take. If there's a special offer or discount, ensure your CTA highlights this to maximize conversion. #### Social Proof: Credibility through Endorsements Include social proofs such as G2/Capterra badges, Trustpilot ratings, customer logos, and quotes. These elements build trust and credibility, showing potential users that others have had positive experiences with your product. #### FAQs: Contextual Information Integrate a section for Frequently Asked Questions (FAQs) to address common queries. This helps provide referees with all the necessary information on the same page, reducing the likelihood of them leaving the page without signing up. If they return later, they can still be tracked towards the referral, but the best time to capture a new user is the first time they click the referral link. ### Add a new user discount or reward Offering discounts to referees effectively boosts signup conversion by fostering urgency, encouraging active promotion, reducing cost concerns, and giving a competitive advantage when similar incentives aren't available from competitors. [Learn more about adding discounts 👉](/guides/user-experience/adding-discounts) If your program offers discounts or rewards to referees, make sure to highlight it in the Headline and CTA. Landing page with discount highlighting 💡 Our research shows that **symmetric rewards** (i.e. the referrer and the referred have incentives of similar values) are more effective. This happens because referrers invest their social capital when recommending a product; having similar incentives makes the referral look fair to both parties involved. **Examples of dedicated landing pages** 🔗 [Heyflow stand-alone landing page](https://get.heyflow.app/referral-lp?productId=go.heyflow.app\&utm_source=cello\&utm_medium=referral\&utm_campaign=Cello-RS20-C1000-D50\&ucc=2dRGoRjgP7A#start) 🔗 [Cello stand-alone landing page with direct signup](https://cello.so/invitation/) ### Add personalization *"The most credible advertising comes straight from the people we know and trust. More than eight-in-ten global respondents (88%) say they completely or somewhat trust the recommendations of friends and family." Nielsen Global Trust in Advertising Report, 2021* Personalization and social proof, like using the referrer's name on the landing page, can contribute to converting referees into users. The personalization establishes trust and credibility, makes the offer more relevant and engaging, leverages an existing relationship, fosters a sense of community and belonging, reduces perceived risk, and has an emotional appeal. These elements together make the referral more compelling, encouraging referees to sign up. [Learn more about personalization 👉](/guides/user-experience/personalizing-referrals) Personalized landing page example 💡 **Leveraging existing assets -** Do you already have an optimized landing page for ads? You don't need to start from scratch. Reuse the layout and some of the content to build a dedicated referral landing page. **Examples of personalized landing pages** 🔗 [Reword stand-alone landing page with personalization](https://reword.com/referral?productId=reword.com\&ucc=IX2FHjt1Y0Z\&celloN=Q29udGVudCBDeWJvcmc) 🔗 [Wise Referral Program with personalization](https://wise.com/invite/dic/tanjam2?utm_source=desktop-invite-tab-copylink\&utm_medium=invite\&utm_campaign=\&utm_content=\&referralCode=tanjam2) 🔗 [Superhuman landing page with personalization](https://superhuman.com/refer?utm_source=product\&utm_medium=signature\&utm_campaign=bob%40bobinsky.me) ## Home page as the landing page with inline personalization Use your existing home page as landing page and [add a discount](/guides/user-experience/new-user-discounts) and [personalization](/guides/user-experience/personalizing-referrals) into your home page Headline and CTA. Home page with inline personalization ## Home page as the landing page with New User Banner The [New User Banner](/guides/user-experience/personalizing-referrals) is easily added to your landing page by integrating the [Cello attribution library](/sdk/client-side/attribution-lib). Visitors who follow the Cello invite link will have a banner that includes the discounts, tailored CTA, and personalization on your home page. Home page with new user banner **Examples of landing pages with new user banner** 🔗 [MeetGeek Website with personalized new user banner](https://meetgeek.ai/meetgeek-referral?productId=app.meetgeek.ai\&ucc=vTlj7ne4Fkf\&n=VG9iaWFz) ## Get started now Once your referral landing page is ready to go, go to you product dashboard [New User Experience setup page](https://portal.cello.so/setup/new-user-experience) and switch to **Custom landing page**. In **Custom landing page URL** field, add the URL to your new landing page and **Save**. Custom landing page setup in Cello Portal # Overview Source: https://docs.cello.so/guides/user-experience/overview The Referral Component is an all-in-one referral experience, easily added to your web application with just a few lines of code The Referral Component is an all-in-one referral experience, easily added to your web application with just a few lines of code. It takes care of things like referrer first-time experience, enabling users to share links, updating them on progress, and handling rewards. This functionality helps to keep your users happy and engaged with your referral program. Let's review some of the key capabilities 👉 ## Adding the component to your product Adding the Referral Component to your product is straightforward. You can get it up and running in your test environment in just a few minutes. Simply follow the instructions or the [Referral Component Quickstart](/referral-component/quickstart). Cello provides a few different options to add the component to your product. You can use either the default Cello button (FAB) or integrate Cello into a menu via the [Custom Launcher](/referral-component/custom-launcher). Either option can open with the component appearing as a pop-up or modal view. Referral Component Pn ## First-time experience The Cello Referral Component provides an onboarding experience for first-time users of the program. It's a way to get users excited about the opportunity and explain how the program works in 3 easy steps. All the texts of the onboarding experience can be customized to better explain your unique value proposition. First-time experience onboarding ## Your offer, front and center The referral program text and offer are fully customizable and can be translated into multiple languages. Customizable referral offer display ## Easy sharing Cello provides many sharing options to choose from. Simple link copy, social sharing including Twitter, Facebook, LinkedIn, and email, and transfer to mobile by using a QR-code where a user can forward the invite using all the options provided directly from their mobile device. Multiple sharing options including social media and QR code ## Engaging users with announcements The Cello Referral Component provides a robust announcement feature to activate first-time referrers, keep the referral program top of mind, encourage repeat behaviour, and keep your users up to date with important updates. Announcement feature examples Announcements can be customized based on the Referral Component integration option you have chosen. [Anchor announcements to a specific menu item](/referral-component/custom-launcher#add-announcement-selector) or choose to have them appear as toasts or banners. Different announcement display options ## Keeping users update with emails Referral programs thrive on timely engagement. Knowing instantly when there's activity tied to a referrals means your users can celebrate successes and continue to share more effectively. Whether it's their first successful share, a brand-new signup or unlocking a new reward, email notifications ensure they never miss a beat in the referral journey. Email notification examples ## Getting Rewarded When users receive their first reward, they will be prompted to provide payment details and can select how they would like to receive their reward. They may also be asked to provide additional information if required to receive a payment in their specific country. Reward payment setup interface ## Reward Countries and Payout Methods Cello supports a growing list of countries\* where users can receive reward payments. Cello plans to continue expanding support for additional countries based on user feedback. Cello can be automatically hidden for users in unsupported countries by providing country information when [integrating the Referral Component](/sdk/client-side/cello-js#celloboot). This is recommended to provide the best experience for your users. Cello allows users to receive rewards via PayPal or Venmo payments. Additional payment options are planned based on user feedback. Payment method selection All users are subject to the Cello [Terms of Service](https://cello-growth.notion.site/Terms-of-Service-40b8093e87e04429b862a601a1d23fc1/) and [Privacy Policy](https://cello-growth.notion.site/Privacy-Policy-for-Platform-76a94bd64cb44e1f92a6cec3ec5643ca) and can access details through the links that are provided. Referrers are able to get rewarded as a business and receive invoices for tax purposes. Users are required to provide additional taxpayer information based on the specific country of residence and local reward thresholds or choose to be paid as a business by providing their VAT number. Cello allows users to download credit notes directly from the Cello Referral Component. If they have at least one reward, they will see a link "Tax Information" link from the rewards tab under "Update Payment Details". Users who no longer have access to the Cello component can contact [support@cello.so](mailto:support@cello.so) to receive their credit notes through a standard support process. Tax information and credit notes interface *Supported Reward Countries: Australia, Austria, Bahrain, Belgium, Bermuda, Botswana, Brazil, Bulgaria, Canada, Cayman Islands, Chile, Croatia, Czechia, Denmark, Dominican Republic, Estonia, Faroe Islands, Finland, France, French Guiana, Georgia, Germany, Gibraltar, Greece, Greenland, Guatemala, Hong Kong SAR, Hungary, Iceland, India, Ireland, Israel, Italy, Japan, Latvia, Lesotho, Liechtenstein, Lithuania, Luxembourg, Malta, Mauritius, Mozambique, Netherlands, Nicaragua, Norway, Oman, Philippines, Poland, Portugal, Qatar, Romania, San Marino, Saudi Arabia, Senegal, Slovakia, Slovenia, South Africa, Spain, Sweden, Switzerland, Thailand, Ukraine, United Kingdom, United States, Uruguay, Zambia, Zimbabwe.* ## Texts and language You can customize the default text that appears on the Referral Component and provide different language options for your users. The Cello component detects a user's language automatically or you can set it [using Referral Component JS methods](/sdk/client-side/cello-js). We provide English, German, Spanish, French, Dutch, Italian, Portuguese, Japanese, Danish and Slovak by default and Cello will help you add additional languages on request. # Personalizing Referrals Source: https://docs.cello.so/guides/user-experience/personalizing-referrals Add personalized messages to your landing pages to increase conversion rates Personalization Overview In this guide we will go through: * The benefits of personalization * How to add personalization to your landing pages: * [Inline](#add-personalization-to-the-headline-or-other-page-element) Recommended * [Using the new user banner](#add-personalization-with-new-user-banner) No code ## Why personalization? Personalization and social proof, such as including the referrer's name in the landing page headline, are crucial for converting referees into signed-up users due to several key reasons: 1. **Enhanced Trust and Credibility:** Seeing a familiar name like "Bob has gifted you a free month to try Moonly" immediately establishes a sense of trust. The referee recognizes the referrer, which lends credibility to the offer. 2. **Increased Relevance and Engagement:** Personalization makes the offer feel more tailored and relevant to the referee. A message that appears to be handpicked for them can create a stronger emotional connection and engagement with the content, increasing the likelihood of a positive response. 3. **Leveraging Existing Relationships:** Utilizing the referrer's name capitalizes on the existing relationship between the referrer and the referee. This relational dynamic can be a powerful motivator, as referees often value and trust the opinions and choices of their friends or contacts. 4. **Creating a Sense of Community and Belonging:** Personalized messages can give referees the feeling of being part of an exclusive group or community, especially when the message implies a gift or a special offer from someone they know. This sense of belonging can be a strong incentive to join and participate. 5. **Reducing Perceived Risk:** For new users, trying a new service involves some level of perceived risk or uncertainty. A personalized referral reduces this perceived risk, as it comes with an implicit endorsement from someone the referee trusts. 6. **Emotional Appeal:** Personalized messages can evoke an emotional response. Knowing that a friend or acquaintance has thoughtfully extended an offer can create feelings of appreciation and reciprocity, further encouraging the referee to sign up. To show the referrer name to the new user, you need to make sure that their user details are passed in the [referral component](/referral-component/quickstart). ## Add personalization to the Headline or other page element Recommended Personalized headline example To add the referrer's name to an element on the page that the new user lands on when following an invite link, you need to follow these steps: ### Turn personalization on for your product Go to [New User Experience setup in Cello Portal -> Personalization tab](https://portal.cello.so/setup/new-user-experience) and add personalization. Personalization settings in portal When personalization is turned on, an extra parameter will be added to the URL of your landing page, e.g. `celloN=VGFuamE` ```html https://getmoonly.com/?productId=getmoonly.com&ucc=pNRB1aYqArN&celloN=VGFuamE ``` ### Use parameter to get the name of the referrer Value of parameter `celloN` is an base64 encoded name of the referrer. In this example, `VGFuamE` is decoded to `Tanya` . You can try it yourself [here](https://www.base64decode.org/). By accessing this parameter from the URL and decoding in, you can add it to any element on any landing pages which are relevant. ## Add personalization with the New user banner No code New user banner example The banner with a personalized message is easily added in a few steps: * Add [Cello attribution library](/sdk/client-side/attribution-lib) to your landing page. * Go to [New User Experience setup in Cello Portal -> Personalization tab](https://portal.cello.so/setup/new-user-experience) and turn the banner on. Banner configuration in portal Visitors who follow the Cello invite link will have a banner displayed with a custom message containing an offer and the name of their referrer. # Referral Notifications and Emails Source: https://docs.cello.so/guides/user-experience/referral-notifications-and-emails Cello provides notifications that are seamlessly integrated with your product experience to inform, activate and continuously engage users with the referral program Cello provides notifications that are seamlessly integrated with your product experience to inform, activate and continuously engage users with the referral program. This page provides details on the notifications types and how to customize based on your needs. ## Notifications types and triggers Notifications the we support fall into 2 categories: **in-product** announcement and alert and **external** like email. These notifications and their associated triggers are designed to work in conjunction your existing product engagement touch points in a seamless way. ### Alert and Badge **Alert** is a notification that appears under Rewards tab. It is accompanied with a **badge**. New reward alert A **badge** is a small colored dot displayed on the launcher opening the widget (Cello button or [Custom Launcher](/referral-component/custom-launcher)) to draw attention to the activity with the referral program without being too distracting from your core product experience. Badge examples with Cello Button and Cello Custom Launcher | Type | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | "New referrer activation" alert | Displayed after referrer has used the product more then 1 day after signs up to bring subtle attention to the referral program. | | "Successful share" alert | Displayed every time referrer has a new link view. | | "New reward" alert | Displayed every time the referrer receives a new signup or reward. | ### Announcement Announcements are callout style message that appears anchored to the launcher, either Cello button or [Custom Launcher](/referral-component/custom-launcher). Announcements can be dismissed by clicking on them or their "X" dismiss button. Announcement examples anchored Cello Button or Cello Custom Launcher | Type | Description | | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | "New referrer activation" announcement | Sent 7 days after a ["New referrer activation" alert](#alert-and-badge) is sent and the user has not acted on it. | | "New reward" announcement | Sent if the user has not entered their payment details after 7 days of receiving the first reward. | ### Email Emails are a way to keep your users aware and engage with the referral program without them needing to log into the application. By default, Cello will send emails about the key events in the referral lifecycle. Standard email template examples Don't forget to add user email to the [boot command of the Referral component](/sdk/client-side/cello-js#3-initialize-the-library) to start sending emails to your users. | Type | Description | | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | "Welcome" email +10% activation | By default is sent on the 6th day after new referrer first signs up to introduce the referral program and its details. | | "Successful share" email | Sent once when the referrer gets a first successful share, i.e. someone has viewed their link, to keep the momentum and encourage more sharing. | | "New reward" email | Sent every time the referrer receives a new reward. When referrer gets a first monetary reward this email contains information on how to claim the rewards. | | "Unclaimed rewards" email | Sent if the user has not entered their payment details after 7 days of receiving the first reward. | ## Default notification journey Below is an illustration of the default new referrer's journey with key milestones and how Cello uses different types of notifications to keep them informed and engaged. Default notification journey ## Activation campaign In addition to the default notification journey, you can run **an activation campaign** with Cello to activate users for your referral program with recurring announcements. Default activation campaign sequence **How it works:** 1. Activation campaign starts 30 days after ["New referrer activation" announcement](#announcement) is sent and the user has not acted on it. 2. The recurring announcements will be only send if the user full-fills a certain activity pattern in the product like: * Referrer has used the app at least once after reading the last announcement. * Last activation announcement was read. * Referrer didn't share in the last 30 days. ## Notification settings You can preview and configure which notifications you want Cello to send in your [Cello Portal](https://portal.cello.so/setup/notifications). Cello Portal notifications settings Cello distinguishes between **Essential** and **Engagement** notifications. Essential notifications are **always on** as they are required for the program to run successfully. You can choose to turn off Engagement notifications, however, they do give a significant performance improvement. # Setup Overview Source: https://docs.cello.so/integration-overview Get started with Cello in 4 easy steps Cello setup overview 4 steps ## Setup Steps If you did not find your integration guide, complete these steps to integrate Cello, regardless of your tech stack or payment gateway. Effort: \~3-4 hours Add referral functionality to your web application with Cello's embeddable Referral Component. You can also integrate the Cello Referral Component into your mobile apps. Choose the appropriate SDK for your platform: Effort: \~1-2 hours Set up a [Referral Landing Page](/user-experience/optimizing-landing-pages) and capture referral codes (`ucc`) when users click referral links. For Web signup flow, follow this guide: Or choose the appropriate guide for your flow: Effort: \~1 day When users sign up or express interest in your product, attribute these events to their referrer for potential future rewards. Choose your preferred method to send signup events to Cello: Complete guide for tracking signup events API reference for sending events Effort: \~1 day Complete the conversion tracking by sending purchase events to Cello when users make payments. Choose your integration method based on your payment gateway: } href="/integrations/webhooks/stripe-webhook" > Stripe webhook integration for purchase events } href="/integrations/webhooks/chargebee-webhook" > Chargebee webhook integration for purchase events Complete guide for tracking purchase events API reference for sending events ## Integration Guides Effort: \~1-2 days Ready-to-use webhook integrations for Stripe and Chargebee provide the **fastest path** to track referral conversions automatically. These guides are **optimized for the typical freemium scenario with Stripe or Chargebee**. Use one of these guides if you: * Create a Stripe or Chargebee customer on signup * Use the Stripe or Chargebee webhook to send Cello referral conversion events # Introduction Source: https://docs.cello.so/integrations/introduction Connect Cello to your payment gateway, CRM, and other systems Cello provides flexible integration options to connect with any payment provider, CRM, or custom system. Choose the approach that best fits your architecture. ## Integration Methods ### Pre-built Webhooks Ready-to-use webhook integrations for popular payment providers. These provide the fastest path to track referral conversions automatically. } href="/integrations/webhooks/stripe-webhook" > Automatically track Stripe payments } href="/integrations/webhooks/chargebee-webhook" > Track Chargebee subscriptions ### Cello REST API Did not find an integration for your system? Send conversion events from any system using our REST API. Perfect for connecting payment gateways (e.g. Paddle, Recurly, etc.), CRMs (e.g. Hubspot, Salesforce, etc.), or in-house built CRMs or billing systems. Follow 4 easy steps to get your referral program up and running with Cello using any CRM or payment gateway Send conversion events, validate referral codes, and manage referral links programmatically ## Next steps Choose your integration based on your setup: Follow one of our quickstart guides for **pre-built webhook integrations** for the fastest setup. Use the **Cello API** to send signup events and **Stripe or Chargebee webhook** to send purchase events from your payment provider. Send signup events } href="/integrations/webhooks/stripe-webhook" > Automatically track Stripe payments } href="/integrations/webhooks/chargebee-webhook" > Track Chargebee subscriptions **Cello API** gives you full control over when and how to track conversions. Send events from your backend whenever a signup or purchase occurs. Follow 4 easy steps to get your referral program up and running with Cello using any CRM or payment gateway Send conversion events, validate referral codes, and manage referral links programmatically All integration methods support both sandbox and production environments, allowing you to test thoroughly before going live. # Salesforce Apex Triggers + Cello API Source: https://docs.cello.so/integrations/salesforce-apex-triggers This documentation guides you through the process of setting up Apex triggers in Salesforce to handle specific conditions related to Opportunities This documentation guides you through the process of setting up Apex triggers in Salesforce to handle specific conditions related to Opportunities. The exemplary trigger will be designed to execute when an Opportunity meets two criteria: 1. The opportunity moved to the stage `Proposal/Price Quote` 2. It has a value in the custom field `cello_ucc` Adjust according to your individual Salesforce setup and referral requirements Customize the code as needed based on your individual Salesforce setup. Cello requires at least a "demo done" event as well as a the revenue transactions of won opportunities. ### Apex Trigger Configuration ### 1. Create an Apex Trigger Find detailed documentation on [Apex triggers in the Salesforce docs](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm). Navigate to Setup in Salesforce and follow these steps,: * In the Quick Find box, type "Triggers" and select "Apex Triggers." * Click "New Trigger" to create a new trigger. ```apex trigger OpportunityTrigger on Opportunity (after update) { OpportunityHandler.handleOpportunityUpdate(Trigger.new); } ``` ### 2. Create an Apex Class Now, create an Apex class to handle the logic and API call. Implement the call to the [auto\$](/docs/cello-api) in the placeholder method `makeApiCall` in the below code. This configuration ensures that the Cello API is triggered when an Opportunity meets the specified criteria. Customize the code as needed based on your individual Salesforce setup, API requirements and endpoint. ```apex public class OpportunityHandler { public static void handleOpportunityUpdate(List updatedOpportunities) { for (Opportunity opp : updatedOpportunities) { // Check criteria: Opportunity in Proposal/Price Quote stage and cello_ucc value if (opp.StageName == 'Proposal/Price Quote' && opp.Cello_UCC__c != null) { // Make the API call makeApiCall(opp.Id, opp.Cello_UCC__c); } } } private static void makeApiCall(Id opportunityId, String celloUccValue) { // Your code to make the API call using HTTP methods, e.g., HttpRequest and HttpResponse // Example: // HttpRequest req = new HttpRequest(); // req.setEndpoint('your API endpoint'); // req.setMethod('POST'); // req.setHeader('Content-Type', 'application/json'); // req.setBody('{"opportunityId": "' + opportunityId + '", "celloUccValue": "' + celloUccValue + '"}'); // HttpResponse res = new Http().send(req); } } ``` ### 3. Test and Deploy * Test your trigger and class in the sandbox environment to ensure proper functionality. * Reach out to the Cello team to confirm that provided event data is correct. * Deploy the trigger and class to your production environment once testing is successful. Important Notes * **Bulk Processing**: Ensure that your Apex trigger can handle bulk updates, as Salesforce triggers operate in bulk. * **Error Handling**: Implement appropriate error handling in your Apex class to manage API call failures. # Chargebee Webhook Source: https://docs.cello.so/integrations/webhooks/chargebee-webhook Send signup and purchase events to Cello using Chargebee Webhook Cello makes it easy to **connect securely to your Chargebee payment provider** to automate transaction events, attribution, and payouts. Transactions are monitored and used to pay out referrers based on your campaign reward rules. # Overview A notification event is securely sent to Cello through the webhook endpoint every time a customer makes a purchase or a customer record is created or updated. Cello checks these events to perform the following actions: * Determine if a reward for the referrer needs to be created and paid out * Inform the referrer about new signups and rewards * Cancel recurring rewards if a subscription is cancelled If the automation of Cello detects unclear cases the automation will be paused and Cello will reach out to you to clarify the case. # Endpoint URLs You will find the webhook endpoint URL for both **Sandbox** and **Production** environments in the [Cello Portal Webhooks page](https://portal.cello.so/integrations/webhooks). # Securing the webhook To secure the webhook in Step 5, you will find credentials for both **Sandbox** and **Production** environments in [Cello Portal Webhooks page](https://portal.cello.so/integrations/webhooks). # Connecting Chargebee ## Prerequisites Before configuring webhooks, ensure your Chargebee customers include the required Cello attribution fields. These information enables proper attribution and reward tracking. **When to add additional fields:** * If you create Chargebee customers at signup → You would have already added metadata or custom fields to the customer during the [Setup Step "Track Signups"](/attribution/tracking-signups) * If you create Chargebee customers at purchase → Make sure to add metadata or custom fields when creating the customer ### Required Chargebee Customer attribution fields You can also choose to use **Chargebee custom fields (CF\_)** to add referral data to the event. Learn more about custom fields in the [**Chargebee documentation**](https://www.chargebee.com/docs/billing/2.0/site-configuration/custom_fields) Pass the following fields during checkout in the [Customer Object](https://apidocs.chargebee.com/docs/api/customers) to `metadata` attribute or as a `CF_` custom field. | Field | Description | Chargebee Object | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `cello_ucc` | Referral code identifying the referrer | [Customer Object](https://apidocs.chargebee.com/docs/api/customers) to `metadata` attribute or as a `CF_` custom field | | `new_user_id` | Your system's unique user ID. Same as `productUserId` used in [Referral Component](/referral-component/introduction) when booting the SDK | [Customer Object](https://apidocs.chargebee.com/docs/api/customers) to `metadata` attribute or as a `CF_` custom field | | `new_user_organization_id` | Organization ID (optional). Required only for organization-level referrals and rewards | [Customer Object](https://apidocs.chargebee.com/docs/api/customers) to `metadata` attribute or as a `CF_` custom field | | `coupon` | New user discount code | [Customer Object](https://apidocs.chargebee.com/docs/api/customers) to `metadata` attribute or as a `CF_` custom field | ## Steps You will add a webhook to your Chargebee configuration to connect Chargebee and Cello. This can be done in both test and production environments separately. Chargebee webhook configuration in Cello Portal From the sidebar, select Settings > Configure Chargebee and click on "Webhooks". Next Click on "+ Add Webhook". Choose the Endpoint URL corresponding to the environment you are setting up: **Sandbox** or **Production**. Select the events you want to send under "Events to Send": 1. `Customer Created`, `Customer Changed`, `Customer Deleted` 2. `Payment Succeeded`, `Payment Refunded`, `Payment Failed` Select "Protect webhook URL with basic authentication" and add the `product_id` and `secret` provided in the Cello Portal. Be sure to select **Exclude card Information from webhook call** Webhook created! # Stripe Webhook Source: https://docs.cello.so/integrations/webhooks/stripe-webhook Send signup and purchase events to Cello using Stripe Webhook Cello makes it easy to **connect securely to your Stripe payment provider** to automate transaction events, attribution, and payouts. Transactions are monitored and used to pay out referrers based on your campaign reward rules. # Overview A notification event is securely sent to Cello through the webhook endpoint every time a customer makes a purchase or a customer record is created or updated. Cello checks these events to perform the following actions: * Determine if a reward for the referrer needs to be created and paid out * Inform the referrer about new signups and rewards * Cancel recurring rewards if a subscription is cancelled If the automation of Cello detects unclear cases the automation will be paused and Cello will reach out to you to clarify the case. # Endpoint URLs You will find the webhook endpoint URL in the [Cello Portal Webhooks page](https://portal.cello.so/integrations/webhooks). # Connecting Stripe ## Prerequisites Before configuring webhooks, ensure your Stripe customers include the required Cello metadata. This metadata enables proper attribution and reward tracking. **When to add metadata:** * If you create Stripe customers at signup → You would have already added metadata to the customer during the [Setup Step "Track Signups"](/attribution/tracking-signups) * If you create Stripe customers at purchase → Make sure to add metadata when creating the customer ### Required Stripe Customer Metadata Pass the following fields during Stripe Checkout in the [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata) and [Checkout Session object](https://docs.stripe.com/api/checkout/sessions/object?api-version=2025-07-30.basil) | Field | Description | Stripe Object | | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `cello_ucc` | Referral code identifying the referrer | Stripe [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata), attribute:`metadata` | | `new_user_id` | Your system's unique user ID. Same as `productUserId` used in [Referral Component](/referral-component/introduction) when booting the SDK | Stripe [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata), attribute:`metadata` | | `new_user_organization_id` | Organization ID (optional). Required only for organization-level referrals and rewards | Stripe [Customer Object](https://docs.stripe.com/api/customers/object?api-version=2024-09-30.acacia#customer_object-metadata), attribute:`metadata` | | `coupon` | New user discount code | Stripe [Checkout Session object](https://docs.stripe.com/api/checkout/sessions/object?api-version=2025-07-30.basil), attribute: `discount` | ## Steps You will add a webhook to your Stripe configuration to connect Stripe and Cello. This can be done in both test and production environments separately. Select Developers from the upper right menu. Stripe webhook endpoint configuration in Stripe Dashboard You can find Webhooks at the left menu. Next click Add an endpoint. Adding Cello webhook endpoint URL in Stripe Dashboard Choose the Endpoint URL corresponding to the environment you are setting up: **Sandbox** or **Production**. Stripe webhook event selection for customer.created events To select events, do the following steps: 1. Select "Events on your account" 2. Select your latest API version 3. Choose events to send: 1. `charge.refunded`, `charge.succeeded`, `charge.updated` 2. `customer.created`, `customer.deleted`, `customer.updated` 3. `customer.subscription.created`, `customer.subscription.deleted`, `customer.subscription.updated` 4. `invoice.paid` Stripe webhook signing secret for authentication Webhook created! To secure the connection, you need to add the “Signing secret” to [Stripe Webhook Configuration in Cello Portal](https://portal.cello.so/integrations/webhooks). Stripe Webhook Signing secret starts with `whsec_` 1. Click “Reveal” and copy the Signing secret 2. Add the Signing secret to Stripe webhook settings in the [Cello portal](https://portal.cello.so/integrations/webhooks). Cello Portal webhook configuration for Stripe integration # Introduction Source: https://docs.cello.so/introduction Learn how to turn your users into your most valuable growth channel