HOW TO ALLOW ADVOCATES
MANAGE THEIR BONUSES

After your advocates start referring your services using your referral marketing program, they will start earning bonuses in Genius Referrals Platform, and chances are that they will like to redeem them very fast as cash, credit, or goods.
Note
So far, all bonuses earned by your advocates have been given in the Genius Referrals Platform. So, here is where your advocate decides where the bonuses must be moved to. If it is credit, you can add the credit to their local account in your application; if it is pay-out, you will have to transfer the bonuses to their Paypal account, and if it's good, you will have to give an item to the advocate.
i
We've created the tools that will allow your advocates to manage their bonuses easily and allow you to manage your advocate's bonuses redemption requests easily as well. You can use one of our SDKs or RESTful API to let your advocates manage their bonuses and manage your advocate's redemption requests. Also, you can use the Admin Portal to manage payouts.

The image below shows an example of the referral marketing program implemented in the Genius Referrals Platform.

Redeeming the bonuses you've earned with your referral marketing program
As you can see you can let your advocates decide what to do with their bonuses. You can:
  • Allow them to redeem the bonuses as credit that you can add to their local account in your application.
  • Allow them to redeem the bonuses as cash. For this, they will have to set up a Paypal account (payment method), and you will have to process the redemption requests manually on our Admin Portal.
  • Allow them to redeem the bonuses as goods. For this, you should pass as a description on your redemption request a reference of the good you want to give to the advocate. For example, many stores like to give gift cards to their customers as rewards. In this case, you could let your advocates exchange their bonuses for a gift card. So, on your redemption request, you can pass the gift card UPC as a reference, and then once you successfully processed the request on the Control Center, take that UPC and send the user by mail the proper gift card linked to the UPC code.
Find here the list of our redemption requests actions.
i
If you want to allow your advocate to redeem your bonuses as cash (pay-out) your advocate needs to have a PayPal account active on the Genius Referrals Platform. For allowing the advocate to add a Paypal account, we use the method postAdvocatePaymentMethod(...) to create the new payment method and the method getAdvocatePaymentMethods(...) to display the list of payment methods.
i
Heads up
Also, we have two sample applications that you can see and integrate into action. Download this sample app here.
Example using the PHP SDK:

 /*
     * On your action method just do something like this
     */

    //the advocate token of the customer that wants to add a paypal account
    $strGRAdvocateToken  = '44ae47f4eda382a8f5830b78fedb7cf1de88981b0'; 

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');

    //preparing the data to be sent on the request
    $arrParams = array(
        'advocate_payment_method' => array(
            'username'       => 'john@mail.com',
            'description'    => 'Personal Paypal account', 
            'is_active'      => true
        )
    );
    //trying to create a new paypal account for the advocate
    $strResponse = $objGeniusReferralsAPIClient->postAdvocatePaymentMethod('my-store', $strGRAdovocateToken, $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){
        // Paypal account successfully created
    }
    else{
        // handle errors
    } 
To allow the advocate to redeem his bonuses you can use the method postRedemptionRequest(...) that creates a new redemption request that can be processed later using the method or be processed in the Admin Portal by one of your accounts managers. Once the request is been completed the advocate will receive the bonuses in the form he has requested (credit, cash or goods). The example below shows the details.
Handling the redemption requests fully on your application
You can process the redemption requests in your application by using one of our SDKs. This means that you can create and process the requests directly in your system without going to our Control Center. You can use the method patchRedemptionRequestRedemption(...) to approve and complete the redemption request.
i
Example using the PHP SDK:

  /*
     * On your action method just do something like this
     */

    //the advocate token of the customer that wants to redeem his bonuses
    $strGRAdvocateToken  = '44ae47f4eda382a8f5830b78fedb7cf1de88981b0'; 

    // Create a new GRPHPAPIClient object
    $objGeniusReferralsAPIClient = new GRPHPAPIClient('YOUR_USERNAME', 'YOUR_API_TOKEN');
    
    //preparing the data to be sent on the request
    $arrParams = array(
        'redemption_request' => array(
            'advocate_token'            => $strGRAdovocateToken,
            'request_status_slug'       => 'requested', 
            'request_action_slug'       => 'credit',
            'currency_code'             => 'USD',
            'amount'                    => 50,
            'description'               => 'Redeeming as credit'
        )
    );
    
    //trying to create a new redemption request for the advocate
    $strResponse = $objGeniusReferralsAPIClient->postRedemptionRequest('my-store', $arrParams); 
    $intResponseCode = $objGeniusReferralsAPIClient->getResponseCode();
    if($intResponseCode == 201){
        // Redemption request successfully created
    }
    else{
        // handle errors
    } 
Displaying information about bonuses is very easy, and you can quickly access it by getting the advocate using the method getAdvocate(...) with one of our SDKs check out here an example of the response we will get. In the response, the parameter claimed_balance represents the number of bonuses the advocate has already redeemed, the parameter unclaimed_balance represents the redeemable amount.
LANGUAGE