API: Setting up Custom Event Types
In this article we will go through the process of creating your custom event type and defining how the event will be displayed in your admin feed and how it will be displayed to an advocate.
What is a Custom Event Type?
AdvocateHub has many event types, such as; "Completed Challenge," "Earned a Badge," "Redeemed a reward," etc. A custom event type can be created if you wish to log activities which were completed in an external platform or website. These events can be used to earn badges and perks, or to complete API stages in a challenge.
Setup a Custom Event Type in Influitive
1. Go to the Settings > Scoring & Achievements > Event Types
2. Click on the Add an Event Type button.
3. In the "Add an Event Type" pop up, configure your event type.
Name: This will appear in the list of event types (in Settings > Scoring & Achievements > Event Types)
API Code: This is the event type API code. It must be include in the JS which is sent to Influitive in order to identify the type of event being completed in the external platform.
- Description: This is how the event will appear in your admin event feed.
- Show on advocate profile: Check this box if you want the activity to be visible to the advocate as well.
As an example - when an event is logged - the dashboard's event feed will display that event so administrators can have a 360 degree view of advocate activity. Even when that activity takes place in another system.
Notifications: If you have opted to show the event on the advocate profile, you can configure the notification message advocates will see upon completion of this event.
4. Save your changes and this event type is ready to be used in your Hub.