Skip to main content

CompetitionLabs Academy

Image extension support for action helpers

This tutorial will guide you step by step in how to create a basic Achievement with an action helper that has an image displayed feature. The image display feature is used in the rules for action helpers.

Step 1: Action helpers

In your CompetitionLabs space, navigate to SettingsΒ β†’ Action Helpers

Image extension support for action helpers

Step 1.1: EDIT

To update your existing Action Helpers, navigate to the Action Helper of your choice and press the Edit button.

Step 1.2: CREATE

You can create a new Action Helper by using the Add action helper button.

Step 2: Adding an image to the Action Helpers

From Step 1 you are navigated to the Action Helpers Create/Edit screen where you fill out the information of the Action helper.

Β Β Β Β  Action Helper fields

Name String

Set Name to – Win

Key String

Set the key toΒ  – win

If you have an Action Helper with this key already created, you can name it differently if you wish. In this tutorial, we will display the key – Win.

Description String

Win action helper

β€’Metadata Object
  1. Key –  has to contain a text – img
  2. Value – has to be a link to the image that you want to display – https://complabs.atlassian.net/wiki/download/thumbnails/696090637/trophy.png?version=1&modificationDate=1557221627227&cacheVersion=1&api=v2&width=100&height=100

Image example Β»Image extension support for action helpers

Note It is important that the key is all in small case letters (img), and the Value must be a link to the image, for it to be displayed. You can use the URL that is given, or one of your choice.

Image extension support for action helpers

Step 3: Products

In your CompetitionLabs space, navigate to Products.

Image extension support for action helpers

Step 3.1: EDIT

To update an existing Product, navigate to the product of your choice and press Edit.

Step 3.2: CREATE

To create a new Product, navigate to and press Add Product.

Step 4: Adding the action helper to the Product

Image extension support for action helpers

From Step 3, navigate to the Product Create/Edit screen, where you fill out the product information. If the product already exists, just add the Action Adjustment factor Win that we created. An example of a new Product creation is shown below.

Β Β Β Β  Products fields

Name String

Set Name to – New Game

Providers String

N/A

Product Type String

Set Product type to – slot game

Description String

N/A

Adjustment factor Integer

Set the value to 1

Product ref id String

Set theΒ Product ref id to – new_game

Action Adjustment factors String

By selecting Action you can already preview the Action helper with the image. Select the created Win Action helper.

In the Adjustment factor insert a value 1

Metadata Object

N/A

You can read about the Products documentation in detail in Products section.

Step 5: Achievement creation

Image extension support for action helpers

In your CompetitionLabs space, navigate to Achievements β†’ List. To start creating an achievement, press Create, to get to the achievement creation page.

Β Β Β Β  Step 1: Achievement settings

Status Enum

Set status to – Draft

Icon String

Select any preferable icon

Name String

CongratulationsΒ you won.

Description String

A value indicating how many achievements have been issued.

Initial State Enum

Set state to – Hidden.

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 2: Achievement scheduling

Available from DateTime

Pick a date and time when your Achievement is valid and it is available.

Available until DateTime

N/A

Occurrence Enum

Once.

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 3: Achievement entrants

Member Groups Array[String]

Leave as is – ALL.

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 4: Achievement dependent on

Category String

N/A

Dependent On Array[Object]

N/A

Metadata Object

N/A

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 5: Achievement rewards

Rewards Array[Object]

N/A

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 6: Achievement rules

An example below is shown of how Rules with an action that has an image attached to it looks like

  1. Image extension support for action helpersThe Main rules fact is β€œThe count of events where the nested condition(s) evaluate to TRUE for the event” the Main rules operator is β€œis” and the Main rules constant is β€œ1β€œ. The condition match of the Main rule is β€œALL” and the evaluation criteria – β€œTRUEβ€œ. After that you need to add a Sub rule.
  2. The Sub rules fact is β€œThe product” the Sub rules operator is β€œis” and the Sub rules constant is β€œNew Gameβ€œ. The condition match of the Sub rule is β€œALL” and the evaluation criteria – β€œTRUEβ€œ.
  3. The Sub rules fact is β€œThe action” the Sub rules operator is β€œis” and the Sub rules constant is β€œWinβ€œ. The condition match of the Sub rule is β€œALL” and the evaluation criteria – β€œTRUEβ€œ.

When selecting the action you can already preview the image inserted in the action in Action Helpers.

Image extension support for action helpersThis can be done even without a product selection.

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 7: Achievement translations

Languages Array[Object]

N/A

Move on to the next step by clickingΒ Next.

Β Β Β Β  Step 8: Achievement summary

Summary

You can expand the Rules and preview the action with the image that was preselected earlier.

To finish creating the achievement press Finish and a second pop up screen appears for a confirmation of the achievements creation. Press Confirm and you have created an Achievement.

With this you have went step by step in how to add an image to the Action Helper and implement it in the product and achievement.

Cookie Settings

We use cookies to keep the site working, understand usage, and improve relevance. Read our Cookie Policy and Privacy Policy.