Version: 1.0.0

Gamification - Remote Events

Often, for a gamification process that fits your needs, Potion Events are not enough. With these custom events, you can gather any event that happens on your applications and that matter to you and yous users.


Introducing the custom event concept

To use a custom event as a condition in rule creation, you have first to create a RemoteEventTypeAPI in your project's administration interface under the gamification section.

This remote event type serves as a category for the events you will soon send to Potion. The event could be anything you want and match your application usage from sending the action of buying something (with or without an amount to analyse) to a page visited by an user, etc

As soon as your create that remote event type, it will appear as an available conditions in the Rule creation interface. As classic events, it will be fetch and will be part of the badge obtention check.

A RemoteEventTypeAPI can also have a number of points that will be given to the user every time a RemoteEventAPI is sent for him.

Sending RemoteEvents

Now that you have at least on RemoteEventTypeAPI, you can start sending RemoteEventAPI for your user.

You need to reference the remote event type linked to the event you will trigger with the remote_event_type_uid parameter. And the unique id of the user related to it with the user_id parameter.

It's achieved with an HTTP POST request to https://YOUR_PROJECT_DOMAIN.potion.social/public-api/v1/remote_events