75 lines
1.9 KiB
TypeScript
Raw Normal View History

/**
* Support Domain - Contract
*
* Constants for support case statuses, priorities, and categories.
* These are the DISPLAY values shown in the portal UI.
*
* Note: Salesforce uses Japanese API names internally (e.g., , , , , )
* which are mapped to these English display values by the Salesforce mapper.
*/
/**
* Portal display status values
* Mapped from Salesforce Japanese API names:
* - New
* - In Progress
* - Awaiting Approval Awaiting Approval
* - VPN Pending VPN Pending
* - Pending Pending
* - Resolved
* - Closed Closed
*/
export const SUPPORT_CASE_STATUS = {
NEW: "New",
IN_PROGRESS: "In Progress",
AWAITING_APPROVAL: "Awaiting Approval",
VPN_PENDING: "VPN Pending",
PENDING: "Pending",
RESOLVED: "Resolved",
CLOSED: "Closed",
} as const;
/** Statuses that indicate a case is closed */
export const CLOSED_STATUSES = [
SUPPORT_CASE_STATUS.VPN_PENDING,
SUPPORT_CASE_STATUS.PENDING,
SUPPORT_CASE_STATUS.RESOLVED,
SUPPORT_CASE_STATUS.CLOSED,
] as const;
/** Statuses that indicate a case is open */
export const OPEN_STATUSES = [
SUPPORT_CASE_STATUS.NEW,
SUPPORT_CASE_STATUS.IN_PROGRESS,
SUPPORT_CASE_STATUS.AWAITING_APPROVAL,
] as const;
/**
* Portal display priority values
* Mapped from Salesforce Japanese API names:
* - High
* - Medium
* - Low
*/
export const SUPPORT_CASE_PRIORITY = {
LOW: "Low",
MEDIUM: "Medium",
HIGH: "High",
} as const;
/**
* Case categories map to Salesforce Case.Type field
* Note: Type picklist may not be configured in your org
*/
export const SUPPORT_CASE_CATEGORY = {
TECHNICAL: "Technical",
BILLING: "Billing",
GENERAL: "General",
FEATURE_REQUEST: "Feature Request",
} as const;
/**
* Portal support origin - used to filter and create customer-visible portal support cases
*/
export const PORTAL_CASE_ORIGIN = "Portal Support" as const;