How service connections work
graph LR
VBCS[VBCS Application] -->|Service Connection| SC{Connection Type}
SC -->|Oracle Cloud Applications| FUSION[Oracle Fusion
REST APIs]
SC -->|REST| OIC[OIC Integration
Endpoints]
SC -->|REST| EXT[External REST APIs]
SC -->|ADF Business Components| ADF[ADF BC Services]
VBCS -->|Variables| DATA[Page Variables
Bound to Components]
DATA <-->|Data binding| UI[UI Components
Tables, Forms, Charts]
style VBCS fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0
style DATA fill:#0f2d1f,stroke:#22C55E,color:#e2e8f0
Creating a service connection to OIC
- In VBCS Designer: Services → + Service Connection
- Select Define by Specification (for OIC, use the OpenAPI spec from OIC)
- Enter the OIC endpoint base URL
- Configure authentication: Oracle Cloud Account (uses current user’s IDCS token)
For a VBCS → OIC REST trigger:
// OIC integration endpoint (configure in VBCS service connection)
{
"baseUrl": "https://your-oic.integration.ocp.oraclecloud.com",
"paths": {
"/ic/api/integration/v1/flows/rest/CREATE_PO/1.0/createPO": {
"post": {
"summary": "Create Purchase Order",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CreatePORequest" }
}
}
}
}
}
}
}
Using a service connection in an action chain
// Action: Call REST (configured in action chain designer)
// Service: OIC_CREATE_PO
// Endpoint: POST /createPO
// Request body mapping:
{
"poType": "{{ $page.variables.poForm.poType }}",
"supplierId": "{{ $page.variables.selectedSupplier.id }}",
"lines": "{{ $page.variables.orderLines }}",
"requestedDate": "{{ $page.variables.poForm.requestedDate }}",
"orgId": "{{ $application.user.orgId }}"
}
// Response mapping (success path):
// response.body.poNumber → $page.variables.createdPONumber
// response.body.status → $page.variables.poStatus
Handling pagination in service connections
For Fusion REST APIs that return paginated data:
// Page function: loadAllEmployees
async function loadAllEmployees() {
var allEmployees = [];
var offset = 0;
var limit = 500;
var hasMore = true;
while (hasMore) {
var result = await $page.functions.callGetEmployees({
limit: limit,
offset: offset,
q: "ActiveStatus='ACTIVE'"
});
allEmployees = allEmployees.concat(result.items);
hasMore = result.hasMore;
offset += limit;
}
$page.variables.employees = allEmployees;
return allEmployees.length;
}
Common service connection errors
| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Token expired or wrong scope | Re-test connection, check IDCS client scopes |
| 403 Forbidden | User lacks Fusion role | Check Fusion data roles assigned to user |
| 404 Not Found | Wrong endpoint URL | Check OIC endpoint path with Postman first |
| 429 Too Many Requests | Rate limit hit | Add delay between bulk calls |
| CORS error in browser | Missing CORS headers | OIC requires specific CORS config for VBCS |