> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Distributor Transaction Actions

Specification of verify/consume/acquire transaction actions




## Verify Action



### 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.

**Quantity specification supported: NO**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| condition | VerifyAction |  | ✓|  |  | Condition |
| trueActions | List&lt;ConsumeAction&gt; |  | |  | 0 ~ 10 items | List of Consume Actions to be executed when the condition is true |
| falseActions | List&lt;ConsumeAction&gt; |  | |  | 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 |




**JSON**
```json
{
    "action": "Gs2Distributor:IfExpressionByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "condition": {
            "action": "[string]Type of Verify Action",
            "request": "[string]JSON string of the request used when executing the action"
        },
        "trueActions": [
            {
                "action": "[string]Type of Consume Action",
                "request": "[string]JSON string of the request used when executing the action"
            }
        ],
        "falseActions": [
            {
                "action": "[string]Type of 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"
    }
}
```

**YAML**
```yaml

action: Gs2Distributor:IfExpressionByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  condition: 
    action: "[string]Type of Verify Action"
    request: "[string]JSON string of the request used when executing the action"
  trueActions: 
    - action: "[string]Type of Consume Action"
      request: "[string]JSON string of the request used when executing the action"
  falseActions: 
    - action: "[string]Type of 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"
```

**GS2-Script**
```lua

transaction.service("distributor").verify.if_expression_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    condition={
        action="[string]Type of Verify Action",
        request="[string]JSON string of the request used when executing the action"
    },
    trueActions={
        {
            action="[string]Type of Consume Action",
            request="[string]JSON string of the request used when executing the action"
        }
    },
    falseActions={
        {
            action="[string]Type of 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.

**Quantity specification supported: NO**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| actions | List&lt;VerifyAction&gt; |  | |  | 0 ~ 10 items | List of Verify Actions |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Distributor:AndExpressionByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "actions": [
            {
                "action": "[string]Type of Verify Action",
                "request": "[string]JSON string of the request used when executing the action"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Distributor:AndExpressionByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  actions: 
    - action: "[string]Type of Verify Action"
      request: "[string]JSON string of the request used when executing the action"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("distributor").verify.and_expression_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    actions={
        {
            action="[string]Type of 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.

**Quantity specification supported: NO**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| actions | List&lt;VerifyAction&gt; |  | |  | 0 ~ 10 items | List of Verify Actions |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Distributor:OrExpressionByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "actions": [
            {
                "action": "[string]Type of Verify Action",
                "request": "[string]JSON string of the request used when executing the action"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Distributor:OrExpressionByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  actions: 
    - action: "[string]Type of Verify Action"
      request: "[string]JSON string of the request used when executing the action"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("distributor").verify.or_expression_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    actions={
        {
            action="[string]Type of Verify Action",
            request="[string]JSON string of the request used when executing the action"
        }
    },
    timeOffsetToken="[string]Time offset token",
})
```


---





