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
Basic 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.
Parameters
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
Returns: 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.
Parameters
the body is [DATA]
The data for the new record
Yes
Example
Returns: 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.
Parameters
the record is [DATA]
The record with updated data (must include primary key)
Yes
Example
Returns: 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.
Parameters
the record is [DATA]
The record to delete (must include primary key)
Yes
Example
Important 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.
Parameters
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
Returns: A list of child records for the specified resource record.
2. Create Child Record
Create a new child record for a resource record.
Parameters
the body is [DATA]
The data for the new child record
Yes
Example
Returns: 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.
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
Returns: 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:
2. Working with Purchase Orders
This example shows how to work with purchase orders and their lines:
3. Managing Suppliers
This example demonstrates working with suppliers:
Understanding 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?
