Item attributes

Attributes are characteristics of an item that can provide additional information about the item.

​​An attribute can be the color and size of an item, the user level at which the item becomes available, or an event in a game.

Main features:

  • Filtering items in the store
  • Defining item variants (e.g., red helmet, blue helmet) and displaying them on the item card
  • Assigning additional characteristics to an item

Examples of item attributes and their values:

Item typeItem attribute nameItem attribute value
Game keysGame typeNew, Early access, Coming Soon, Special
Game keysGenreAction, Adventures, Casual, Simulator, Strategy, RPG
Virtual itemsQualityEpic, Legendary, Common
Virtual itemsClassWarrior, Paladin, Hunter, Shaman, Druid
Virtual currencyEventNew year
Virtual currencyQuestCompleting quest 1, Completing quest 2

How it works

  1. You create item attributes and their values and link them with the item:
  • through Publisher Account or API by specifying the External ID of the item attributes and External ID of the attribute values.
  • through Publisher Account by specifying attributes and their values in JSON format.
  1. You use methods from the Catalog subsection of the Virtual Items & Currency or Game Keys group of methods to request the item catalog. Attribute data is returned:
  • In the attributes array if attributes are created through Publisher Account or via API methods by specifying the External ID of the item attributes and External ID of the attribute values.
  • In the custom_attributes array if the attributes and values are added via JSON. To do this, you need to include the additional_fields parameter with the value custom_attributes in the catalog retrieval request.
  1. The user makes a purchase. If the attributes and values are added via JSON, the data about the item attributes is passed in the Successful payment of the order and Order cancellation webhooks in the custom_attributes array.

Integration flow

You can create item attributes and their values on your side and add them to the item in JSON format in Publisher Account.

You can also create attributes and their values on the Xolla’s side and add them to the items. To do this:

  1. Create the attributes and their values.
  2. Set up the connection between attributes and items.
Note

When adding item attributes and their values from JSON, there is a 500-character limit . There are no limitations on the number of attributes and values.

When creating attributes and their values in Publisher Account or through API methods, the following limitations apply:

  • No more than 20 values can be specified for one item attribute
  • No more than 20 attributes can be configured for each item
  • One item can have several values of one attribute, but no more than 6

Creating and setting up item attributes and their values

Each item attribute has the following parameters:

  • External ID — is a unique attribute ID that is passed in the external_id parameter in the request body. Provide the attribute ID on your system or create a new one.
  • Name (specified for each language configured in the project).
  • List of values.

Each item attribute value has the following parameters:
  • External ID of the parent item attribute.
  • External ID of the value — a unique ID of the value passed in the external_id parameter in the path parameters. Specify the value ID in your system or create a new one.
  • Name (specified for each language configured in the project).

You can create item attributes and their values in the following ways:

Creating attributes and their values in Publisher Account

  1. Open your project in Publisher Account.
  2. Go to the Store > Catalog management.
  1. Click Configure in the Item attributes section.
  2. Click Create item attribute.
  3. Specify the External ID and name of the item attribute.
  4. Click Save and continue.
  5. Specify all necessary values for the created item attribute. For every value, specify the External ID. To add more values, click +.
  6. Click Save and continue.
Note

The number of item attributes in the project is unlimited.

However, there is a limit of 20 values per attribute.

After creating the attributes and values, you can add them to the items via API or through Publisher Account.

Creating attributes and their values via API methods

To create and manage item attributes and their values, use the methods in the Admin subsection of the Item attributes group of methods.

Methods for creating attributes and managing them:

Methods for creating attribute values and managing them:
Notice

If you delete an item attribute, its values and connections with the item are lost.

If you delete a value, its connections with the item are lost.

You cannot restore deleted item attributes, values, or related data.

After creating the attributes and values, you can add them to the items via API or through Publisher Account.

Adding attributes to an item

Add the created attributes and values to the items:

Adding existing attributes via Publisher Account

To add attributes to an item:
  1. Open your project in Publisher Account.
  2. In the side menu, click Store.
  3. Open a section with the required item type:
    • Virtual items
    • Virtual currency
    • Game keys
    • Bundles
  4. Create a new item or edit the existing one.
  5. In the Item attributes section, switch the Select existing attributes or create new toggle to On.
  6. In the appeared Item attribute field, select the ID corresponding to the desired item attribute.
  7. In the Value field, select the ID that corresponds to the item attribute value.
Note

You can’t set more than 20 attributes for an item.

You can’t specify more than 6 values of the same attribute for one item.

Adding existing attributes via API methods

In the Create virtual item or Update virtual item method, pass an array of objects with the External ID of the item attributes and the External ID of their values that need to be connected.

Example of an array with attributes and their values:

Copy
Full screen
Small screen
  "attributes": [
    {
      "external_id": "craft-materials",
      "name": {
        "en": "Craft materials"
      },
      "values": [
        {
          "external_id": "steel",
          "value": {
            "en-US": "5"
          }
        },
        {
          "external_id": "leather",
          "value": {
            "en-US": "1"
          }
        }
      ]
    }
  ],
Note
When requesting the item catalog using methods from the Catalog subsection of the Virtual Items & Currency or Game Keys methods groups, the response also includes a list of corresponding attributes and their values in the attributes array.
Note

You can’t set more than 20 attributes for an item.

You can’t specify more than 6 values of the same attribute for one item.

Adding attributes from JSON via the Publisher Account

You can add attributes and their values in JSON format when creating or editing all types of items, such as:

To do this:

  1. Open your project in Publisher Account.
  2. In the side menu, click Store.
  3. Open a section with the required item type:
    • Virtual items
    • Virtual currency
    • Game keys
    • Bundles
  4. Create a new item or edit an existing one.
  5. In the Item attributes section, switch the Use JSON to add attributes toggle to On.
  1. In the displayed text area, add a list of attributes and their values in JSON format.
Note

When adding attributes in JSON format, there is no limit on the number or their values.

There is a limitation on the maximum length of JSON — 500 characters.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: October 10, 2023

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!