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

# GS2-Mission Transaction Actions

Specification of verify/consume/acquire transaction actions




## Verify Action



### Gs2Mission:VerifyCompleteByUserId

Verify Completion Status by User ID

Verifies the completion or receipt status of a mission task for the specified user.

**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 (.). |
| missionGroupName | string |  | ✓|  |  ~ 128 chars | Mission Group Name<br>The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| verifyType | string (enum)<br>enum {<br>"completed",<br>"notCompleted",<br>"received",<br>"notReceived",<br>"completedAndNotReceived"<br>}<br> |  | ✓|  |  | Type of verification"completed": Condition is achieved / "notCompleted": Condition is not achieved / "received": Reward has been received / "notReceived": Reward has not been received / "completedAndNotReceived": Condition is achieved and reward has not been received /  |
| missionTaskName | string |  | ✓|  |  ~ 128 chars | Mission Task Model name<br>Unique Mission Task Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:VerifyCompleteByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "missionGroupName": "[string]Mission Group Name",
        "userId": "[string]User ID",
        "verifyType": "[string]Type of verification",
        "missionTaskName": "[string]Mission Task Model name",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:VerifyCompleteByUserId
request:
  namespaceName: "[string]Namespace name"
  missionGroupName: "[string]Mission Group Name"
  userId: "[string]User ID"
  verifyType: "[string]Type of verification"
  missionTaskName: "[string]Mission Task Model name"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").verify.verify_complete_by_user_id({
    namespaceName="[string]Namespace name",
    missionGroupName="[string]Mission Group Name",
    userId="[string]User ID",
    verifyType="[string]Type of verification",
    missionTaskName="[string]Mission Task Model name",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:VerifyCounterValueByUserId

Verify counter value by User ID

Verifies that a counter's scoped value meets the specified condition for the specified user.

**Quantity specification supported: YES**

|  | 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. |
| counterName | string |  | ✓|  |  ~ 128 chars | Counter Model name<br>The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings. |
| verifyType | string (enum)<br>enum {<br>"less",<br>"lessEqual",<br>"greater",<br>"greaterEqual",<br>"equal",<br>"notEqual"<br>}<br> |  | ✓|  |  | Type of verification"less": Counter value is less than the specified value / "lessEqual": Counter value is less than or equal to the specified value / "greater": Counter value is greater than the specified value / "greaterEqual": Counter value is greater than or equal to the specified value / "equal": Counter value is equal to the specified value / "notEqual": Counter value is not equal to the specified value /  |
| scopeType | string (enum)<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  | | "resetTiming" |  | Scope type<br>Indicates whether this scoped value is based on a reset timing schedule or a verify action condition."resetTiming": Reset timing / "verifyAction": Verify Action /  |
| resetType | string (enum)<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> | {scopeType} == "resetTiming" | ✓*|  |  | Reset timing<br>The reset timing for this scoped value. Determines the period over which the counter value is accumulated before being reset. Only applicable when scopeType is "resetTiming"."notReset": Not Reset / "daily": Daily / "weekly": Weekly / "monthly": Monthly / "days": Every fixed number of days / <br>* Required if scopeType is "resetTiming" |
| conditionName | string | {scopeType} == "verifyAction" | ✓*|  |  ~ 128 chars | Condition Name<br>The name of the verify action condition that this scoped value corresponds to. Used to identify which condition scope this value belongs to. Only applicable when scopeType is "verifyAction".<br>* Required if scopeType is "verifyAction" |
| value | long |  | | 0 | 0 ~ 9223372036854775805 | Count value<br>The accumulated counter value for this scope. Increases when the counter is incremented and decreases when decremented. The value is capped at the maximum and will not go below zero. |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | Whether to multiply the value used for verification when specifying the quantity |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:VerifyCounterValueByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "counterName": "[string]Counter Model name",
        "verifyType": "[string]Type of verification",
        "scopeType": "[string]Scope type",
        "resetType": "[string]Reset timing",
        "conditionName": "[string]Condition Name",
        "value": "[long]Count value",
        "multiplyValueSpecifyingQuantity": "[bool]Whether to multiply the value used for verification when specifying the quantity",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:VerifyCounterValueByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  counterName: "[string]Counter Model name"
  verifyType: "[string]Type of verification"
  scopeType: "[string]Scope type"
  resetType: "[string]Reset timing"
  conditionName: "[string]Condition Name"
  value: "[long]Count value"
  multiplyValueSpecifyingQuantity: "[bool]Whether to multiply the value used for verification when specifying the quantity"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").verify.verify_counter_value_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    counterName="[string]Counter Model name",
    verifyType="[string]Type of verification",
    scopeType="[string]Scope type",
    resetType="[string]Reset timing",
    conditionName="[string]Condition Name",
    value="[long]Count value",
    multiplyValueSpecifyingQuantity="[bool]Whether to multiply the value used for verification when specifying the quantity",
    timeOffsetToken="[string]Time offset token",
})
```


---

## Consume Action



### Gs2Mission:ReceiveByUserId

Receive rewards for mission accomplishment

Marks the specified mission task as received for the specified user.

**Quantity specification supported: NO**

**Reversible action: YES**

|  | 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 (.). |
| missionGroupName | string |  | ✓|  |  ~ 128 chars | Mission Group Name<br>The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group. |
| missionTaskName | string |  | ✓|  |  ~ 128 chars | Task Name |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:ReceiveByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "missionGroupName": "[string]Mission Group Name",
        "missionTaskName": "[string]Task Name",
        "userId": "[string]User ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:ReceiveByUserId
request:
  namespaceName: "[string]Namespace name"
  missionGroupName: "[string]Mission Group Name"
  missionTaskName: "[string]Task Name"
  userId: "[string]User ID"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").consume.receive_by_user_id({
    namespaceName="[string]Namespace name",
    missionGroupName="[string]Mission Group Name",
    missionTaskName="[string]Task Name",
    userId="[string]User ID",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:BatchReceiveByUserId

Receive rewards for multiple mission tasks in bulk

Marks multiple mission tasks as received at once within the same mission group.

**Quantity specification supported: NO**

**Reversible action: 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 (.). |
| missionGroupName | string |  | ✓|  |  ~ 128 chars | Mission Group Name<br>The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| missionTaskNames | List&lt;string&gt; |  | ✓|  | 1 ~ 100 items | Task name list |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:BatchReceiveByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "missionGroupName": "[string]Mission Group Name",
        "userId": "[string]User ID",
        "missionTaskNames": [
            "[string]Task Name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:BatchReceiveByUserId
request:
  namespaceName: "[string]Namespace name"
  missionGroupName: "[string]Mission Group Name"
  userId: "[string]User ID"
  missionTaskNames: 
    - "[string]Task Name"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").consume.batch_receive_by_user_id({
    namespaceName="[string]Namespace name",
    missionGroupName="[string]Mission Group Name",
    userId="[string]User ID",
    missionTaskNames={
        "[string]Task Name"
    },
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:DecreaseCounterByUserId

Decrease counter by User ID

Subtracts the specified value from the counter for the specified user.

**Quantity specification supported: YES**

**Reversible action: YES**

|  | 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 (.). |
| counterName | string |  | ✓|  |  ~ 128 chars | Counter Model name<br>The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| value | long |  | ✓|  | 1 ~ 9223372036854775805 | Value to be subtracted |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:DecreaseCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "counterName": "[string]Counter Model name",
        "userId": "[string]User ID",
        "value": "[long]Value to be subtracted",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:DecreaseCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  counterName: "[string]Counter Model name"
  userId: "[string]User ID"
  value: "[long]Value to be subtracted"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").consume.decrease_counter_by_user_id({
    namespaceName="[string]Namespace name",
    counterName="[string]Counter Model name",
    userId="[string]User ID",
    value="[long]Value to be subtracted",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:ResetCounterByUserId

Reset counter by User ID

Resets the counter values for the specified scopes for the specified user.

**Quantity specification supported: NO**

**Reversible action: 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. |
| counterName | string |  | ✓|  |  ~ 128 chars | Counter Model name<br>The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings. |
| scopes | List&lt;ScopedValue&gt; |  | ✓|  | 1 ~ 20 items | List of scopes |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:ResetCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "counterName": "[string]Counter Model name",
        "scopes": [
            {
                "scopeType": "[string]Scope type",
                "resetType": "[string]Reset timing",
                "conditionName": "[string]Condition Name",
                "value": "[long]Count value",
                "nextResetAt": "[long]Next reset timing",
                "updatedAt": "[long]Last Updated Timestamp"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:ResetCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  counterName: "[string]Counter Model name"
  scopes: 
    - scopeType: "[string]Scope type"
      resetType: "[string]Reset timing"
      conditionName: "[string]Condition Name"
      value: "[long]Count value"
      nextResetAt: "[long]Next reset timing"
      updatedAt: "[long]Last Updated Timestamp"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").consume.reset_counter_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    counterName="[string]Counter Model name",
    scopes={
        {
            scopeType="[string]Scope type",
            resetType="[string]Reset timing",
            conditionName="[string]Condition Name",
            value="[long]Count value",
            nextResetAt="[long]Next reset timing",
            updatedAt="[long]Last Updated Timestamp"
        }
    },
    timeOffsetToken="[string]Time offset token",
})
```


---

## Acquire Action



### Gs2Mission:RevertReceiveByUserId

Revert the status of mission accomplishment to unreceived

Reverts the received status of a mission task back to unreceived.

**Quantity specification supported: NO**

**Reversible action: YES**

|  | 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 (.). |
| missionGroupName | string |  | ✓|  |  ~ 128 chars | Mission Group Name<br>The name of the mission group that this completion record belongs to. One Complete record exists per user per mission group. |
| missionTaskName | string |  | ✓|  |  ~ 128 chars | Task Name |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:RevertReceiveByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "missionGroupName": "[string]Mission Group Name",
        "missionTaskName": "[string]Task Name",
        "userId": "[string]User ID",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:RevertReceiveByUserId
request:
  namespaceName: "[string]Namespace name"
  missionGroupName: "[string]Mission Group Name"
  missionTaskName: "[string]Task Name"
  userId: "[string]User ID"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").acquire.revert_receive_by_user_id({
    namespaceName="[string]Namespace name",
    missionGroupName="[string]Mission Group Name",
    missionTaskName="[string]Task Name",
    userId="[string]User ID",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:IncreaseCounterByUserId

Increase counter by User ID

Adds the specified value to the counter for the specified user.
After incrementing, all mission tasks referencing this counter are automatically re-evaluated, and any newly completed missions are returned in the changedCompletes response.

**Quantity specification supported: YES**

**Reversible action: YES**

|  | 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 (.). |
| counterName | string |  | ✓|  |  ~ 128 chars | Counter Model name<br>The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| value | long |  | ✓|  | 1 ~ 9223372036854775805 | Value to be added |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:IncreaseCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "counterName": "[string]Counter Model name",
        "userId": "[string]User ID",
        "value": "[long]Value to be added",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:IncreaseCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  counterName: "[string]Counter Model name"
  userId: "[string]User ID"
  value: "[long]Value to be added"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").acquire.increase_counter_by_user_id({
    namespaceName="[string]Namespace name",
    counterName="[string]Counter Model name",
    userId="[string]User ID",
    value="[long]Value to be added",
    timeOffsetToken="[string]Time offset token",
})
```


---

### Gs2Mission:SetCounterByUserId

Set counter by User ID

Sets the counter scoped values directly for the specified user, replacing existing values.
Returns both the old and new counter states, as well as any newly completed missions in the changedCompletes response.

**Quantity specification supported: NO**

**Reversible action: 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 (.). |
| counterName | string |  | ✓|  |  ~ 128 chars | Counter Model name<br>The name of the Counter Model that this counter instance is based on. Links to the counter model definition that specifies the scopes and reset timings. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| values | List&lt;ScopedValue&gt; |  | |  | 0 ~ 20 items | List of values to be set |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Mission:SetCounterByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "counterName": "[string]Counter Model name",
        "userId": "[string]User ID",
        "values": [
            {
                "scopeType": "[string]Scope type",
                "resetType": "[string]Reset timing",
                "conditionName": "[string]Condition Name",
                "value": "[long]Count value",
                "nextResetAt": "[long]Next reset timing",
                "updatedAt": "[long]Last Updated Timestamp"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Mission:SetCounterByUserId
request:
  namespaceName: "[string]Namespace name"
  counterName: "[string]Counter Model name"
  userId: "[string]User ID"
  values: 
    - scopeType: "[string]Scope type"
      resetType: "[string]Reset timing"
      conditionName: "[string]Condition Name"
      value: "[long]Count value"
      nextResetAt: "[long]Next reset timing"
      updatedAt: "[long]Last Updated Timestamp"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("mission").acquire.set_counter_by_user_id({
    namespaceName="[string]Namespace name",
    counterName="[string]Counter Model name",
    userId="[string]User ID",
    values={
        {
            scopeType="[string]Scope type",
            resetType="[string]Reset timing",
            conditionName="[string]Condition Name",
            value="[long]Count value",
            nextResetAt="[long]Next reset timing",
            updatedAt="[long]Last Updated Timestamp"
        }
    },
    timeOffsetToken="[string]Time offset token",
})
```


---



