# Global Parameter

## Basic Concept

**Global Parameter** provides a space that maintains the parameter keys/values to alter certain system behaviors.  

By default, the platform provides a set of system behaviors which tenants can override based on individual requirements. Additionally, tenants can extend and maintain their own parameters accordingly.

## User Scenario

It's intended for anyone who wants to use our platform to override the default behaviors and extend their own system functionalities.


## UI Operation Guide

<div class="docs-caution"><span class="docs-admonitions-text">caution</span>

All operations in this text should be performed in the portal master configuration environment (MC env). The performance in other environments is not allowed, except for troubleshooting purposes.

Please ensure you have all read and write permissions to perform operations beforehand.

</div> 

### Basic Operation

Users can manage the system behaviors through simple parameter settings. By default, the system provides a set of common behaviors, while tenants can override to implement their desired behaviors.  

When tenants and the platform have the same key, the system typically prioritizes the tenant's key. Except in one case, for the `excludePermissionCodes` parameter, the system will take both platform and tenant parameters for exclusion.

## Default Platform Configuration Item

So far, the following configuration items have been pre-embedded in our platform for customization:

- **UIConfig** - Extends overall system UI behavior. See [UI ADMIN Framework](https://docs.insuremo.com/common/doc_00000052) for more details.
- **SystemConfigTable** - Extends overall system back-end behavior.
- **DynamicEntityTCCFieldsConfig** - Extends the TCC mechanism.
- **OrgOffsetDays** - Sets timing differences for testing and troubleshooting purposes. See [OrgOffsetDays Configuration](#orgoffsetdays-configuration) for details.
- **MemberSystemConfig** (Member Service) - Extends the member service's behavior.

![Parameter Tables](./image/parameter/paramater_tables.png)

## OrgOffsetDays Configuration

OrgOffsetDays is a global mechanism that shifts the system time for a specific organization. It affects all platform components including APIs, Batch jobs, and business rules.

### Configuration

| Field | Description |
|-------|-------------|
| Key | Organization code (e.g., `10001`, `10002`) |
| Value | Offset in days (positive for future, negative for past, max ±100 years) |

### Prerequisite

Time offset must be enabled at tenant level in `SystemConfigTable`:
```
Key: tenant.batch.offsetdays.enable
Value: true
```

### Example

To simulate a date 10 years in the future for organization `10001`:
```
Key: 10001
Value: 3650
```

### Use Cases

- **Future Renewal Testing**: Test multiple renewal cycles without waiting for real time to pass
- **Date-Sensitive Logic Testing**: Validate business rules that depend on current date
- **End-to-End Scenario Simulation**: Run complete business flows as if it were a future date

<div class="docs-caution"><span class="docs-admonitions-text">caution</span>
Time offset affects all users and processes within the organization. Use with caution in shared test environments.
</div>



