# Salesforce Product2 Setup - Complete Portal Products

This document provides the complete list of Product2 records to create in Salesforce with all field values specified, including edge case handling and validation rules.

## Core Fields Reference

All products require these core fields:

- `StockKeepingUnit` (Text, 255) - External ID, Unique (standard Salesforce field)
- `Product2Categories1__c` (Picklist) - "Internet", "SIM", "VPN", "Other"
- `Portal_Catalog__c` (Checkbox) - Show in main catalog
- `Portal_Accessible__c` (Checkbox) - Can be used in orders
- `Item_Class__c` (Picklist) - "Service", "Installation", "Add-on", "Activation"
- `Billing_Cycle__c` (Picklist) - "Monthly", "Onetime"
- `WH_Product_ID__c` (Number, 18, 0) - WHMCS Product ID
- `WH_Product_Name__c` (Text, 255) - WHMCS Product Name

## Edge Case Handling Fields

### Product Disambiguation Fields

```sql
-- Handle multiple activation fees or installation options
Is_Default__c           Checkbox         -- Default choice when multiple options exist
Display_Order__c        Number(18,0)     -- Ordering for UI selection (0 = first)
Auto_Add__c            Checkbox         -- Automatically add to orders (required fees)
```

### Regional/Conditional Fields

```sql
-- Handle region-specific products (VPN, Internet eligibility)
VPN_Region__c           Picklist         -- "USA-SF", "UK-London", "Global", null
Internet_Region__c      Text(255)        -- Geographic restriction
Eligibility_Condition__c Text(1000)      -- JSON conditions for availability
```

### Product Relationship Fields

```sql
-- Handle complex dependencies and conflicts
Required_Products__c    Text(1000)       -- JSON array of required SKUs
Dependent_Products__c   Text(1000)       -- JSON array of auto-added SKUs
Mutually_Exclusive__c   Text(1000)       -- JSON array of conflicting SKUs
```

## Internet Products

### Main Service Plans

#### Internet Silver - Home 1G

```
Name: Internet Silver Plan (Home 1G)
StockKeepingUnit: INTERNET-SILVER-HOME-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 181
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Home 1G) [SILVER]
Internet_Plan_Tier__c: Silver
Internet_Offering_Type__c: Home 1G
Internet_Monthly_Price__c: 6000
Display_Order__c: 1
```

#### Internet Gold - Home 1G

```
Name: Internet Gold Plan (Home 1G)
StockKeepingUnit: INTERNET-GOLD-HOME-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 182
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Home 1G) [GOLD]
Internet_Plan_Tier__c: Gold
Internet_Offering_Type__c: Home 1G
Internet_Monthly_Price__c: 6500
Display_Order__c: 2
```

#### Internet Platinum - Home 1G

```
Name: Internet Platinum Plan (Home 1G)
StockKeepingUnit: INTERNET-PLATINUM-HOME-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 183
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Home 1G) [PLATINUM - Base Plan]
Internet_Plan_Tier__c: Platinum
Internet_Offering_Type__c: Home 1G
Internet_Monthly_Price__c: 6500
Display_Order__c: 3
```

#### Internet Silver - Apartment 1G

```
Name: Internet Silver Plan (Apartment 1G)
StockKeepingUnit: INTERNET-SILVER-APT-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 184
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 1G) [SILVER]
Internet_Plan_Tier__c: Silver
Internet_Offering_Type__c: Apartment 1G
Internet_Monthly_Price__c: 4800
Display_Order__c: 4
```

#### Internet Gold - Apartment 1G

```
Name: Internet Gold Plan (Apartment 1G)
StockKeepingUnit: INTERNET-GOLD-APT-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 185
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 1G) [GOLD]
Internet_Plan_Tier__c: Gold
Internet_Offering_Type__c: Apartment 1G
Internet_Monthly_Price__c: 5300
Display_Order__c: 5
```

#### Internet Platinum - Apartment 1G

```
Name: Internet Platinum Plan (Apartment 1G)
StockKeepingUnit: INTERNET-PLATINUM-APT-1G
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 186
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 1G) [PLATINUM - Base Plan]
Internet_Plan_Tier__c: Platinum
Internet_Offering_Type__c: Apartment 1G
Internet_Monthly_Price__c: 5300
Display_Order__c: 6
```

#### Internet Silver - Apartment 100M

```
Name: Internet Silver Plan (Apartment 100M)
StockKeepingUnit: INTERNET-SILVER-APT-100M
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 187
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 100M) [SILVER]
Internet_Plan_Tier__c: Silver
Internet_Offering_Type__c: Apartment 100M
Internet_Monthly_Price__c: 4800
Display_Order__c: 7
```

#### Internet Gold - Apartment 100M

```
Name: Internet Gold Plan (Apartment 100M)
StockKeepingUnit: INTERNET-GOLD-APT-100M
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 188
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 100M) [GOLD]
Internet_Plan_Tier__c: Gold
Internet_Offering_Type__c: Apartment 100M
Internet_Monthly_Price__c: 5300
Display_Order__c: 8
```

#### Internet Platinum - Apartment 100M

```
Name: Internet Platinum Plan (Apartment 100M)
StockKeepingUnit: INTERNET-PLATINUM-APT-100M
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 189
WH_Product_Name__c: SonixNet via NTT Optical Fiber (APT 100M) [PLATINUM - Base Plan]
Internet_Plan_Tier__c: Platinum
Internet_Offering_Type__c: Apartment 100M
Internet_Monthly_Price__c: 5300
Display_Order__c: 9
```

#### Internet Silver - Flets X (Home 10G)

```
Name: Internet Silver Plan (Flets X)
StockKeepingUnit: INTERNET-SILVER-FLETS-X
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 239
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Flets X) [SILVER]
Internet_Plan_Tier__c: Silver
Internet_Offering_Type__c: Home 10G
Internet_Monthly_Price__c: 8000
Display_Order__c: 10
```

#### Internet Gold - Flets X (Home 10G)

```
Name: Internet Gold Plan (Flets X)
StockKeepingUnit: INTERNET-GOLD-FLETS-X
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 214
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Flets X) [GOLD]
Internet_Plan_Tier__c: Gold
Internet_Offering_Type__c: Home 10G
Internet_Monthly_Price__c: 8500
Display_Order__c: 11
```

#### Internet Platinum - Flets X (Home 10G)

```
Name: Internet Platinum Plan (Flets X)
StockKeepingUnit: INTERNET-PLATINUM-FLETS-X
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 213
WH_Product_Name__c: SonixNet via NTT Optical Fiber (Flets X) [PLATINUM - Base Plan]
Internet_Plan_Tier__c: Platinum
Internet_Offering_Type__c: Home 10G
Internet_Monthly_Price__c: 8500
Display_Order__c: 12
```

### Installation Options

#### Single Installation

```
Name: NTT Installation Fee (Single Payment)
StockKeepingUnit: INTERNET-INSTALL-SINGLE
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Installation
Billing_Cycle__c: Onetime
WH_Product_ID__c: 242
WH_Product_Name__c: NTT Installation Fee (Single Installment)
Is_Default__c: true
Auto_Add__c: false
Display_Order__c: 1
```

#### 12-Month Installation

```
Name: NTT Installation Fee (12-Month Plan)
StockKeepingUnit: INTERNET-INSTALL-12M
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Installation
Billing_Cycle__c: Monthly
WH_Product_ID__c: 243
WH_Product_Name__c: NTT Installation Fee (12-Month Installment)
Is_Default__c: false
Auto_Add__c: false
Display_Order__c: 2
```

#### 24-Month Installation

```
Name: NTT Installation Fee (24-Month Plan)
StockKeepingUnit: INTERNET-INSTALL-24M
Product2Categories1__c: Internet
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Installation
Billing_Cycle__c: Monthly
WH_Product_ID__c: 244
WH_Product_Name__c: NTT Installation Fee (24-Month Installment)
Is_Default__c: false
Auto_Add__c: false
Display_Order__c: 3
```

### Internet Add-ons (Hidden from Catalog)

#### Weekend Installation

```
Name: NTT Weekend Installation Fee
StockKeepingUnit: INTERNET-INSTALL-WEEKEND
Product2Categories1__c: Internet
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Onetime
WH_Product_ID__c: 245
WH_Product_Name__c: NTT Installation Fee (Weekend Additional)
Auto_Add__c: true
Mutually_Exclusive__c: ["INTERNET-INSTALL-WEEKDAY"]
```

#### Hikari Denwa Service

```
Name: Hikari Denwa (Home Phone)
StockKeepingUnit: INTERNET-ADDON-HOME-PHONE
Product2Categories1__c: Internet
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Monthly
WH_Product_ID__c: 246
WH_Product_Name__c: Hikari Denwa Monthly Service
Required_Products__c: ["INTERNET-ADDON-HIKARI-DENWA-INSTALL"]
```

#### Hikari Denwa Installation

```
Name: Hikari Denwa Installation Fee
StockKeepingUnit: INTERNET-ADDON-HIKARI-DENWA-INSTALL
Product2Categories1__c: Internet
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Onetime
WH_Product_ID__c: 247
WH_Product_Name__c: Hikari Denwa Installation Fee
Auto_Add__c: true
```

## SIM Products

### Data-only Plans

#### SIM Data-only 5GB

```
Name: SIM Data-only 5GB
StockKeepingUnit: SIM-DATA-ONLY-5GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 97
WH_Product_Name__c: SonixNet SIM Service Data-only/5GB (Monthly)
SIM_Data_Size__c: 5GB
SIM_Plan_Type__c: DataOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 1
```

#### SIM Data-only 10GB

```
Name: SIM Data-only 10GB
StockKeepingUnit: SIM-DATA-ONLY-10GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 219
WH_Product_Name__c: SonixNet SIM Service Data-only/10GB (Monthly)
SIM_Data_Size__c: 10GB
SIM_Plan_Type__c: DataOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 2
```

#### SIM Data-only 25GB

```
Name: SIM Data-only 25GB
StockKeepingUnit: SIM-DATA-ONLY-25GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 248
WH_Product_Name__c: SonixNet SIM Service Data-only/25GB (Monthly)
SIM_Data_Size__c: 25GB
SIM_Plan_Type__c: DataOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 3
```

#### SIM Data-only 30GB (3GB/3days)

```
Name: SIM Data-only 30GB (3GB/3days)
StockKeepingUnit: SIM-DATA-ONLY-30GB-3DAY
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 98
WH_Product_Name__c: SonixNet SIM Service Data-only/30GB (3GB/3days) (Monthly)
SIM_Data_Size__c: 30GB
SIM_Plan_Type__c: DataOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 4
```

#### SIM Data-only 50GB

```
Name: SIM Data-only 50GB
StockKeepingUnit: SIM-DATA-ONLY-50GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 252
WH_Product_Name__c: SonixNet SIM Service Data-only/50GB (Monthly)
SIM_Data_Size__c: 50GB
SIM_Plan_Type__c: DataOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 5
```

### Data+Voice Plans (Regular)

#### SIM Data+Voice 5GB

```
Name: SIM Data+Voice 5GB
StockKeepingUnit: SIM-DATA-VOICE-5GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 105
WH_Product_Name__c: SonixNet SIM Service Data+Voice/5GB (Monthly)
SIM_Data_Size__c: 5GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: false
Display_Order__c: 1
```

#### SIM Data+Voice 10GB

```
Name: SIM Data+Voice 10GB
StockKeepingUnit: SIM-DATA-VOICE-10GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 216
WH_Product_Name__c: SonixNet SIM Service Data+Voice/10GB (Monthly)
SIM_Data_Size__c: 10GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: false
Display_Order__c: 2
```

#### SIM Data+Voice 25GB

```
Name: SIM Data+Voice 25GB
StockKeepingUnit: SIM-DATA-VOICE-25GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 247
WH_Product_Name__c: SonixNet SIM Service Data+Voice/25GB (Monthly)
SIM_Data_Size__c: 25GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: false
Display_Order__c: 3
```

#### SIM Data+Voice 30GB (3GB/3days)

```
Name: SIM Data+Voice 30GB (3GB/3days)
StockKeepingUnit: SIM-DATA-VOICE-30GB-3DAY
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 107
WH_Product_Name__c: SonixNet SIM Service Data+Voice/30GB (3GB/3days) (Monthly)
SIM_Data_Size__c: 30GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: false
Display_Order__c: 4
```

#### SIM Data+Voice 50GB

```
Name: SIM Data+Voice 50GB
StockKeepingUnit: SIM-DATA-VOICE-50GB
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 250
WH_Product_Name__c: SonixNet SIM Service Data+Voice/50GB (Monthly)
SIM_Data_Size__c: 50GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: false
Display_Order__c: 5
```

### Voice-Only Plan

#### SIM Voice-Only

```
Name: SIM Voice-Only
StockKeepingUnit: SIM-VOICE-ONLY
Product2Categories1__c: SIM
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 142
WH_Product_Name__c: SonixNet SIM Service Voice-Only (Monthly)
SIM_Data_Size__c: Voice-Only
SIM_Plan_Type__c: VoiceOnly
SIM_Has_Family_Discount__c: false
Display_Order__c: 0
```

### Family Discount Plans (Hidden from Catalog)

#### SIM Data+Voice 5GB (Family)

```
Name: SIM Data+Voice 5GB (Family Discount)
StockKeepingUnit: SIM-DATA-VOICE-5GB-FAMILY
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 108
WH_Product_Name__c: SonixNet SIM Service Data+Voice/5GB (Family Discount/Monthly)
SIM_Data_Size__c: 5GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: true
Display_Order__c: 1
```

#### SIM Data+Voice 10GB (Family)

```
Name: SIM Data+Voice 10GB (Family Discount)
StockKeepingUnit: SIM-DATA-VOICE-10GB-FAMILY
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 217
WH_Product_Name__c: SonixNet SIM Service Data+Voice/10GB (Family Discount/Monthly)
SIM_Data_Size__c: 10GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: true
Display_Order__c: 2
```

#### SIM Data+Voice 25GB (Family)

```
Name: SIM Data+Voice 25GB (Family Discount)
StockKeepingUnit: SIM-DATA-VOICE-25GB-FAMILY
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 249
WH_Product_Name__c: SonixNet SIM Service Data+Voice/25GB (Family Discount/Monthly)
SIM_Data_Size__c: 25GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: true
Display_Order__c: 3
```

#### SIM Data+Voice 30GB (Family)

```
Name: SIM Data+Voice 30GB (Family Discount)
StockKeepingUnit: SIM-DATA-VOICE-30GB-3DAY-FAMILY
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 109
WH_Product_Name__c: SonixNet SIM Service Data+Voice/30GB (3GB/3days) (Family Discount/Monthly)
SIM_Data_Size__c: 30GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: true
Display_Order__c: 4
```

#### SIM Data+Voice 50GB (Family)

```
Name: SIM Data+Voice 50GB (Family Discount)
StockKeepingUnit: SIM-DATA-VOICE-50GB-FAMILY
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 251
WH_Product_Name__c: SonixNet SIM Service Data+Voice/50GB (Family Discount/Monthly)
SIM_Data_Size__c: 50GB
SIM_Plan_Type__c: DataSmsVoice
SIM_Has_Family_Discount__c: true
Display_Order__c: 5
```

### SIM Add-ons (Hidden from Catalog)

#### Voice Mail Option

```
Name: SIM Voice Mail Option
StockKeepingUnit: SIM-ADDON-VOICE-MAIL
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Monthly
WH_Product_ID__c: 119
WH_Product_Name__c: SonixNet SIM Service Voice Mail Option (Monthly)
SIM_Plan_Type__c: Add-on
Display_Order__c: 1
```

#### Call Waiting Option

```
Name: SIM Call Waiting Option
StockKeepingUnit: SIM-ADDON-CALL-WAITING
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Monthly
WH_Product_ID__c: 123
WH_Product_Name__c: SonixNet SIM Service Call Waiting Option (Monthly)
SIM_Plan_Type__c: Add-on
Display_Order__c: 2
```

#### Unlimited Calling Option (Clean naming - no V2)

```
Name: SIM Unlimited Calling Option
StockKeepingUnit: SIM-ADDON-UNLIMITED-CALLING
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Add-on
Billing_Cycle__c: Monthly
WH_Product_ID__c: 125
WH_Product_Name__c: SonixNet SIM Service Unlimited 15 (Domestic) Free Calling Option (Monthly)
SIM_Plan_Type__c: Add-on
Display_Order__c: 3
```

### SIM Activation Fee (Hidden from Catalog)

#### SIM Activation Fee

```
Name: SIM Activation Fee
StockKeepingUnit: SIM-ACTIVATION-FEE
Product2Categories1__c: SIM
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Activation
Billing_Cycle__c: Onetime
WH_Product_ID__c: 99
WH_Product_Name__c: SonixNet SIM Service (Activation Fee)
Is_Default__c: true
Auto_Add__c: true
Display_Order__c: 1
```

## VPN Products

### VPN Service Plans

#### VPN USA-SF

```
Name: VPN Remote Access (USA-SF)
StockKeepingUnit: VPN-REMOTE-ACCESS-USA-SF
Product2Categories1__c: VPN
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 33
WH_Product_Name__c: SonixNet USA Remote Access VPN Service (Monthly)
VPN_Region__c: USA-SF
Display_Order__c: 1
```

#### VPN UK-London

```
Name: VPN Remote Access (UK-London)
StockKeepingUnit: VPN-REMOTE-ACCESS-UK-LONDON
Product2Categories1__c: VPN
Portal_Catalog__c: true
Portal_Accessible__c: true
Item_Class__c: Service
Billing_Cycle__c: Monthly
WH_Product_ID__c: 54
WH_Product_Name__c: SonixNet UK Remote Access VPN Service (Monthly)
VPN_Region__c: UK-London
Display_Order__c: 2
```

### VPN Activation Fee (Hidden from Catalog)

#### VPN Activation Fee

```
Name: VPN Account Activation Fee
StockKeepingUnit: VPN-ACTIVATION-FEE
Product2Categories1__c: VPN
Portal_Catalog__c: false
Portal_Accessible__c: true
Item_Class__c: Activation
Billing_Cycle__c: Onetime
WH_Product_ID__c: 37
WH_Product_Name__c: SonixNet VPN Services (Account Activation Fee)
Is_Default__c: true
Auto_Add__c: true
Display_Order__c: 1
```

## Edge Case Examples

### Multiple Activation Fees

```sql
-- SIM Activation Fee (default)
Name: "SIM Activation Fee"
StockKeepingUnit: "SIM-ACTIVATION-FEE"
Item_Class__c: "Activation"
Is_Default__c: true
Auto_Add__c: true
Display_Order__c: 1

-- SIM Premium Activation (optional upgrade)
Name: "SIM Premium Activation"
StockKeepingUnit: "SIM-ACTIVATION-PREMIUM"
Item_Class__c: "Activation"
Is_Default__c: false
Auto_Add__c: false
Display_Order__c: 2
```

### Regional Products

```sql
-- VPN Activation for USA
Name: "VPN Activation Fee (USA)"
StockKeepingUnit: "VPN-ACTIVATION-USA"
VPN_Region__c: "USA-SF"
Is_Default__c: true

-- Global VPN Activation (fallback)
Name: "VPN Activation Fee"
StockKeepingUnit: "VPN-ACTIVATION-GLOBAL"
VPN_Region__c: "Global"
Is_Default__c: false
Display_Order__c: 2
```

### Product Dependencies

```sql
-- Hikari Denwa service requires installation
Name: "Hikari Denwa (Home Phone)"
StockKeepingUnit: "INTERNET-ADDON-HOME-PHONE"
Required_Products__c: '["INTERNET-ADDON-HIKARI-DENWA-INSTALL"]'

-- Weekend installation conflicts with weekday
Name: "Weekend Installation"
StockKeepingUnit: "INTERNET-INSTALL-WEEKEND"
Mutually_Exclusive__c: '["INTERNET-INSTALL-WEEKDAY"]'

-- Premium SIM includes voice mail
Name: "SIM Premium Plan"
StockKeepingUnit: "SIM-PREMIUM-10GB"
Dependent_Products__c: '["SIM-ADDON-VOICE-MAIL"]'
```

## Setup Instructions

### 1. Create Custom Fields

First, create these custom fields on the Product2 object:

#### Core Fields

- `StockKeepingUnit` (Text, 255, External ID, Unique) - Standard Salesforce field
- `Product2Categories1__c` (Picklist: Internet, SIM, VPN, Other)
- `Portal_Catalog__c` (Checkbox, Default: false)
- `Portal_Accessible__c` (Checkbox, Default: true)
- `Item_Class__c` (Picklist: Service, Installation, Add-on, Activation)
- `Billing_Cycle__c` (Picklist: Monthly, Onetime)
- `WH_Product_ID__c` (Number, 18, 0)
- `WH_Product_Name__c` (Text, 255)

#### Edge Case Handling Fields

- `Is_Default__c` (Checkbox, Default: false)
- `Display_Order__c` (Number, 18, 0)
- `Auto_Add__c` (Checkbox, Default: false)
- `VPN_Region__c` (Picklist: USA-SF, UK-London, Global)
- `Internet_Region__c` (Text, 255)
- `Required_Products__c` (Text, 1000)
- `Dependent_Products__c` (Text, 1000)
- `Mutually_Exclusive__c` (Text, 1000)

#### Internet Fields

- `Internet_Plan_Tier__c` (Picklist: Silver, Gold, Platinum)
- `Internet_Offering_Type__c` (Picklist: Home 1G, Home 10G, Apartment 1G, Apartment 100M)
- `Internet_Monthly_Price__c` (Currency)

#### SIM Fields

- `SIM_Data_Size__c` (Text, 50)
- `SIM_Plan_Type__c` (Picklist: DataOnly, DataSmsVoice, VoiceOnly, Add-on)
- `SIM_Has_Family_Discount__c` (Checkbox, Default: false)

### 2. Create Products

Use the product definitions above to create each Product2 record with the specified field values.

### 3. Create Pricebook Entries

For each product, create a PricebookEntry in the "Portal" pricebook with appropriate pricing.

### 4. Migration from Existing Data

#### Phase 1: Add New Fields (Non-Breaking)

```sql
-- Add new fields to Product2 object
ALTER TABLE Product2 ADD COLUMN Is_Default__c BOOLEAN DEFAULT false;
ALTER TABLE Product2 ADD COLUMN Display_Order__c NUMBER(18,0);
ALTER TABLE Product2 ADD COLUMN Auto_Add__c BOOLEAN DEFAULT false;
ALTER TABLE Product2 ADD COLUMN VPN_Region__c VARCHAR(255);
ALTER TABLE Product2 ADD COLUMN Required_Products__c VARCHAR(1000);
ALTER TABLE Product2 ADD COLUMN Dependent_Products__c VARCHAR(1000);
ALTER TABLE Product2 ADD COLUMN Mutually_Exclusive__c VARCHAR(1000);
```

#### Phase 2: Populate Default Values

```sql
-- Mark existing activation fees as default
UPDATE Product2
SET Is_Default__c = true, Auto_Add__c = true, Display_Order__c = 1
WHERE Item_Class__c = 'Activation'
AND StockKeepingUnit IN ('SIM-ACTIVATION-FEE', 'VPN-ACTIVATION-FEE', 'INTERNET-INSTALL-SINGLE');

-- Set VPN regions
UPDATE Product2
SET VPN_Region__c = 'Global'
WHERE Product2Categories1__c = 'VPN' AND VPN_Region__c IS NULL;
```

#### Phase 3: Add Product Relationships

```sql
-- Hikari Denwa requires installation
UPDATE Product2
SET Required_Products__c = '["INTERNET-ADDON-HIKARI-DENWA-INSTALL"]'
WHERE StockKeepingUnit = 'INTERNET-ADDON-HOME-PHONE';

-- Weekend installation conflicts
UPDATE Product2
SET Mutually_Exclusive__c = '["INTERNET-INSTALL-WEEKDAY"]'
WHERE StockKeepingUnit = 'INTERNET-INSTALL-WEEKEND';
```

## Validation Rules

### 1. Default Product Validation

```sql
-- Ensure only one default per category/class combination
-- Salesforce Validation Rule
AND(
  Is_Default__c = true,
  ISBLANK(
    VLOOKUP(
      Product2Categories1__c & Item_Class__c,
      $CustomObject.Product_Defaults__c.Category_Class__c,
      $CustomObject.Product_Defaults__c.Default_SKU__c
    )
  )
)
```

### 2. JSON Field Validation

```sql
-- Validate JSON format in relationship fields
-- Apex Trigger validation
if (trigger.isInsert || trigger.isUpdate) {
  for (Product2 p : trigger.new) {
    if (p.Required_Products__c != null) {
      try {
        List<String> skus = (List<String>) JSON.deserialize(p.Required_Products__c, List<String>.class);
      } catch (Exception e) {
        p.addError('Required_Products__c must be valid JSON array');
      }
    }
  }
}
```

## Validation Checklist

After creating all products, verify:

- ✅ All SKUs use detailed format (e.g., INTERNET-SILVER-APT-1G)
- ✅ All catalog products have `Portal_Catalog__c = true`
- ✅ All add-ons have `Portal_Catalog__c = false, Portal_Accessible__c = true`
- ✅ All activation fees have `Is_Default__c = true, Auto_Add__c = true`
- ✅ All WHMCS Product IDs match your WHMCS setup
- ✅ All products have corresponding PricebookEntry records
- ✅ No V2 suffixes in clean product naming
- ✅ All field names use correct Salesforce conventions

## Summary

**Total Products to Create: 48**

- **Internet**: 15 products (12 services + 3 installations + 3 add-ons)
- **SIM**: 30 products (11 main + 5 family + 3 add-ons + 1 activation)
- **VPN**: 3 products (2 services + 1 activation)

This setup provides a complete product catalog with proper edge case handling, validation rules, and detailed SKU naming strategy for your portal.
