# Business Logic — JEKKA0070001TPMA.call_KKIFE401() [172 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.ejb.cbs.mainproc.JEKKA0070001TPMA` |
| Layer | CBS Main Process (EJB entry-point handler) |
| Module | `mainproc` (Package: `eo.ejb.cbs.mainproc`) |

## 1. Role

### JEKKA0070001TPMA.call_KKIFE401()

This method is the primary CBS (Core Business System) entry-point handler for the **Individual Discount Applicability Inquiry/Change Request** service — specifically handling the inquiry and modification request regarding whether an individual discount applies to a subscriber's service contract. It implements a **delegation pattern**, constructing a request map from the inbound CBS message, forwarding it to a shared common API (`JKKcommonApiKKA0070001.callApiKKA0070001`), and then routing the response back into the outbound message structure. The method serves as a **shared CBS handler** registered in the `AgentDispatchContext` dispatch table, meaning it can be invoked by multiple screen-layer CBS callers (e.g., KKSV0004). It handles three result branches: successful processing (`resultCode = "000"`), business error (`resultCode = "500"`) with granular error code classification (single-data error, relation error, or updatable-time access error), and unexpected results (generic external IF error). It also constructs a five-part response message structure (msg1 through msg5) covering general results, contract 1 details, contract 2 details, result codes, and error details.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["call_KKIFE401 start"])
    
    START --> INIT["Initialize serviceMap LinkedHashMap"]
    
    INIT --> EXTRACT["Extract 28 fields from inCBSMsg into serviceMap"]
    
    EXTRACT --> API["Create JKKcommonApiKKA0070001 instance"]
    
    API --> CALAPI["callApiKKA0070001 serviceMap"]
    
    CALAPI --> NULLCHECK{"resServiceMap is null"}
    
    NULLCHECK -->|Yes| EMPTY["resServiceMap = new HashMap"]
    NULLCHECK -->|No| RESCHECK{"resultCode equals 000"}
    EMPTY --> RESCHECK
    
    RESCHECK -->|Yes| NORMALEND["Set STATUS NORMAL_END"]
    RESCHECK -->|No| ERR500CHECK{"resultCode equals 500"}
    
    ERR500CHECK -->|Yes| ERRINIT["Initialize errList, starusNo zero, noExpValFlag zero"]
    ERR500CHECK -->|No| ELSEERR["Set STATUS EXTERNAL_IF_ERR1"]
    
    ERRINIT --> FORSTART["For loop iterate errList"]
    
    FORSTART --> ISEMPTY{"errorCode is blank"}
    
    ISEMPTY -->|Yes| SETFLAG["noExpValFlag = 1"]
    ISEMPTY -->|No| ISEXPECTED["isExpectedValue errorCode noExpValFlag"]
    
    ISEXPECTED --> MAXCHECK{"starusNo less than errorCodeNo"}
    MAXCHECK -->|Yes| UPMAX["starusNo = errorCodeNo"]
    MAXCHECK -->|No| NEXTLOOP["Next iteration"]
    UPMAX --> NEXTLOOP
    
    SETFLAG --> NEXTLOOP
    
    NEXTLOOP --> MAXERR{"noExpValFlag equals zero"}
    
    MAXERR -->|Yes| ERR1000{"errorCode equals 1000"}
    ERR1000 -->|Yes| SINGLEDATA["Set STATUS SINGLEDATA_ERR"]
    ERR1000 -->|No| ERR2000{"errorCode matches 2000 3000-3005 4000"}
    ERR2000 -->|Yes| RELATIONERR["Set STATUS RELATION_ERR"]
    ERR2000 -->|No| ERR5000{"errorCode equals 5000"}
    ERR5000 -->|Yes| NOUPDATE["Set STATUS NO_UPDATABLE_TIME_ERR 5000"]
    ERR5000 -->|No| NEXTLOOP2["Next iteration"]
    
    MAXERR -->|No| EXTERNERR1["Set STATUS EXTERNAL_IF_ERR1"]
    
    NOUPDATE --> NEXTLOOP2
    NOUPDATE2["Set STATUS NO_UPDATABLE_TIME_ERR 5000"] --> NEXTLOOP2
    
    SINGLEDATA --> NEXTLOOP2
    RELATIONERR --> NEXTLOOP2
    EXTERNERR1 --> BUILDMAP["Build output message lists msg1-msg5"]
    NEXTLOOP2 --> BUILDMAP
    
    BUILDMAP --> EDITOUT["editOutMsg inCBSMsg resServiceMap"]
    
    NORMALEND --> BUILDMAP
    NOUPDATE --> BUILDMAP
    
    EDITOUT --> END(["End return void"])
```

**Processing summary:**

1. **Request map construction**: Extracts 28 fields from the inbound `CAANMsg` (`inCBSMsg`) into a `LinkedHashMap` called `serviceMap`. Fields include route, request ID, operation date/time, transaction division, campaign code, service contract number, sysid, invoice contract number, contractor address code, service code, price group code, price course code, price plan code, subscription payment method code, application date, inquiry date, inquiry cancellation code, application document number, service contract status, line installation address code, service contract line item work number, service start date, service end date, service charge start date, service charge end date, service ID, course division, mineo phone number, removal email notification flags, and input mineo/acceptance numbers.

2. **Common API invocation**: Instantiates `JKKcommonApiKKA0070001` and delegates to `callApiKKA0070001(serviceMap)` for the actual individual discount applicability logic.

3. **Result classification**:
   - `resultCode == "000"`: Normal end. Sets status to `StatusCodes.NORMAL_END`.
   - `resultCode == "500"`: Business error. Iterates through the `gyomuErrorList`, computes the highest-priority error code number (`starusNo`), and checks if all error codes are expected values via `isExpectedValue()`. Routes to `SINGLEDATA_ERR` (code "1000"), `RELATION_ERR` (codes "2000", "3000"- "3005", "4000"), or `NO_UPDATABLE_TIME_ERR` (code "5000"). If any unexpected error code exists, routes to `EXTERNAL_IF_ERR1`.
   - Any other `resultCode`: Generic external IF error (`EXTERNAL_IF_ERR1`).

4. **Response message building**: The `editOutMsg` method (called at the end regardless of result) populates the five output message lists: msg1 (general result info), msg2 (contract 1 details), msg3 (contract 2 details), msg4 (result codes), and msg5 (error details).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inCBSMsg` | `CAANMsg` | The inbound CBS message carrying the individual discount applicability inquiry/change request. Contains 28+ fields including service contract details (contract number, service code, pricing codes), subscriber information (address codes, sysid), temporal data (application date, service start/end dates), and mineo-specific fields (mineo phone number, input mineo number, email notification flags). |
| 2 | `inContext` | `AgentDispatchContext` | The dispatch context providing runtime environment information such as operation date/time and session state. Used by `JCCModelCommon.getOpeDateTimeStamp()` to compute the operation timestamp when building the service map. |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `NO_UPDATABLE_TIME_ERR` | `private static final int` | Error code constant `5000` representing the "updatable time access error" (更新不可時間アクセスエラー) — thrown when an update is attempted outside an allowed time window. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| CALL | `JKKStringUtil.nullToBlank` | - | - | Utility: converts null/blank values to empty strings for all 28 input field extractions |
| R | `JCCModelCommon.getOpeDateTimeStamp` | - | - | Calls `getOpeDateTimeStamp` to compute the operation date/time stamp from `inCBSMsg` and `inContext` |
| CALL | `JKKcommonApiKKA0070001.callApiKKA0070001` | - | - | Delegates to the common API that performs the individual discount applicability inquiry/change request processing |
| CALL | `JEKKA0070001TPMA.isExpectedValue` | - | - | Internal utility: validates whether an error code is an expected value in the allowed set |
| U | `JEKKA0070001TPMA.editOutMsg` | - | - | Sets the response message structure into `inCBSMsg` — populates 5 output message lists from the API response |
| CALL | `StatusCodes.NORMAL_END` | - | - | Status constant for normal end (set on `inCBSMsg` when `resultCode == "000"`) |
| CALL | `StatusCodes.SINGLEDATA_ERR` | - | - | Status constant for single-data check error (set when `errorCode == "1000"`) |
| CALL | `StatusCodes.RELATION_ERR` | - | - | Status constant for related-data check error (set when `errorCode` is "2000", "3000"- "3005", or "4000") |
| CALL | `StatusCodes.EXTERNAL_IF_ERR1` | - | - | Status constant for external IF error (set on unexpected result codes or when unexpected error code is found) |
| CALL | `NO_UPDATABLE_TIME_ERR` | - | - | Constant value `5000` set as status when `errorCode == "5000"` (updatable time access error) |

## 5. Dependency Trace

No callers found within the project — `call_KKIFE401` is a static entry-point method invoked externally via the `AgentDispatchContext` dispatch mechanism. It is registered as a handler in the CBS routing table and called by screen-level CBS processes (e.g., KKSV-series screens) through the agent dispatch framework.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | External CBS Dispatcher | `AgentDispatchContext` -> `TemplateMainHandler.invoke` -> `JEKKA0070001TPMA.call_KKIFE401` | `callApiKKA0070001 [C/R] KKKcommonApiKKA0070001` |
| 2 | Screen:KKSV0004 (expected) | `KKSV0004CBS` -> `callTPMA` -> `JEKKA0070001TPMA.call_KKIFE401` | `callApiKKA0070001 [C/R] KKKcommonApiKKA0070001` |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `Initialize LinkedHashMap` (L68)

> Initializes the request map that will be sent to the common API.

| # | Type | Code |
|---|------|------|
| 1 | SET | `serviceMap = new LinkedHashMap()` // request map for common API |

**Block 2** — [SET] `Extract fields from inCBSMsg` (L69–140)

> Extracts 28 fields from the inbound message into the serviceMap. Each field is null-safe via `JKKStringUtil.nullToBlank()`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `serviceMap.put("route", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.ROUTE)))` // 申請経路 (Application route) [ANK-4195-00-00 ADD] |
| 2 | SET | `serviceMap.put("requestID", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.REQUESTID)))` // リクエストID (Request ID) |
| 3 | SET | `serviceMap.put("ope_date_time", JCCModelCommon.getOpeDateTimeStamp(inCBSMsg, inContext, null))` // 運用日時 (Operation date/time) [ANK-3436-24-00 MOD — changed from inCBSMsg.getString] |
| 4 | SET | `serviceMap.put("tran_div", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.TRAN_DIV)))` // 処理区分 (Transaction division) |
| 5 | SET | `serviceMap.put("cmp_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.CMP_CD)))` // キャンペーンコード (Campaign code) |
| 6 | SET | `serviceMap.put("svc_kei_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_KEI_NO)))` // サービス契約番号 (Service contract number) |
| 7 | SET | `serviceMap.put("sysid", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SYSID)))` // SYSID |
| 8 | SET | `serviceMap.put("seiky_kei_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SEIKY_KEI_NO)))` // 請求契約番号 (Invoice contract number) |
| 9 | SET | `serviceMap.put("keisha_ad_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.KEISHA_AD_CD)))` // 契約者住所コード (Contractor address code) |
| 10 | SET | `serviceMap.put("svc_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_CD)))` // サービスコード (Service code) |
| 11 | SET | `serviceMap.put("prc_grp_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.PRC_GRP_CD)))` // 料金グループコード (Price group code) |
| 12 | SET | `serviceMap.put("pcrs_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.PCRS_CD)))` // 料金コースコード (Price course code) |
| 13 | SET | `serviceMap.put("pplan_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.PPLAN_CD)))` // 料金プランコード (Price plan code) |
| 14 | SET | `serviceMap.put("kanyu_kei_pay_hoshiki_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.KANYU_KEI_PAY_HOSHIKI_CD)))` // 加入契約支払方式コード (Subscription payment method code) |
| 15 | SET | `serviceMap.put("mskm_ymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.MSKM_YMD)))` // 申請年月日 (Application date) |
| 16 | SET | `serviceMap.put("shosa_ymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SHOSA_YMD)))` // 照会年月日 (Inquiry date) |
| 17 | SET | `serviceMap.put("shosa_dsl_fin_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SHOSA_DSL_FIN_CD)))` // 照会解約完了コード (Inquiry cancellation completion code) |
| 18 | SET | `serviceMap.put("mskmsho_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.MSKMSHO_NO)))` // 申請書番号 (Application document number) |
| 19 | SET | `serviceMap.put("svc_kei_stat", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_KEI_STAT)))` // サービス契約ステータス (Service contract status) |
| 20 | SET | `serviceMap.put("kaisen_place_ad_cd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.KAISEN_PLACE_AD_CD)))` // 回線場所住所コード (Line installation address code) |
| 21 | SET | `serviceMap.put("svc_kei_kaisen_ucwk_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_KEI_KAISEN_UCWK_NO)))` // サービス契約回線内訳番号 (Service contract line item work number) |
| 22 | SET | `serviceMap.put("svc_sta_ymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_STA_YMD)))` // サービス開始年月日 (Service start date) |
| 23 | SET | `serviceMap.put("svc_endymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_ENDYMD)))` // サービス終了年月日 (Service end date) |
| 24 | SET | `serviceMap.put("svc_chrg_staymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_CHRG_STAYMD)))` // サービス課金開始年月日 (Service charge start date) |
| 25 | SET | `serviceMap.put("svc_chrg_endymd", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SVC_CHRG_ENDYMD)))` // サービス課金終了年月日 (Service charge end date) |
| 26 | SET | `serviceMap.put("serviceID", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.SERVICEID)))` // サービスID (Service ID) |
| 27 | SET | `serviceMap.put("cource_div", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.COURCE_DIV)))` // コース区分 (Course division) |
| 28 | SET | `serviceMap.put("mineo_tel", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.MINEO_TEL)))` // mineo電話番号 (Mineo phone number) |
| 29 | SET | `serviceMap.put("kei_1_mail_send_flag", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.KEI_1_MAIL_SEND_FLAG)))` // 解除メール通知有無1 (Removal email notification flag 1) |
| 30 | SET | `serviceMap.put("input_mineo_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.INPUT_MINEO_NO)))` // 入力mineo受番電話番号 (Input mineo number / phone number) |
| 31 | SET | `serviceMap.put("input_uk_no", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.INPUT_UK_NO)))` // 入力受番番号 (Input acceptance number) |
| 32 | SET | `serviceMap.put("kei_2_mail_send_flag", JKKStringUtil.nullToBlank(inCBSMsg.getString(EKKA0070001CBSMsg.KEI_2_MAIL_SEND_FLAG)))` // 解除メール通知有無2 (Removal email notification flag 2) |

**Block 3** — [SET] `Create JKKcommonApiKKA0070001 instance` (L142)

| # | Type | Code |
|---|------|------|
| 1 | SET | `JKKcommonApiKKA0070001 instance = new JKKcommonApiKKA0070001()` // コマンド発行者品のインスタンスを取得 (Instantiate command issuer component) |

**Block 4** — [TRY-CATCH] `Common API invocation and result processing` (L144–228)

> Wraps the common API call and all result processing in a try-catch block.

**Block 4.1** — [EXEC] `Call common API` (L147)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resServiceMap = instance.callApiKKA0070001(serviceMap)` // 共通API連携 (Common API integration) |

**Block 4.2** — [IF] `resServiceMap is null` (L149–151)

> If the API returns null, initialize an empty HashMap.

| # | Type | Code |
|---|------|------|
| 1 | SET | `resServiceMap = new HashMap()` |

**Block 4.3** — [IF-ELSEIF-ELSE] `Result code classification` (L153–225)

> Three-way branch on `resServiceMap.get("resultCode")`.

**Block 4.3.1** — [IF] `resultCode equals "000" (Normal End)` (L153–157) [CONSTANT: "000"]

> Normal end: set status to `NORMAL_END`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, StatusCodes.NORMAL_END)` // ステータス設定 (0:正常終了) (Status set — 0: normal end) |

**Block 4.3.2** — [ELSE-IF] `resultCode equals "500" (Business Error)` (L159–222) [CONSTANT: "500"]

> Business error handling: iterates error list to find the highest-priority error code.

**Block 4.3.2.1** — [SET] `Error list initialization` (L161–164)

| # | Type | Code |
|---|------|------|
| 1 | SET | `errList = (List)resServiceMap.get("gyomuErrorList")` // エラーリスト (Error list) |
| 2 | SET | `starusNo = 0` // tracks the highest error code number encountered |
| 3 | SET | `noExpValFlag = 0` // flag indicating if an unexpected error code was found |

**Block 4.3.2.2** — [FOR] `Iterate error list` (L165–187)

> Iterates through each error entry in the business error list.

**Block 4.3.2.2.1** — [SET] `Extract error entry` (L167–169)

| # | Type | Code |
|---|------|------|
| 1 | SET | `map = (Map)errList.get(i)` // エラーリスト (Error list entry) |
| 2 | SET | `errorCode = (String)map.get("errorCode")` |

**Block 4.3.2.2.2** — [IF] `errorCode is blank` (L171–173)

> If the error code is blank/null, set the unexpected flag.

| # | Type | Code |
|---|------|------|
| 1 | SET | `noExpValFlag = 1` // blank error code marks unexpected |

**Block 4.3.2.2.3** — [ELSE] `errorCode has value` (L175–184)

| # | Type | Code |
|---|------|------|
| 1 | SET | `noExpValFlag = isExpectedValue(errorCode, noExpValFlag)` // Validate error code is in expected set |
| 2 | SET | `errorCodeNo = Integer.parseInt(errorCode)` // Convert error code to integer for comparison |
| 3 | IF | `starusNo < errorCodeNo` [L178] |
| 3.1 | SET | `starusNo = errorCodeNo` // Track the highest-priority error code number |

**Block 4.3.2.3** — [SET] `Compute final error code string` (L188)

| # | Type | Code |
|---|------|------|
| 1 | SET | `errorCode = String.valueOf(starusNo)` // Highest error code number as string |

**Block 4.3.2.4** — [IF] `noExpValFlag equals 0` (L189–220)

> All error codes are expected values — route by specific error code.

**Block 4.3.2.4.1** — [IF] `errorCode equals "1000" (Single Data Check Error)` (L193–196) [CONSTANT: "1000"]

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, StatusCodes.SINGLEDATA_ERR)` // 単項目チェックエラー (Single item check error) |

**Block 4.3.2.4.2** — [ELSE-IF] `errorCode matches "2000", "3000"-"3005", "4000" (Relation Check Error)` (L198–205) [CONSTANT: IT1-2018-0000116 MOD]

> Updated in IT1-2018-0000116 (2018/07/24): code "5000" was removed from this branch (moved to its own branch below).

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, StatusCodes.RELATION_ERR)` // 関連チェックエラー (Related check error) |

**Block 4.3.2.4.3** — [ELSE-IF] `errorCode equals "5000" (Updatable Time Access Error)` (L207–211) [CONSTANT: IT1-2018-0000116 ADD]

> Added in IT1-2018-0000116 (2018/07/24): previously grouped with relation error, now a dedicated branch.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, NO_UPDATABLE_TIME_ERR)` // 更新不可時間アクセスエラー (Updatable time access error) |

**Block 4.3.2.5** — [ELSE] `Unexpected error code found` (L217–220)

> When `noExpValFlag == 1`, an error code outside the expected set was found.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, StatusCodes.EXTERNAL_IF_ERR1)` // ステータス設定 (6000:外部IFでエラー発生1) (Status set — 6000: external IF error occurred 1) |

**Block 4.3.3** — [ELSE] `Unexpected result code` (L224–228)

> Any result code other than "000" or "500" triggers generic external IF error.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inCBSMsg.set(EKKA0070001CBSMsg.STATUS, StatusCodes.EXTERNAL_IF_ERR1)` // ステータス設定 (6000:外部IFでエラー発生1) |

**Block 4.4** — [CALL] `Build output message` (L232)

> Regardless of result path, always call `editOutMsg` to construct the response. Even on errors, the response document is created.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editOutMsg(inCBSMsg, resServiceMap)` // レスポンス電文を設定 (Set response message) ※異常が発生しても空で作成する (Create even if error occurred) |

**Block 5** — [CATCH] `Exception handler` (L234–236)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `e.printStackTrace()` // Swallows the exception — no status set on error |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| 個別割引適用可否照会・変更依頼 | Business term | Individual Discount Applicability Inquiry/Change Request — the core business operation: inquiring whether an individual discount applies to a service contract and requesting changes to the discount status |
| `ROUTE` | Field | 申請経路 (Application route) — identifies the application path/channel used to submit the request. Added in ANK-4195-00-00 for e-hikari × e-electricity × mineo set discount policy. |
| `REQUESTID` | Field | リクエストID (Request ID) — unique identifier for the request transaction |
| `OPE_DATE_TIME` | Field | 運用日時 (Operation date/time) — timestamp of the business operation. Changed in ANK-3436-24-00 to be computed via `JCCModelCommon.getOpeDateTimeStamp()` instead of read from the input message. |
| `TRAN_DIV` | Field | 処理区分 (Transaction division) — classifies the type of processing (e.g., inquiry, change) |
| `CMP_CD` | Field | キャンペーンコード (Campaign code) — code identifying the marketing campaign associated with this request |
| `SVC_KEI_NO` | Field | サービス契約番号 (Service contract number) — unique identifier for the service contract |
| `SYSID` | Field | SYSID — system identifier for the originating system |
| `SEIKY_KEI_NO` | Field | 請求契約番号 (Invoice contract number) — identifier for the billing contract |
| `KEISHA_AD_CD` | Field | 契約者住所コード (Contractor address code) — address code of the contract holder |
| `SVC_CD` | Field | サービスコード (Service code) — code identifying the type of service (e.g., FTTH, Mail, ENUM) |
| `PRC_GRP_CD` | Field | 料金グループコード (Price group code) — code for the pricing group associated with the service |
| `PCRS_CD` | Field | 料金コースコード (Price course code) — code for the pricing course/plan tier |
| `PPLAN_CD` | Field | 料金プランコード (Price plan code) — specific pricing plan code |
| `KANYU_KEI_PAY_HOSHIKI_CD` | Field | 加入契約支払方式コード (Subscription payment method code) — payment method for the subscription contract (e.g., bank transfer, credit card) |
| `MSKM_YMD` | Field | 申請年月日 (Application date) — date the request was submitted |
| `SHOSA_YMD` | Field | 照会年月日 (Inquiry date) — date of the inquiry |
| `SHOSA_DSL_FIN_CD` | Field | 照会解約完了コード (Inquiry cancellation completion code) — code indicating whether the inquiry cancellation was completed |
| `MSKMSHO_NO` | Field | 申請書番号 (Application document number) — document number for the application |
| `SVC_KEI_STAT` | Field | サービス契約ステータス (Service contract status) — current status of the service contract |
| `KAISEN_PLACE_AD_CD` | Field | 回線場所住所コード (Line installation address code) — address code where the line is installed |
| `SVC_KEI_KAISEN_UCWK_NO` | Field | サービス契約回線内訳番号 (Service contract line item work number) — internal work tracking number for service contract line items |
| `SVC_STA_YMD` | Field | サービス開始年月日 (Service start date) — date the service began |
| `SVC_ENDYMD` | Field | サービス終了年月日 (Service end date) — date the service ended |
| `SVC_CHRG_STAYMD` | Field | サービス課金開始年月日 (Service charge start date) — date billing began for the service |
| `SVC_CHRG_ENDYMD` | Field | サービス課金終了年月日 (Service charge end date) — date billing ended for the service |
| `SERVICEID` | Field | サービスID (Service ID) — unique service identifier |
| `COURCE_DIV` | Field | コース区分 (Course division) — classification of the service course |
| `MINEO_TEL` | Field | mineo電話番号 (Mineo phone number) — phone number associated with the mineo MVNO service |
| `KEI_1_MAIL_SEND_FLAG` | Field | 解除メール通知有無1 (Removal email notification flag 1) — indicates whether a removal notification email should be sent (first flag) |
| `INPUT_MINEO_NO` | Field | 入力mineo受番電話番号 (Input mineo number / phone number) — manually entered mineo number and phone number |
| `INPUT_UK_NO` | Field | 入力受番番号 (Input acceptance number) — manually entered acceptance number |
| `KEI_2_MAIL_SEND_FLAG` | Field | 解除メール通知有無2 (Removal email notification flag 2) — indicates whether a removal notification email should be sent (second flag) |
| `GYOMU_ERROR_LIST` | Field | 業務エラーリスト (Business error list) — list of business-level errors returned by the common API |
| `GYOMU_DATA` | Field | 業務データ (Business data) — the response body/map from the common API |
| `CONTRACT1` | Field | 契約1 (Contract 1) — primary contract details returned by the API |
| `CONTRACT2` | Field | 契約2 (Contract 2) — secondary contract details returned by the API |
| `NO_UPDATABLE_TIME_ERR` | Constant | 更新不可時間アクセスエラー (Updatable time access error) — constant value `5000`. Thrown when an update is attempted outside an allowed time window (added in IT1-2018-0000116). |
| `NORMAL_END` | Constant | Normal end status code — indicates successful processing completion |
| `SINGLEDATA_ERR` | Constant | Single-data check error — a single field failed validation |
| `RELATION_ERR` | Constant | Related-data check error — related fields have inconsistent values |
| `EXTERNAL_IF_ERR1` | Constant | External IF error 1 (6000) — error occurred in external interface processing |
| `callApiKKA0070001` | Method | Common API method that performs the individual discount applicability inquiry/change request business logic |
| `JKKcommonApiKKA0070001` | Component | Common API handler component for KKA0070001 — the command issuer that processes the individual discount request |
| FTTH | Business term | Fiber To The Home — fiber-optic internet service, one of the services that may have individual discounts |
| Mineo | Business term | mineo — a Japanese MVNO (Mobile Virtual Network Operator) service by NTT docomo |
| ANK-3436-24-00 | Change ticket | eo光×eo電気×mineoセット割対応（仕様変更）(e-hikari × e-electricity × mineo set discount response — specification change) — changed operation date/time computation from inCBSMsg to `JCCModelCommon.getOpeDateTimeStamp()` |
| IT1-2018-0000116 | Change ticket | 更新不可時間アクセスエラー対応 (Updatable time access error response) — separated error code "5000" from relation error into its own dedicated branch, and added the `NO_UPDATABLE_TIME_ERR` constant |
| ANK-4195-00-00 | Change ticket | eo光ネット×mineoセット割施策開始対応 (e-hikari net × mineo set discount policy start response) — added route field extraction |
