corrad-bp/docs/json/process-builder/travel-workflow-variables.json
Md Afiq Iskandar b1fc3d027a Add Travel Reimbursement Workflow Documentation and Enhance Component Functionality
- Introduced comprehensive documentation for the Travel Reimbursement Workflow, detailing form components, process definitions, and business rules.
- Added new custom scripts for the Manager Approval Form and Travel Reimbursement Form to enhance dynamic behavior and validation.
- Updated the ComponentPreview component to include a new prop for field states, improving state management during previews.
- Created JSON files for the Manager Approval Form and Travel Reimbursement Form, defining their structure and validation rules.
- Implemented a new process definition for the travel workflow, outlining the steps and decision points for claim processing.
- Established global variables for managing workflow data, ensuring consistency and accessibility across the process.
2025-07-25 12:02:13 +08:00

282 lines
7.1 KiB
JSON

{
"employeeName": {
"name": "employeeName",
"type": "string",
"scope": "global",
"value": "",
"description": "Full name of the employee submitting the claim"
},
"employeeEmail": {
"name": "employeeEmail",
"type": "string",
"scope": "global",
"value": "",
"description": "Email address of the employee for notifications"
},
"department": {
"name": "department",
"type": "string",
"scope": "global",
"value": "",
"description": "Employee's department name"
},
"tripPurpose": {
"name": "tripPurpose",
"type": "string",
"scope": "global",
"value": "",
"description": "Purpose or reason for the business trip"
},
"destination": {
"name": "destination",
"type": "string",
"scope": "global",
"value": "",
"description": "Travel destination city and country"
},
"departureDate": {
"name": "departureDate",
"type": "string",
"scope": "global",
"value": "",
"description": "Trip departure date in ISO format"
},
"returnDate": {
"name": "returnDate",
"type": "string",
"scope": "global",
"value": "",
"description": "Trip return date in ISO format"
},
"travelType": {
"name": "travelType",
"type": "string",
"scope": "global",
"value": "",
"description": "Primary mode of transportation (flight, train, car, bus)"
},
"transportCost": {
"name": "transportCost",
"type": "number",
"scope": "global",
"value": 0,
"description": "Transportation expenses claimed"
},
"accommodationCost": {
"name": "accommodationCost",
"type": "number",
"scope": "global",
"value": 0,
"description": "Accommodation expenses claimed"
},
"mealsCost": {
"name": "mealsCost",
"type": "number",
"scope": "global",
"value": 0,
"description": "Meals and food expenses claimed"
},
"otherCost": {
"name": "otherCost",
"type": "number",
"scope": "global",
"value": 0,
"description": "Other miscellaneous expenses claimed"
},
"hasReceipts": {
"name": "hasReceipts",
"type": "boolean",
"scope": "global",
"value": false,
"description": "Whether employee has all supporting receipts"
},
"totalCost": {
"name": "totalCost",
"type": "number",
"scope": "global",
"value": 0,
"description": "Total amount claimed (calculated)"
},
"isValidSubmission": {
"name": "isValidSubmission",
"type": "boolean",
"scope": "global",
"value": false,
"description": "Whether the form submission passed validation"
},
"validationError": {
"name": "validationError",
"type": "string",
"scope": "global",
"value": "",
"description": "Validation error message if submission is invalid"
},
"tripDuration": {
"name": "tripDuration",
"type": "number",
"scope": "global",
"value": 0,
"description": "Trip duration in days (calculated)"
},
"submissionTimestamp": {
"name": "submissionTimestamp",
"type": "string",
"scope": "global",
"value": "",
"description": "ISO timestamp when claim was submitted"
},
"policyApiResponse": {
"name": "policyApiResponse",
"type": "object",
"scope": "global",
"value": null,
"description": "Response from company policy rates API"
},
"policyApiError": {
"name": "policyApiError",
"type": "object",
"scope": "global",
"value": null,
"description": "Error from policy API if request fails"
},
"allowedTransport": {
"name": "allowedTransport",
"type": "number",
"scope": "global",
"value": 0,
"description": "Maximum allowed transportation reimbursement per policy"
},
"allowedAccommodation": {
"name": "allowedAccommodation",
"type": "number",
"scope": "global",
"value": 0,
"description": "Maximum allowed accommodation reimbursement per policy"
},
"allowedMeals": {
"name": "allowedMeals",
"type": "number",
"scope": "global",
"value": 0,
"description": "Maximum allowed meals reimbursement per policy"
},
"allowedOther": {
"name": "allowedOther",
"type": "number",
"scope": "global",
"value": 0,
"description": "Maximum allowed other expenses reimbursement per policy"
},
"totalAllowed": {
"name": "totalAllowed",
"type": "number",
"scope": "global",
"value": 0,
"description": "Total allowed reimbursement according to company policy"
},
"reimbursementAmount": {
"name": "reimbursementAmount",
"type": "number",
"scope": "global",
"value": 0,
"description": "Final calculated reimbursement amount"
},
"isOverBudget": {
"name": "isOverBudget",
"type": "boolean",
"scope": "global",
"value": false,
"description": "Whether claimed amount exceeds policy limits"
},
"overBudgetAmount": {
"name": "overBudgetAmount",
"type": "number",
"scope": "global",
"value": 0,
"description": "Amount by which claim exceeds policy limits"
},
"claimSummary": {
"name": "claimSummary",
"type": "string",
"scope": "global",
"value": "",
"description": "Formatted summary string of the travel claim"
},
"approvalStatus": {
"name": "approvalStatus",
"type": "string",
"scope": "global",
"value": "pending",
"description": "Current approval status (pending_approval, auto_approved, etc.)"
},
"managerDecision": {
"name": "managerDecision",
"type": "string",
"scope": "global",
"value": "",
"description": "Manager's approval decision (approve/reject)"
},
"managerComments": {
"name": "managerComments",
"type": "string",
"scope": "global",
"value": "",
"description": "Manager's comments on the approval decision"
},
"finalApprovalStatus": {
"name": "finalApprovalStatus",
"type": "string",
"scope": "global",
"value": "",
"description": "Final approval status after all reviews (approved/rejected)"
},
"approvedAmount": {
"name": "approvedAmount",
"type": "number",
"scope": "global",
"value": 0,
"description": "Final approved reimbursement amount"
},
"approvalTimestamp": {
"name": "approvalTimestamp",
"type": "string",
"scope": "global",
"value": "",
"description": "ISO timestamp when claim was approved/rejected"
},
"approvedBy": {
"name": "approvedBy",
"type": "string",
"scope": "global",
"value": "",
"description": "Who approved the claim (System/Manager name)"
},
"approvalComments": {
"name": "approvalComments",
"type": "string",
"scope": "global",
"value": "",
"description": "Final approval comments"
},
"finalClaimRecord": {
"name": "finalClaimRecord",
"type": "object",
"scope": "global",
"value": null,
"description": "Complete claim record object for storage/archival"
},
"claimId": {
"name": "claimId",
"type": "string",
"scope": "global",
"value": "",
"description": "Unique identifier generated for the claim"
},
"storageResult": {
"name": "storageResult",
"type": "string",
"scope": "global",
"value": "",
"description": "Result of storing claim in database (success/error)"
}
}