GS2-Showcase Transaction Actions

Specification of verify/consume/acquire transaction actions

Consume Action

Gs2Showcase:IncrementPurchaseCountByUserId

Increment the number of times a Random Displayed Item has been purchased by specifying the user ID

Increments the purchase count for a specific Random Displayed Item in the Random Showcase for the specified user. Used for tracking purchase limits per rotation period.

Supports quantity specification: YES

Whether the action is reversible: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
showcaseNamestring
~ 128 charsRandom Showcase Name
displayItemNamestring
~ 128 charsNumber of Random Displayed Item purchases name
The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase.
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
countint
0 ~ 100Number of purchase times to add
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Showcase:IncrementPurchaseCountByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "showcaseName": "[string]Random Showcase Name",
        "displayItemName": "[string]Number of Random Displayed Item purchases name",
        "userId": "[string]User ID",
        "count": "[int]Number of purchase times to add",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Showcase:IncrementPurchaseCountByUserId
request:
  namespaceName: "[string]Namespace name"
  showcaseName: "[string]Random Showcase Name"
  displayItemName: "[string]Number of Random Displayed Item purchases name"
  userId: "[string]User ID"
  count: "[int]Number of purchase times to add"
  timeOffsetToken: "[string]Time offset token"
transaction.service("showcase").consume.increment_purchase_count_by_user_id({
    namespaceName="[string]Namespace name",
    showcaseName="[string]Random Showcase Name",
    displayItemName="[string]Number of Random Displayed Item purchases name",
    userId="[string]User ID",
    count="[int]Number of purchase times to add",
    timeOffsetToken="[string]Time offset token",
})

Acquire Action

Gs2Showcase:DecrementPurchaseCountByUserId

Decrement the number of times a Random Displayed Item has been purchased by specifying the user ID

Decrements the purchase count for a specific Random Displayed Item in the Random Showcase. Used to reverse purchases or adjust purchase counters.

Supports quantity specification: YES

Whether the action is reversible: YES

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
showcaseNamestring
~ 128 charsRandom Showcase Name
displayItemNamestring
~ 128 charsNumber of Random Displayed Item purchases name
The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase.
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
countint
0 ~ 100Number of purchase times to subtract
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Showcase:DecrementPurchaseCountByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "showcaseName": "[string]Random Showcase Name",
        "displayItemName": "[string]Number of Random Displayed Item purchases name",
        "userId": "[string]User ID",
        "count": "[int]Number of purchase times to subtract",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Showcase:DecrementPurchaseCountByUserId
request:
  namespaceName: "[string]Namespace name"
  showcaseName: "[string]Random Showcase Name"
  displayItemName: "[string]Number of Random Displayed Item purchases name"
  userId: "[string]User ID"
  count: "[int]Number of purchase times to subtract"
  timeOffsetToken: "[string]Time offset token"
transaction.service("showcase").acquire.decrement_purchase_count_by_user_id({
    namespaceName="[string]Namespace name",
    showcaseName="[string]Random Showcase Name",
    displayItemName="[string]Number of Random Displayed Item purchases name",
    userId="[string]User ID",
    count="[int]Number of purchase times to subtract",
    timeOffsetToken="[string]Time offset token",
})

Gs2Showcase:ForceReDrawByUserId

Re-draw the contents of the Random Showcase by specifying a user ID

Forces a redraw of the random showcase items for the specified user, resetting the current selection and triggering a new random item selection from the configured pool.

Supports quantity specification: NO

Whether the action is reversible: NO

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
showcaseNamestring
~ 128 charsRandom Showcase Name
userIdstring
~ 128 charsUser ID
Specify #{userId} to substitute the currently logged-in user’s ID.
timeOffsetTokenstring~ 1024 charsTime offset token
{
    "action": "Gs2Showcase:ForceReDrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "showcaseName": "[string]Random Showcase Name",
        "userId": "[string]User ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Showcase:ForceReDrawByUserId
request:
  namespaceName: "[string]Namespace name"
  showcaseName: "[string]Random Showcase Name"
  userId: "[string]User ID"
  timeOffsetToken: "[string]Time offset token"
transaction.service("showcase").acquire.force_re_draw_by_user_id({
    namespaceName="[string]Namespace name",
    showcaseName="[string]Random Showcase Name",
    userId="[string]User ID",
    timeOffsetToken="[string]Time offset token",
})