Boolean data type is used to store true or false values in OIC. It is mainly used for conditions, flags, and decision-making logic.
Step 1: Create a REST Trigger
First, we create a REST trigger and define a request payload that contains a list of invoices. Each invoice includes invoice number, invoice date, supplier name, invoice amount, currency, and approval status.
Sample payload:
[
{
“invoiceNumber”: “INV1001”,
“invoiceDate”: “2025-01-15”,
“supplierName”: “ABC Suppliers”,
“invoiceAmount”: 5000,
“currency”: “INR”,
“isApproved”: true
},
{
“invoiceNumber”: “INV1002”,
“invoiceDate”: “2025-02-15”,
“supplierName”: “ABC Suppliers”,
“invoiceAmount”: 5000,
“currency”: “USD”,
“isApproved”: true
},
{
“invoiceNumber”: “INV10013”,
“invoiceDate”: “2025-03-15”,
“supplierName”: “ABC Suppliers”,
“invoiceAmount”: 5000,
“currency”: “INR”,
“isApproved”: true
}
]
Step 2: Create a Boolean Global Variable
Create a global variable named gv_isHighValueInvoice and set its data type as Boolean.
This variable will be used to store true or false based on the invoice amount.