# How to Build Braze Segments from GrowSurf Referral Data > Build Braze segments from GrowSurf referral counts, referral status, and milestone progress, then personalize each message with Liquid. - URL: https://growsurf.com/integration-guides/braze-referral-segment-targeting/ --- [← View All Guides](/integration-guides/) Turn synced referral attributes into Braze segments so advocates, stalled referrers, and reward earners each get their own message. Want the full setup walkthrough? Use these docs for exact setup steps, supported fields, and troubleshooting. [GrowSurf Braze setup guide](https://docs.growsurf.com/integrations/braze) [Braze guide to creating a segment](https://www.braze.com/docs/user_guide/engagement_tools/segments/creating_a_segment/) Once GrowSurf is syncing to Braze, every user profile carries the participant’s referral counts, referral status, and milestone progress. Those are ordinary Braze custom attributes, so you can filter on them in the segment builder like any other profile field. This guide covers the three segments most referral programs need first, and how to personalize the messages you send to them. ## Integration Steps ### Connect Braze so the attributes exist The Braze REST endpoint dropdown and API key field in GrowSurfConnect Braze in Program Editor > 4. Options > Integrations before you build segments. Segments can only filter on attributes that are already on the profile. Connect Braze with a `users.track` key, let the first participants sync, then build the segment. ### Create the segment in Braze In Braze, open **Audience > Segments** and select **Create Segment**. Add a filter, choose the `grsf_` attribute you want, pick an operator, and enter the value. Combine filters with AND / OR to narrow the audience. ### Start with these three segments - **Never shared.** `grsf_total_referral_count` equals `0`. These people joined and stopped. A reminder carrying their link gives them the one thing they need to start. - **Active referrers.** `grsf_total_referral_count` is greater than `0`. Show them progress and what the next reward is worth. - **Waiting on a reward.** `grsf_referral_status` equals `CREDIT_PENDING`. Tell them what still has to happen before the credit lands, so support does not have to. If your program uses milestone rewards, a fourth segment on `grsf_next_milestone` existing lets you send “you are one referral away” messages without writing that copy per person. ### Keep the source values in GrowSurf Reward rules, milestone text, and the referral link itself are all configured on the GrowSurf side. Change them there and the next sync carries the new values into your Braze segments. ## Code Snippets Personalize the message the segment receives with Liquid: ``` {% if custom_attribute.${grsf_total_referral_count} > 0 %}

You have {{custom_attribute.${grsf_total_referral_count}}} referrals. {{custom_attribute.${grsf_next_milestone}}}

{% else %}

Share your link and earn your first reward:

{% endif %} {{custom_attribute.${grsf_share_url}}} ``` ## Tips #### Segment on counts, personalize on the link Referral counts make good segment boundaries. `grsf_share_url` should be in the message body of every one of them — it is the only field that turns an open into a share. #### Milestone text is only there when you use milestones `grsf_next_milestone` is populated on programs with milestone rewards and Next Milestone text set. On other programs it stays empty, so give the Liquid tag a fallback. #### Let referral status carry the support answer `CREDIT_PENDING` means the reward has not been awarded yet. A message keyed off that value answers “where is my reward?” before it reaches your inbox. Recommended Guides [Braze logo How to Sync GrowSurf Referral Data to Braze User Profiles Connect Braze once, and every participant’s referral link, referral counts, and milestone progress stays current on their Braze profile. View Guide →](/integration-guides/braze-referral-attribute-sync/) [Intercom logo How to Segment Intercom Users by Referral Activity with GrowSurf Use GrowSurf-synced Intercom custom data to build referral-aware audiences and reuse them across Intercom messages. View Guide →](/integration-guides/intercom-referral-customer-segments/) [Mailchimp logo How to Segment Your Mailchimp Audience by Referral Activity with GrowSurf Use GrowSurf fields inside your Mailchimp Audience to create segments for new participants, active referrers, and people close to a reward. View Guide →](/integration-guides/mailchimp-referral-audience-segments/) ## FAQ #### Which Braze filter type are the GrowSurf fields? They are custom attributes. Ten are strings and five are numbers, so number attributes support greater-than and less-than operators as well as equals. #### How soon does a segment pick up a new referral? GrowSurf syncs the profile when the participant’s referral data changes, so the attribute is current as soon as Braze processes the update. #### Can I exclude people who already got their reward? Yes. Filter `grsf_referral_status` to exclude `CREDIT_AWARDED`, and require the attribute to exist so profiles without it are not swept in. ## Turn word of mouth into steady growth from your customers Launch a refer-a-friend or affiliate program that lowers your acquisition costs and builds customer loyalty, with little engineering work. [Launch Your Program](https://app.growsurf.com/signup) 14-day free trial No credit card required Trusted by marketing and product teams that grow through customer, user, and partner referrals. ## Built for lean teams, scaled for category leaders Thanks. You're signed up. Something went wrong. Please try again.