Welcome Message

A welcome​ ​message​, as the name suggests, is a greeting message ​that gets displayed to​ ​a new customer​ ​upon installing and launching an organization’s app for the first time after clicking on a referral link sent by another existing customer. The existing customer who shared the referral link that installs the app, is usually a friend or acquaintance of the new customer. The welcome message gets displayed within a tiny popup.

Read the below steps to launch the different components of Referral program

Show Welcome Message

Show​ ​a welcome​ ​message​ ​to​ ​the customer​ ​if​ ​he​ ​comes​ ​through​ ​a referral​ ​of​ ​his​ ​friend.

invitereferrals.showWelcomeMessage();

// Example
invitereferrals.showWelcomeMessage();
Invitereferrals.shared.welcomeMessage();

//Example 
Invitereferrals.shared.welcomeMessage();
InviteReferrals.showWelcomeMessage();

//Example
InviteReferrals.showWelcomeMessage();

Get Referrer Code

A referrer code refers to the unique combination of numbers and letters which is assigned by the brand to its customers which they can share as a referral code to their friends and acquaintances.

This function will provide referrer code in callback, if it's available in the SDK.

Show​ ​welcome​ ​message​ ​to​ ​customer​ ​if​ ​he​ ​comes​ ​through​ ​referral​ ​of​ ​his​ ​friend.

invitereferrals.getReferrerCode(function (data) {
   console.log("callback response : " + data);
});
Invitereferrals.shared.getReferrerCode().then((value) {
       // do your useful task
 });
InviteReferrals.getReferrerCode(callback);

//Example
InviteReferrals.getReferrerCode(this.success);
Note:- success and error callback functions are like this. 
  success(response){
       // do your code
  }

Get Referring Params

This function is a return type function, which provides JSON data in return. It has all UTM data, if it is captured from the application.

invitereferrals.getReferringParams(function (data) {
   console.log("callback response : " + data);
});


//Example
invitereferrals.getReferringParams(function (data) {
   console.log("callback response : " + data);
});
Invitereferrals.shared.getReferringParams().then((value){
    // referring parameters in JSON String
});

//Example 
Invitereferrals.shared.getReferringParams().then((value) {
        // do your task
});
InviteReferrals.getReferringParams(successCallback);

//Example
InviteReferrals.getReferringParams(this.success);

//Note:- success and error callback functions are like this. 
 success(response){
   // do your code
 }

Response

{
   "ir_code":"MGB9Q7HR",
   "utm_campaign":"Default_Campaign",
   "utm_medium":"others",
   "ir_ref":"xxxxxxx-xxx-xxxx-xxxx-xxx-xxxx-xxx-xxxx-xxxx-xxx",
   "utm_source":"invitereferrals",
   "utm_content":"50763857"
}

Show Pop-Up

This method is used when you want to show, how it works or terms & conditions content in your app’s screen. Pop-up will be shown in alert dialog box in your screen.

invitereferrals.showPopUp((String)rule, (int)CampaignId);

//Example
invitereferrals.showPopUp("tnc", 27990);
Invitereferrals.shared.showPopUp((String)rule, (int)CampaignId);

//Example
Invitereferrals.shared.showPopUp("tnc", 27990);
Invitereferrals.showPopUp((String)rule, (int)CampaignId);

//Example
Invitereferrals.showPopUp("tnc", 27990);

Parameters :

ParameterDescriptionValue
PopUp (string)Call to action button on which user will click and converte.g. START
Campaign id (integer)Unique identification number of the campaign25XXXX