npm package: @stagetheproindia/react-rewardrally
Description: Ultimate Gamification for your React app.
Latest version: 1.0.41

# Reward Rally - Platform that leverages gaming techniques to motivate user participation, engagement, and collaboration.

- [Prerequisites](#Prerequisites)
- [Usage](#usage)
- [Installation](#Installation)
- [Usage](#Usage)
- [License](#License)
- [Keywords](#Keywords)

# Prerequisites

### Reward Rally Account:

To register for an account on <a href="https://www.rewardrally.in/">Reward Rally</a>, Please reach out to us via phone call (+91 8925841838) or send an email to the specified email address contact@rewardrally.in Once you've contacted us, we will proceed to create an account for you to continue with the process.

Reward Rally Account:

- Your organization name
- Organisation Email address
- Username
- Phone number

We will generate a client Id and secret key for your organization. The users you provide should be the individuals who will be accessing the admin panel for configuration purposes. We will create your an admin with the given phone number to access the Reward Rally account for your organization.

Please note that integration requires an active Reward Rally account, and you should have the necessary login credentials for your Reward Rally account.

## Installation

Install @stagetheproindia/react-rewardrally with npm

```bash
npm install @stagetheproindia/react-rewardrally
```

## Usage

- Place the following tag in your HTML file where you want the leaderboard to be rendered.Pass the required parameters such as userId and appId (Application Id) and corresponding client Id and client secret

  ```bash
  import { RewardRally } from "@stagetheproindia/react-rewardrally";
     <RewardRally
  		userId={<UserId>}
  		applicationId={<ApplicationId>}
  		clientId={<ClientId>}
  		clientSecret={<ClientSecret>}
  	 />
  ```

- import the updateGameAction() from "@stagetheproindia/react-rewardrally"

  ```bash
  import { updateGameAction } from "@stagetheproindia/react-rewardrally";
  ```

- Call the updateGameAction() function from "@stagetheproindia/react-rewardrally" to update score in the user leaderboard.
  pass the required parameters such as userId and gameActionId.
  get the GameActionId via configuration panel.

  ```bash
  	updateGameAction(
  	 env.userId,
  	 env.gameAction,
  	 env.correspondingUserId (optional),
       env.correspondingUserApplicationId (optional)
      );

  ```

## Spin Wheel Component

- The Reward Rally platform includes an interactive Spin Wheel component that can be configured through the Reward Rally Admin Panel. Users can spin the wheel to win various rewards.

- Using the Spin Wheel

```
import { RewardRallySpinWheel } from "@stagetheproindia/react-rewardrally";

<RewardRallySpinWheel
  onSpinComplete={(result) => handleSpinResult(result)}
  applicationId={<ApplicationId>}
/>
```

- The spin wheel returns the winning result as an object with the following structure:

```
{
  "label": "10% OFF",
  "type": "Coupons",
  "value": "WERD73"
}
```

## Security Reporting

If you find a security issue with our libraries or services please report it to contact@rewardrally.in with as much detail as possible. We will contact you shortly upon receiving the information.

## License

Copyright (c) Peninsular Research Operation. All rights reserved.

## Contact

For questions, issues, or feedback, please contact <a href="https://www.rewardrally.in/contact-us/">Reward Rally</a>

## Keywords

RewardRally Gamification NPM angular User engagement and retention increase customer retention Employee engagement Employee retention Gamification blogs increase customer engagement