HomeGuidesDeveloper HubRelease Notes
Get supportBook a chat
Developer Hub
These docs are for v2.152. Click to read the latest docs for v2.208.

Challenge & Mission Rewarding

Right before you finish creating a Challenge or a Mission, you’re expected to set a reward that will be given to the member if they accomplish the mission or challenge objective. However, you'll see that only some options are available by default: currencies, instant rewards and badges, which work in a specific way that cannot be much customized.

However, you can customize Additional Rewarding, which will expand the ways that you can reward members for performing as expected.

You could, for example, have a mission that will reward members just for subscribing to your program. The mission would have the criteria of the member being created and related to the program; as soon as the person enrolls, they would receive a voucher, a coupon, a reward bundle, etc.

In short, the *Additional Rewarding method gives to you the opportunity to create more manageable rewards. To create it, follow the steps below:

Create Apex Class

In your Org, go to Setup and search for Apex Classes in the Quick Find box. Click New, add your class.

//This class implements FieloPLT.ChallengeMemberDelivery interface. 
//Class method attribute must be a list of Challenge Members (FieloPLT__ChallengeMember__c). 

global with sharing class CustomRewardingClass implements FieloPLT.ChallengeMemberDelivery{

	public void deliveryRewards(List<FieloPLT__ChallengeMember__c> challengeMembers){
		//Add custom functionality here
  }
}

Once the class has been created, you’ll need to add it as one of the options of the page.

Adding the custom action to the reward page

Still on Setup, click on the Object Manager tab and look for Rewarding.

On the right menu, click on Fields and Relationships and look for the Reward Delivery Class field. Under Values, click New. Enter the name of the Apex class you've created (e.g. CustomRewardingClass) and click Save.

Your class will now be available to assign as an additional rewarding.