Web Integration

Web Implementation Guide for FTP Support

Setting up LucraClient to handle a user claiming a reward

type LucraReward = {
  rewardId: string;
  title: string;
  descriptor: string;
  iconUrl: string;
  bannerIconUrl: string;
  disclaimer: string;
  metadata: unknown;
};
type LucraClaimRewardBody = { reward: LucraReward };

new LucraClient({
  // other initialization params omitted
  onMessage: {
    // other handlers omitted
    claimReward: (data: LucraClaimRewardBody) => {
      // When a Lucra user is claiming a reward, Lucra will notify the user that their 
      // reward is being processed
      // When receiving this message, we recommend taking the user somewhere on the 
      // tenant's site to redeem the reward
    }
  },
});

Letting Lucra know about current FTP Rewards

Last updated