GS2-Distributor Transaction Actions
VerifyAction
Gs2Distributor:IfExpressionByUserId
Validate the condition and switch the contents of the Consume Action
Evaluates a verify action as a condition, and executes either the trueActions or falseActions list of consume actions based on the result. This enables conditional branching within a transaction, allowing different consume actions to be executed depending on the verification outcome. When multiplyValueSpecifyingQuantity is enabled, the values used for verification are also multiplied by the specified quantity.
Whether the action allows quantity specification: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| condition | VerifyAction | ✓ | Condition | |||
| trueActions | List<ConsumeAction> | 0 ~ 10 items | List of Consume Actions to be executed when the condition is true | |||
| falseActions | List<ConsumeAction> | 0 ~ 10 items | List of Consume Actions to be executed when the condition is false | |||
| multiplyValueSpecifyingQuantity | bool | true | Whether to multiply the value used for verification when specifying the quantity | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Distributor:IfExpressionByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"condition": {
"action": "[string]Type of action to be executed in the Verify Action",
"request": "[string]JSON string of the request used when executing the action"
},
"trueActions": [
{
"action": "[string]Type of action to be executed in the Consume Action",
"request": "[string]JSON string of the request used when executing the action"
}
],
"falseActions": [
{
"action": "[string]Type of action to be executed in the Consume Action",
"request": "[string]JSON string of the request used when executing the action"
}
],
"multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2Distributor:IfExpressionByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User ID"
condition:
action: "[string]Type of action to be executed in the Verify Action"
request: "[string]JSON string of the request used when executing the action"
trueActions:
- action: "[string]Type of action to be executed in the Consume Action"
request: "[string]JSON string of the request used when executing the action"
falseActions:
- action: "[string]Type of action to be executed in the Consume Action"
request: "[string]JSON string of the request used when executing the action"
multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
timeOffsetToken: "[string]Time offset token"transaction.service("distributor").verify.if_expression_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User ID",
condition={
action="[string]Type of action to be executed in the Verify Action",
request="[string]JSON string of the request used when executing the action"
},
trueActions={
{
action="[string]Type of action to be executed in the Consume Action",
request="[string]JSON string of the request used when executing the action"
}
},
falseActions={
{
action="[string]Type of action to be executed in the Consume Action",
request="[string]JSON string of the request used when executing the action"
}
},
multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
timeOffsetToken="[string]Time offset token",
})Gs2Distributor:AndExpressionByUserId
Perform multiple verification actions and determine if all are true
Executes multiple verify actions and succeeds only if all of them evaluate to true (AND logic). If any verify action fails, the entire expression fails. This is useful for combining multiple preconditions that must all be satisfied before proceeding with a transaction.
Whether the action allows quantity specification: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| actions | List<VerifyAction> | 0 ~ 10 items | List of Verify Actions | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Distributor:AndExpressionByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"actions": [
{
"action": "[string]Type of action to be executed in the Verify Action",
"request": "[string]JSON string of the request used when executing the action"
}
],
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2Distributor:AndExpressionByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User ID"
actions:
- action: "[string]Type of action to be executed in the Verify Action"
request: "[string]JSON string of the request used when executing the action"
timeOffsetToken: "[string]Time offset token"transaction.service("distributor").verify.and_expression_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User ID",
actions={
{
action="[string]Type of action to be executed in the Verify Action",
request="[string]JSON string of the request used when executing the action"
}
},
timeOffsetToken="[string]Time offset token",
})Gs2Distributor:OrExpressionByUserId
Perform multiple verification actions and determine if any are true
Executes multiple verify actions and succeeds if at least one of them evaluates to true (OR logic). The expression fails only if all verify actions fail. This is useful for defining alternative conditions where satisfying any one of them is sufficient to proceed.
Whether the action allows quantity specification: NO
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID Set #{userId} to replace the currently logged in user ID. | ||
| actions | List<VerifyAction> | 0 ~ 10 items | List of Verify Actions | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
{
"action": "Gs2Distributor:OrExpressionByUserId",
"request": {
"namespaceName": "[string]Namespace name",
"userId": "[string]User ID",
"actions": [
{
"action": "[string]Type of action to be executed in the Verify Action",
"request": "[string]JSON string of the request used when executing the action"
}
],
"timeOffsetToken": "[string]Time offset token"
}
}action: Gs2Distributor:OrExpressionByUserId
request:
namespaceName: "[string]Namespace name"
userId: "[string]User ID"
actions:
- action: "[string]Type of action to be executed in the Verify Action"
request: "[string]JSON string of the request used when executing the action"
timeOffsetToken: "[string]Time offset token"transaction.service("distributor").verify.or_expression_by_user_id({
namespaceName="[string]Namespace name",
userId="[string]User ID",
actions={
{
action="[string]Type of action to be executed in the Verify Action",
request="[string]JSON string of the request used when executing the action"
}
},
timeOffsetToken="[string]Time offset token",
})