Attributes

Attributes are characteristics of items that can help you share additional information about an item.

Main features:

  • specify additional characteristics of an item
  • link items to events and conditions

Examples of attributes

Item typeAttribute nameAttribute value
Game keysGame typeNew, Early access, Coming Soon, Special
GenreAction, Adventures, Casual, Simulator, Strategy, RPG
Virtual itemsQualityEpic, Legendary, Common
ClassWarrior, Paladin, Hunter, Shaman, Druid
Virtual currencyEventNew year
QuestCompleting quest 1, Completing quest 2

Prerequisites

  1. Create your Xsolla Publisher Account.
  2. Open your project.

  1. Open Project settings > Integration settings and make sure that the Integrate Commerce API toggle is set to On.

How to get it

  1. Set up attributes.
  2. Set up attribute values.
  3. Set up attributes for item.

Set up attributes

Every attribute has the following parameters:

  • External ID — a unique attribute identifier.
  • Name (specified for every language used in a project).
  • List of values.

To create and set up attributes, you can:

  1. Use functionality of Publisher Account.
  2. Use API calls.

Configuration via Publisher Account

  1. Go to Store > Catalog management.

  1. Click Configure in the Attributes section.

  1. Click Create attribute.

  1. Specify the External ID and name of the attribute.

  1. Click Save and continue.

  1. Specify all necessary values for the created attribute. For every value, specify the External ID. To add more values, click +.

  1. Click Finish.

Note
The number of attributes in the project is unlimited.

Configuration via API calls

Use API calls from the Admin subsection of the Attributes group to set up attributes:

Notice
If you delete the attribute, all its values and connections with items will be lost. You can’t restore the deleted attribute and its data.

Configure attribute values

Every attribute value has the following parameters:

  • external_id of a parent attribute
  • external_id of a value
  • name (specified for every language used in the project)

To create and set up attribute values, you can:

  1. Use functionality of Publisher Account.
  2. Use API calls.

Configuration via Publisher Account

  1. Go to Store > Catalog management.

  1. Click Configure in the Attributes section.

  1. Select a required attribute in the list of attributes.

  1. Open the Values tab and click Create value.

  1. Specify the External ID and name for the value.

  1. Click Save changes.

Note
You can’t specify more than 20 values for an attribute. Contact your Account Manager to change this limit.

Configuration via API calls

Use API calls from the Admin subsection of the Attributes group to set up attributes:

Notice
If you delete a value, all its connections with items will be lost. You can’t restore this data.

Configure attributes for item

To add attributes for items, you can:

  1. Use functionality of Publisher Account.
  2. Use API calls.

Configuration via Publisher Account

To add an attribute for an item:

  1. Go to Store.
  2. Open a section with the required item type:
    • Virtual items
    • Virtual currency
    • Game keys
    • Bundles

  1. Create a new item or edit the existing one.
  2. While filling in the general information about the item, select a previously created attribute in the Attribute section.

  1. In the Value field that appears, select the identifier that corresponds to the required attribute value.

Note
You can’t specify more than 6 values of the same attribute for one item. Contact your Account Manager to change this limit.

Configuration via API methods

Pass an array of objects with identifiers and values of attributes that you want to link to the Create virtual item or Update virtual item method.

Copy
Full screen
Small screen
"attributes": [
   {
     "external_id": "craft-materials",

     "values": [
       {
         "external_id": "steel",

       },
       {
         "external_id": "leather",

   },
   ...
]

Note
When you receive an item via API calls, you will get the list of attributes and their values connected to an item.
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.