Follow

Widgets Simulator

You can use the Widgets Simulator page to test your gamification strategies before integrating the Mambo Platform into a 3rd party application. This article explains how to configure the Widgets Simulator in order to test your gamification strategy.

Where is it?

In order to access the widgets simulator page, please visit the following address: Widgets Simulator. On the right hand side of the page you will notice the Actions bar, this is broken down into it's relevant sections in the rest of the article.

Basic Settings

The Basic Settings are used to show the widgets. These are the minimum settings you need to provide for the simulator to work. Below is a list of all the inputs and where to find the information in the Mambo Administration Panel:

  • Approved URLs: in order for the simulator page to work we must first allow JavaScript calls from the simulator page. Navigate to Development > Approved URLs and add api.mambo.io* to the Add Url box then hit the Save button.
  • JavaScript API Key: navigate to Development > API Keys. The last key in the bottom right hand corner of the page is the one you will need. Copy it and paste it into the relevant box in the Action bar.
  • Site URL: navigate to Configuration > Sites. Choose from the list the URL of the site you want to simulate with the widgets. Copy and paste the URL into the relevant box in the Action bar.
  • User UUID: navigate to Users > Details. The details page can be accessed by hovering on a user and selecting Details. In the details page you will find a UUID field, copy the one for the user you wish to use and paste it into the relevant box in the Action bar.
  • Theme Colour: choose a theme colour from the list. You can change this whenever you like.
  • Save: once you have filled in all the boxes, hit the Save button and the widgets should render. If they don't, please see the note below.

Note: the widgets require you to configure the sandbox so that it allows requests made from the Mambo domain. To do this navigate to Developers > Approved URLs and add api.mambo.io* to the box and click Save.

Profile Widget

The Profile Widget has some additional configuration options to allow you to modify the widget without writing any code. The areas for configuration are broken down in the list below:

  • Level Groups: this allows you to group Levels by a specific tag. You can add multiple level groups and for each you will need to specify:
    • Label: this is any value you want and will be the label for this group of levels.
    • Tags: this is a comma separated list of tags that you would like to group under the label specified above. In order to use Level Groups correctly, make sure you have added tags to the relevant levels in the Administration Panel.
    • isPrimary: selecting a level group as primary will use this level group as the main levels for the widget. The main levels are the ones displayed between the user's points and the trophy case in the Profile Widget.
  • Tabs: this option allows you to enable / disable individual tabs.
    • Custom: this allows you to create a custom tab in the Profile Widget. The tab has a title (which will be used as the label of the tab) and a list of one or more comma separated tags.
  • Save: click save to apply your changes to the Profile Widget

Behaviour Activity

The Behaviour Activity section allows you to track behaviours directly from the JavaScript widgets and see any Notifications / Toaster popups associated to the behaviour you performed. Please see below how to setup and use the Behaviour Activity section:

  • Pre-requisite: before being able to track a behaviour through the JavaScript widgets, you will need to enable the relevant security options. Navigate to Configuration > Security and select On for Create Behaviours. Then navigate to Configuration > Behaviours, hover over the relevant behaviour, click Update and set the JS Tracking option to On. You should now be able to track that specific behaviour through the widgets.
  • Verb: the basic requirement is to use the verb for one of the behaviours you have configured in the platform. The verb is defined when you create or update a behaviour. Navigate to the behaviours page and find your verb there.
  • Metadata: the page also allows yo uto test flexible behaviours which have metadata values associated to them. You can click on Add next to Metadata and it will add new rows where you can specify the name / value of the metadata you want to send along with the verb.

Point Activity

The Point Activity section allows you to simulate manual point changes. Below is a list of all the options and requirements to use this section:

  • Pre-requisite: you will need to following items setup:
    • Point: the ID of point you wish to use is required. This is the first text field you'll find when editing a point in the Administration Panel
    • Security: navigate to Configuration > Security and turn On the setting for Increment Points, Redeem Points and Refund Points.
  • Action: this determines whether you want to manually increment a user's points (note: negative values are allowed), redeem points for a user or refund points to a user.
  • Reason: this allows you to provide a reason for giving the user these points
  • Points: this contains the list of points you wish to give to the user. For each entry you should specify the Point ID and the value of points you want to assign.

Gift Activity

The Gift Activity section allows you to simulate one user donating points to another user. Below is a list of all the options and requirements to use this section:

  • Pre-requisite: you will need to following items setup:
    • Point: the point you use for the gifting should be setup as giftable.
    • Two users: you will need a from and a to user in order to use gifting.
    • Security: navigate to Configuration > Security and turn On the setting for Creating Gifts.
  • From User: this is the user who is giving the points and will need to have sufficient balance in their account. Find the user's UUID in Users > Details and copy and paste it into this box.
  • To User: this is the user who will be receiving the points. Find the user's UUID like above and add it into this box.
  • Reason: this allows you to provide a reason as the "From User" which will be displayed to the user receiving the gift.

Coupon Activity

The Coupon Activity section allows you to redeem and refund coupons for a user. Below is a list of all the options and requirements:

  • Pre-requisite: navigate to Configuration > Security and enable the Refund and Redeem Coupon options.
  • Redeem Coupon Code: copy here the code of the coupon you are looking to redeem. This should then be reflected in the Profile Widgets coupon tab.
  • Refund Coupon Code: copy here the code of the coupon you are looking to refund. This should then be reflected in the Profile Widgets coupon tab.

Create User

This Action is used to test the creation of a simple user through the JavaScript API. This is primarily used to check that you have your security settings in place. Visit the Configuration - Security page and enable the ability to create users through the JavaScript API prior to using this action.

0 Comments

Please sign in to leave a comment.