Rewarding activity in other systems
You can award users badges for completing activity in other systems that are reachable by URL from your community.For example, you might want to award a badge when a user completes their annual security training in your security application.
Remote badging relies on a custom event (eventId
) that tracks activity in the remote system. Completing a custom event can be done manually (by clicking a link in the quest interface), by visiting a specified URL, or automatically by a callback from the remote system when the user completes a task there. The callback from the remote system is then specified as a POST request in Jive.
To set up rewarding activities in other systems:
-
Go to the Rewards Console.
-
Mark the custom event as completed by sending a POST request to the following URL:
POST http://rewards.jivesoftware.com/api/tenants/{tenantId}/events/{eventId}/complete/users/{userId}
The
userId
here is the user email address. Replace{userId}
with the email of the user to reward. The request's body should contain the data provided in Step 3.Note: The
tenantId
, theeventId
(custom event), and the secret will be provided when the quest is created. -
The JS will look like this:
jQuery.ajax( {
url: 'http://rewards.jivesoftware.com/api/tenants/' + tenantId + '/events/' + eventId +'/complete/users/' + userId,
type: 'POST',
data: secret,
success: function( response ) {
// response
}
} );