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

# GS2-Dictionary Script Trigger Reference

Reference for event triggers that call extended scripts



## Trigger

### entry

Entry registration

**Related methods:**
addEntriesByUserId - Add entries by User ID


#### Synchronous Execution Script

The script is executed synchronously before the entry registration process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| entryModels | [EntryModel[]](../sdk/#entrymodel) | List of Entry Models |
| userId | string | User ID |

##### Result

|  | Type | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | Whether to allow entry registration |

##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local entryModels = args.entryModels
local userId = args.userId

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}
```


#### Asynchronous Execution Script

The script is executed asynchronously after the entry registration process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| entryModels | [EntryModel[]](../sdk/#entrymodel) | List of Entry Models |
| userId | string | User ID |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local entryModels = args.entryModels
local userId = args.userId

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}
```


---
  
### duplicateEntry

Re-registration for entries already registered

**Related methods:**
addEntriesByUserId - Add entries by User ID


#### Synchronous Execution Script

The script is executed synchronously before the re-registration for entries already registered process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| entryModel | [EntryModel](../sdk/#entrymodel) | Entry Model |
| userId | string | User ID |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local entryModel = args.entryModel
local userId = args.userId

-- Business logic:

-- Result
result = {
}
```


---
  



