Discoverable Procedures
Discoverable procedures in the Oracle Fusion (BDK) Book.
Ensure that you have connected the Oracle Fusion book and then created a new playground before using these automation procedures.
Overview
In Oracle Cloud Fusion, a resource is any object or record type that stores business data, such as an invoice, purchase order, supplier, or customer. Resources define how information is structured, including the fields, relationships, and operations available for that data.
Discovery scans your connected Oracle Cloud Fusion instance to identify these resources, their fields, and the actions they support. Each discovery generates three groups of automation procedures for a given resource:
Basic Operations: Create, Retrieve, Update, and Delete records
Child Operations: Retrieve and Create child records for a resource
Actions: Execute complex actions on specific records
Discovery
Use the following syntax to discover resources from your Oracle Cloud Fusion instance and generate automation procedures. Replace RESOURCE with the resource type to be discovered:
discover "RESOURCE" from oracle fusionOracle Cloud Fusion Resources
Common Oracle Cloud Fusion resources include:
Financial:
invoices,purchaseOrders,receipts,paymentsProcurement:
suppliers,supplierSites,requisitionsProjects:
projects,projectTasks,projectExpensesInventory:
items,itemRevisions,itemCategoriesHCM:
employees,workers,departments
Examples
discover "invoices" from oracle fusiondiscover "suppliers" from oracle fusiondiscover "employees" from oracle fusionBasic Operation Procedures
After discovery, you can use the four basic operation procedures for that resource:
1. Retrieve Records
Get a list of records from the discovered resource.
retrieve some [RESOURCE] records from oracle fusionParameters
the limit is [NUMBER]
Maximum number of records to retrieve
Optional
the offset is [NUMBER]
Number of records to skip for pagination
Optional
whose [FIELD] is [VALUE]
Filter records by specific criteria.
Note: Use the "is" operator for exact matching.
Optional
Examples
# Get all records
retrieve some purchaseOrders records from oracle fusion
# Get first 10 records
retrieve some purchaseOrders records from oracle fusion
the limit is 10
# Get records with pagination
retrieve some purchaseOrders records from oracle fusion
the limit is 10
the offset is 20
# Get records with filter
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
the limit is 10Returns: A list of records from the Oracle Cloud Fusion resource.
Important: We advise setting a limit when retrieving records from resources that can have large quantities of data, as returning all records can cause performance issues.
2. Create Record
Create a new record in the discovered resource.
create a [RESOURCE] record in oracle fusionParameters
the body is [DATA]
The data for the new record
Yes
Example
# First, create the data structure
create a json
use the above as the invoice body
the invoice body's "InvoiceNumber" is "12345678"
the invoice body's "InvoiceCurrency" is "USD"
the invoice body's "InvoiceAmount" is "7000"
the invoice body's "InvoiceDate" is "2025-02-20"
...
# Then create the record
create an invoices record in oracle fusion where
the body is the invoice bodyReturns: The newly created record with all fields populated, including system-generated values.
Important Notes
Only required and create-able fields need to be provided
Oracle Cloud Fusion will generate system fields like ID, creation date, etc.
3. Update Record
Update an existing record in the discovered resource.
update a [RESOURCE] record in oracle fusionParameters
the record is [DATA]
The record with updated data (must include primary key)
Yes
Example
# Get a record
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
use the above as the invoice
# Update the record
set the invoice's "InvoiceAmount" to "8000"
update an invoices record in oracle fusion
the record is the invoiceReturns: The updated record with current values.
Important Notes:
The record data must include a primary key field to identify which record to update
Primary key fields vary by resource (e.g.,
InvoiceIdfor invoices,PurchaseOrderIdfor purchase orders)
4. Delete Record
Delete an existing record from the discovered resource.
delete a [RESOURCE] record in oracle fusionParameters
the record is [DATA]
The record to delete (must include primary key)
Yes
Example
# Get a record
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
use the above as the invoice
# Delete the record
delete an invoices record in oracle fusion
the record is the invoiceImportant Notes:
The record data must include a primary key field to identify which record to delete
Primary key fields vary by resource (e.g.,
InvoiceIdfor invoices,PurchaseOrderIdfor purchase orders)
Child Operation Procedures
Resources can have child resources. For instance, records from the invoices resource have a list of InvoiceLines as children. Discovering a resource also enables procedures for working with its children.
1. Retrieve Child Records
Retrieve existing child records from a resource record.
retrieve some [RESOURCE RECORD]'s [CHILD_NAME] records from oracle fusionParameters
the limit is [NUMBER]
Maximum number of records to retrieve
Optional
the offset is [NUMBER]
Number of records to skip for pagination
Optional
whose [FIELD] is [VALUE]
Filter records by specific criteria
Optional
Examples
# Get a parent record
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
use the above as the invoice
# Get all child records
retrieve the invoice's InvoiceLines records from oracle fusion
# Get first 10 child records
retrieve the invoice's InvoiceLines records from oracle fusion
the limit is 10
# Get child records with pagination
retrieve the invoice's InvoiceLines records from oracle fusion
the limit is 10
the offset is 20
# Get child records with filter
retrieve the invoice's InvoiceLines record from oracle fusion whose "LineNumber" is 2Returns: A list of child records for the specified resource record.
2. Create Child Record
Create a new child record for a resource record.
create a [RESOURCE RECORD]'s [CHILD_NAME] record in oracle fusionParameters
the body is [DATA]
The data for the new child record
Yes
Example
# Get a parent record
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
use the above as the invoice
# Create the data structure
create a json
use the above as the line body
the line body's "LineNumber" is 5
the line body's "AccountingDate" is "2025-08-29"
the line body's "LineAmount" is 8001
the line body's "Description" is "Test from discover"
# Then create the child record
create the invoice's InvoiceLines record in oracle fusion
the body is the line bodyReturns: The newly created child record with all fields populated, including system-generated values.
Action Procedures
Some resources support executing complex actions on their records. Discovering a resource will also allow the usage of procedures that execute these actions.
Execute Action
Execute a specific action on a resource record.
execute a [ACTION_NAME] action for the [RESOURCE RECORD]Parameters
the body is [DATA]
The data required for the action
Optional*
*Some actions require a body with specific fields, while others do not.
Example
# Get a record
retrieve some invoices records from oracle fusion whose InvoiceNumber is "12345678"
use the above as the invoice
# Create the action data structure
the string is '{"ProcessAction": "Validate"}'
get the string as json
use the above as the validation body
# Execute the action
execute a validateInvoice action for the invoice
the body is the validation bodyReturns: The result of the action execution.
Important Notes:
Different resources have different actions that can be executed
Check the procedures returned when discovering a resource to see available actions
Some actions require specific data to be passed in the body
Required body fields vary from action to action
Complete Workflow Examples
1. Working with Invoices
This example demonstrates discovering invoices, creating, retrieving, updating, and working with invoice lines:
# 1. Discover the invoices resource
discover "invoices" from oracle fusion
# 2. Create a new invoice
create a json
use the above as the invoice body
the invoice body's "InvoiceNumber" is "INV-2025-001"
the invoice body's "InvoiceCurrency" is "USD"
the invoice body's "InvoiceAmount" is "7000"
the invoice body's "InvoiceDate" is "2025-02-20"
the invoice body's "BusinessUnit" is "US Business Unit"
create an invoices record in oracle fusion where
the body is the invoice body
use the above as the created invoice
# 3. Retrieve invoices with filter
retrieve some invoices records from oracle fusion whose InvoiceNumber is "INV-2025-001"
the limit is 10
# 4. Update the invoice
set the created invoice's "InvoiceAmount" to "8000"
update an invoices record in oracle fusion
the record is the created invoice
# 5. Add invoice lines (child records)
create a json
use the above as the line body
the line body's "LineNumber" is 1
the line body's "AccountingDate" is "2025-02-20"
the line body's "LineAmount" is 4000
the line body's "Description" is "Professional Services"
create the created invoice's InvoiceLines record in oracle fusion where
the body is the line body
# 6. Retrieve invoice lines
retrieve the created invoice's InvoiceLines records from oracle fusion
the limit is 10
# 7. Execute an action (validate invoice)
the string is '{"ProcessAction": "Validate"}'
get the string as json
use the above as the validation body
execute a validateInvoice action for the created invoice
the body is the validation body2. Working with Purchase Orders
This example shows how to work with purchase orders and their lines:
# 1. Discover the purchase orders resource
discover "purchaseOrders" from oracle fusion
# 2. Retrieve purchase orders with pagination
retrieve some purchaseOrders records from oracle fusion
the limit is 20
the offset is 0
# 3. Filter by specific criteria
retrieve some purchaseOrders records from oracle fusion whose Status is "APPROVED"
the limit is 10
use the first record as the purchase order
# 4. Retrieve purchase order lines
retrieve the purchase order's PurchaseOrderLines records from oracle fusion
# 5. Create a new purchase order line
create a json
use the above as the po line body
the po line body's "LineNumber" is 10
the po line body's "ItemDescription" is "Office Supplies"
the po line body's "Quantity" is 100
the po line body's "UnitPrice" is 25.50
create the purchase order's PurchaseOrderLines record in oracle fusion where
the body is the po line body3. Managing Suppliers
This example demonstrates working with suppliers:
# 1. Discover the suppliers resource
discover "suppliers" from oracle fusion
# 2. Create a new supplier
create a json
use the above as the supplier body
the supplier body's "SupplierName" is "ACME Corporation"
the supplier body's "TaxpayerId" is "12-3456789"
the supplier body's "SupplierType" is "VENDOR"
create a suppliers record in oracle fusion where
the body is the supplier body
use the above as the new supplier
# 3. Retrieve suppliers by name
retrieve some suppliers records from oracle fusion whose SupplierName is "ACME Corporation"
# 4. Update supplier information
set the new supplier's "SupplierType" to "PREFERRED_VENDOR"
update a suppliers record in oracle fusion
the record is the new supplierUnderstanding Procedure Groups
Oracle Cloud Fusion discovered resources have three procedure groups:
Basic Operations
Create, Retrieve, Update, Delete
Standard CRUD operations on resource records
Managing main resource records like invoices, orders, suppliers
Child Operations
Retrieve, Create
Work with nested/related records within a parent resource
Managing invoice lines, order lines, and other child entities
Actions
Execute
Perform complex business operations
Validating invoices, approving orders, processing payments
Typical Workflow
Discover the resource to generate all procedures
Use Basic Operations to manage parent records
Use Child Operations to manage related child records
Use Actions to execute business processes on records
Best Practices
Always set appropriate limits when retrieving large datasets
Include primary key fields when updating or deleting records
Check available actions after discovery to understand resource capabilities
Use filtering to retrieve specific records efficiently
Handle pagination properly for large result sets
Last updated
Was this helpful?
