A refer a friend programme on a website, holding how referrals are sent, activated, rewarded and fraud checked. The programme decides which referral methods members can use to invite someone, what an invited person has to do before the referral counts as activated, and what the referrer and the referee each receive for it. Those method settings are held as JSON naming the method and its options, and are read by the referral app rather than by the platform. Fraud factors and the three score thresholds let an acceptance be flagged or rejected automatically. The linked reward supplies the promotion the referral is made against, and the redirect settings control where someone following a referral link is sent.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| activationMethod | String | What an invited person has to do before the referral counts as activated, held as JSON naming the method, such as making a purchase or joining a group, along with its settings. Read by the referral app, not by the platform. |
| activationRejectionScore | Double | Fraud score above which an acceptance is rejected at activation time. Null turns the check off, and it is checked before the warning threshold. |
| activationWarningScore | Double | Fraud score above which an acceptance is flagged for review at activation time rather than rejected. Null turns the check off. |
| createdDate | Date | When this programme was created. Programme listings are ordered by it, newest first. |
| enableRedirectLink | Boolean | Whether someone following a referral link is redirected on to another page rather than staying on the referral page. Can be null, which is treated as not enabled. |
| fraudFactors | String | The fraud checks applied to an acceptance, held as a JSON list of factors and their settings. Each factor contributes to the score which is then compared against the rejection and warning thresholds. |
| id | long | Unique database identifier for this referral programme. |
| initialRejectionScore | Double | Fraud score above which an acceptance is rejected as soon as it is made. Null turns the check off, and the comparison is strictly greater than, so a score equal to the threshold is allowed through. |
| multiAccept | boolean | Whether one invitation can be accepted by more than one person. False, the default, allows a single acceptance per invitation, which is what a personal invite normally wants; true suits a shared referral link. |
| name | String | Short, path safe identifier for the programme, unique within the admin organisation and used to look it up. Use the title for anything shown to a member. Up to 200 characters. |
| promotion | Reward | The reward acting as the promotion this programme refers people to, which supplies its dates and eligibility rules. Can be null for a programme with no promotion behind it. |
| redirectButtonText | String | Label on the button which takes the member to the redirect target. Up to 200 characters. |
| redirectLink | String | The address someone following a referral link is sent on to when the redirect is enabled. Up to 500 characters. |
| redirectMessage | String | Message shown alongside the redirect, for example explaining where the member is being taken. Up to 2000 characters. |
| redirectToPromotionDetail | Boolean | Whether someone following a referral link lands on the promotion's detail page instead of the programme's own landing page. Can be null, in which case the referral app falls back to its own default. |
| refereeIncentMethod | String | What the person who was referred receives, held as JSON naming the incentive method, for example awarding points, along with its settings. Read by the referral app, not by the platform. |
| refererIncentMethod | String | What the member who made the referral receives, held as JSON naming the incentive method and its settings. Note the single r spelling of referer in this property name; getReferrerIncentMethod is an alias for it. |
| referralGroup | String | Name of the user group people who accept a referral are put into, which is also the group whose extra fields the referral form collects. It is the group's name, not its id, and can be null when no group is used. |
| referralMethods | String | The ways a member is allowed to make a referral, as a comma separated list of method names such as "email" and "link". The referral app decides what each name means, so the platform does not validate them. |
| referrerIncentMethod | String | What the member who made the referral receives, as JSON. This is an alias for the referer incentive method, spelled with the double r, and returns exactly the same value. |
| title | String | Free text display label for the programme, shown to members. It carries none of the uniqueness or path safety of the name. |
| website | Website | The website the programme runs on, which is where referral links point and where the referral pages live. Can be null for a programme not tied to a single website. |
Methods
getId() · setId(long id) · setOrganisation(Organisation organisation) · getWebsite() · setWebsite(Website website) · getName() · setName(String name) · getTitle() · setTitle(String title) · getCreatedDate() · setCreatedDate(Date createdDate) · isMultiAccept() · setMultiAccept(boolean multiAccept) · getPromotion() · setPromotion(Reward promotion) · getReferralMethods() · setReferralMethods(String referralMethods) · getActivationMethod() · setActivationMethod(String activationMethod) · getRefereeIncentMethod() · setRefereeIncentMethod(String refereeIncentMethod) · getRefererIncentMethod() · setRefererIncentMethod(String refererIncentMethod) · isEnableRedirectLink() · setEnableRedirectLink(Boolean enableRedirectLink) · getRedirectLink() · setRedirectLink(String redirectLink) · getRedirectMessage() · setRedirectMessage(String redirectMessage) · getRedirectButtonText() · setRedirectButtonText(String redirectButtonText) · getReferralGroup() · setReferralGroup(String referralGroup) · getReferrerIncentMethod() · getFraudFactors() · setFraudFactors(String fraudFactors) · getInitialRejectionScore() · setInitialRejectionScore(Double initialRejectionScore) · getActivationWarningScore() · setActivationWarningScore(Double activationWarningScore) · getActivationRejectionScore() · setActivationRejectionScore(Double activationRejectionScore) · isRedirectToPromotionDetail() · setRedirectToPromotionDetail(Boolean redirectToPromotionDetail)
getId()
Returns: long
Unique database identifier for this referral programme.
setId(long id)
Returns: void
Sets the database identifier. The database assigns this when the programme is first saved, so it is not normally set by hand.
| Parameter | Description |
|---|---|
id | the primary key to use |
setOrganisation(Organisation organisation)
Returns: void
Sets the admin organisation which owns this programme.
| Parameter | Description |
|---|---|
organisation | the owning admin organisation |
getWebsite()
Returns: Website
The website the programme runs on, which is where referral links point and where the referral pages live. Can be null for a programme not tied to a single website.
setWebsite(Website website)
Returns: void
Sets the website the programme runs on.
| Parameter | Description |
|---|---|
website | the website the programme runs on |
getName()
Returns: String
Short, path safe identifier for the programme, unique within the admin organisation and used to look it up. Use the title for anything shown to a member. Up to 200 characters.
setName(String name)
Returns: void
Sets the programme's name. Keep it path safe and unique within the organisation, because it is the lookup key.
| Parameter | Description |
|---|---|
name | the new name |
getTitle()
Returns: String
Free text display label for the programme, shown to members. It carries none of the uniqueness or path safety of the name.
setTitle(String title)
Returns: void
Sets the display title shown to members.
| Parameter | Description |
|---|---|
title | the new display title |
getCreatedDate()
Returns: Date
When this programme was created. Programme listings are ordered by it, newest first.
setCreatedDate(Date createdDate)
Returns: void
Sets the creation timestamp.
| Parameter | Description |
|---|---|
createdDate | when the programme was created |
isMultiAccept()
Returns: boolean
Whether one invitation can be accepted by more than one person. False, the default, allows a single acceptance per invitation, which is what a personal invite normally wants; true suits a shared referral link.
setMultiAccept(boolean multiAccept)
Returns: void
Sets whether one invitation can be accepted more than once.
| Parameter | Description |
|---|---|
multiAccept | true to allow several acceptances per invitation |
getPromotion()
Returns: Reward
The reward acting as the promotion this programme refers people to, which supplies its dates and eligibility rules. Can be null for a programme with no promotion behind it.
setPromotion(Reward promotion)
Returns: void
Sets the promotion the referrals are made against.
| Parameter | Description |
|---|---|
promotion | the reward acting as the promotion, or null for none |
getReferralMethods()
Returns: String
The ways a member is allowed to make a referral, as a comma separated list of method names such as "email" and "link". The referral app decides what each name means, so the platform does not validate them.
setReferralMethods(String referralMethods)
Returns: void
Sets the ways a member is allowed to make a referral.
| Parameter | Description |
|---|---|
referralMethods | the enabled referral methods as a comma separated list |
getActivationMethod()
Returns: String
What an invited person has to do before the referral counts as activated, held as JSON naming the method, such as making a purchase or joining a group, along with its settings. Read by the referral app, not by the platform.
setActivationMethod(String activationMethod)
Returns: void
Sets the activation method configuration.
| Parameter | Description |
|---|---|
activationMethod | the activation method configuration as JSON |
getRefereeIncentMethod()
Returns: String
What the person who was referred receives, held as JSON naming the incentive method, for example awarding points, along with its settings. Read by the referral app, not by the platform.
setRefereeIncentMethod(String refereeIncentMethod)
Returns: void
Sets what the person who was referred receives.
| Parameter | Description |
|---|---|
refereeIncentMethod | the referee incentive configuration as JSON |
getRefererIncentMethod()
Returns: String
What the member who made the referral receives, held as JSON naming the incentive method and its settings. Note the single r spelling of referer in this property name; getReferrerIncentMethod is an alias for it.
setRefererIncentMethod(String refererIncentMethod)
Returns: void
Sets what the member who made the referral receives.
| Parameter | Description |
|---|---|
refererIncentMethod | the referrer incentive configuration as JSON |
isEnableRedirectLink()
Returns: Boolean
Whether someone following a referral link is redirected on to another page rather than staying on the referral page. Can be null, which is treated as not enabled.
setEnableRedirectLink(Boolean enableRedirectLink)
Returns: void
Sets whether someone following a referral link is redirected on to another page.
| Parameter | Description |
|---|---|
enableRedirectLink | true to enable the redirect |
getRedirectLink()
Returns: String
The address someone following a referral link is sent on to when the redirect is enabled. Up to 500 characters.
setRedirectLink(String redirectLink)
Returns: void
Sets the address someone following a referral link is sent on to.
| Parameter | Description |
|---|---|
redirectLink | the redirect target address |
getRedirectMessage()
Returns: String
Message shown alongside the redirect, for example explaining where the member is being taken. Up to 2000 characters.
setRedirectMessage(String redirectMessage)
Returns: void
Sets the message shown alongside the redirect.
| Parameter | Description |
|---|---|
redirectMessage | the redirect message |
getRedirectButtonText()
Returns: String
Label on the button which takes the member to the redirect target. Up to 200 characters.
setRedirectButtonText(String redirectButtonText)
Returns: void
Sets the label on the redirect button.
| Parameter | Description |
|---|---|
redirectButtonText | the redirect button label |
getReferralGroup()
Returns: String
Name of the user group people who accept a referral are put into, which is also the group whose extra fields the referral form collects. It is the group's name, not its id, and can be null when no group is used.
setReferralGroup(String referralGroup)
Returns: void
Sets the name of the user group people who accept a referral are put into.
| Parameter | Description |
|---|---|
referralGroup | the name of the referral group |
getReferrerIncentMethod()
Returns: String
What the member who made the referral receives, as JSON. This is an alias for the referer incentive method, spelled with the double r, and returns exactly the same value.
getFraudFactors()
Returns: String
The fraud checks applied to an acceptance, held as a JSON list of factors and their settings. Each factor contributes to the score which is then compared against the rejection and warning thresholds.
setFraudFactors(String fraudFactors)
Returns: void
Sets the fraud checks applied to an acceptance.
| Parameter | Description |
|---|---|
fraudFactors | the fraud factor configuration as JSON |
getInitialRejectionScore()
Returns: Double
Fraud score above which an acceptance is rejected as soon as it is made. Null turns the check off, and the comparison is strictly greater than, so a score equal to the threshold is allowed through.
setInitialRejectionScore(Double initialRejectionScore)
Returns: void
Sets the fraud score above which an acceptance is rejected immediately.
| Parameter | Description |
|---|---|
initialRejectionScore | the score threshold, or null to turn the check off |
getActivationWarningScore()
Returns: Double
Fraud score above which an acceptance is flagged for review at activation time rather than rejected. Null turns the check off.
setActivationWarningScore(Double activationWarningScore)
Returns: void
Sets the fraud score above which an acceptance is flagged for review at activation.
| Parameter | Description |
|---|---|
activationWarningScore | the score threshold, or null to turn the check off |
getActivationRejectionScore()
Returns: Double
Fraud score above which an acceptance is rejected at activation time. Null turns the check off, and it is checked before the warning threshold.
setActivationRejectionScore(Double activationRejectionScore)
Returns: void
Sets the fraud score above which an acceptance is rejected at activation.
| Parameter | Description |
|---|---|
activationRejectionScore | the score threshold, or null to turn the check off |
isRedirectToPromotionDetail()
Returns: Boolean
Whether someone following a referral link lands on the promotion's detail page instead of the programme's own landing page. Can be null, in which case the referral app falls back to its own default.
setRedirectToPromotionDetail(Boolean redirectToPromotionDetail)
Returns: void
Sets whether someone following a referral link lands on the promotion's detail page.
| Parameter | Description |
|---|---|
redirectToPromotionDetail | true to send the visitor to the promotion detail page |