Wednesday, July 8, 2026

#1152 - OIC Service Metrics in OCI Management Dashboards - suppressing null values

Introduction

I want to have a widget that displays errors by the hour, however, only for hours where I have errors.
So here is my widget in my OCI Log Analytics dashboard -

The dashes naturally indicate no errors.

Let's try out the following in OCI Management Dashboards, i.e. I'm leaving Log Analytics

I see the same dashboards here, the one I'm interested in his the suffix _V2.

I open it and click edit - 

The MQL - MessagesFailedCount[1h]{resourceId = $(params.instance_ocid)}.sum()

Click on JSON
Add the following line - 
"preventFillGaps": true
Click Apply, then check out the result - 

I run a couple of integrations that will throw errors - 

6 errors - 2 each for the following integrations - 

  • async process order
  • child create order
  • sync update order
Back in Management Dashboards - I change the visualisation to Bar Chart - 

Note: I also reduced the time window in the MQL to 1 minute, so I'd see the result immediately.

A big thanks to my colleague Sindhuja B. for the tip!

Note how only 2 of the integrations are visualised - I need to amend the widget configuration - 

I set the series to flowCode.


I cannot set the Series to flowCode + flowVersion, so please note this limitation.

I can now open the dashboard in OCI Log Analytics and see the amended widget -



Monday, July 6, 2026

#1151 - OIC Logistics Adapter (OTM) & OTM Data Export Agent

Introduction

I looked at this adapter some time ago, but like everything, if you don't use it, you forget it.

OTM is very function rich and I don't pretend to be an SME. So, as a neophyte, how do I integrate with this app? Answer - we use the OIC Logistics adapter.

But, before we start, let's check out the OTM Integration documentation

Here's a screenshot that succinctly describes the integration touchpoints -

You will need an OTM user with the INTEGRATION role, this will be used in the OIC connection definition. We will do this later and then create an integration that leverages the connection. The integration will publish a new location to OTM.

As you can see from the diagram above, OTM can also invoke OIC - OTM connection as OIC Trigger -

From the OTM docs - Sending data from Transportation and Global Trade Management Cloud to another system via OIC can be done by calling the OIC Web Service for the desired integration in OIC. 

More about that later.

Finally, there are pre-built recipes available in OIC for OTM; check them out here - 

Create the OTM Connection in OIC

As you can see, one needs a wsdl url and username / password.

The WSDLs can be retrieved from within OTM - 


The Transmission Service is used to publish data to OTM - 


I copy the Transmission Service URL and use it in my connection definition.


I create an app driven integration that will publish a new location to OTM - 

I use a REST trigger with the following request payload - 

I now add the OTM connection - 

I map as follows - 

I test in the mapper and see the following -



looks good!

Now I run the integration - 

Note the TransactionCode needs to be one of the following - 

I check the integration log - 


Note the Transmission number - 

I can check this in OTM - 

I can find the exact error in the OTM Log - 


I run the integration again - 

this time with a valid domain. I check the Transmission - 

Create Contact Example

Here's the Payload I use - 

{
  "fname": "Renate",
  "lname": "Hasselbacher",
  "email": "r.h@oracle.com"
}

I also created a lookup for common values, this will be leveraged by the mapper in this integration - define once, use many times - change easily, without having to touch the integrations.


I run the integration and get the following transmission number returned - 1964767

I check in OTM - 

I search for my new contact - and there she is - 

Bulk Export from OTM

Check out the OTM REST apis for bulk export -

I begin, as usual, by getting this to work in Postman - 

You can export Business Objects or the underlying DB tables. The latter is the best choice for bulk export.

The OTM Data Dictionary is available at MOS - 


Here is my URL for creating the export request - 

https://myOTMInstance:443/logisticsRestApi/data-int/v1/exportRequests 

 I will be exporting 2 tables to OCI Object Storage; here is the target bucket - 


I will use PAR (Pre-Authenticated Request) 

I copy the URL and paste it into the request - 

{
  "schema": "PRIMARY",
  "excludePublic": true,
  "contentType": "text/plain",
  "externalRef": "niallC-export-001",
  "targetSystem": {"targetURL": "https://myPARURL/n/.../b/niallc-demoBucket/o/locationTableExport",
       "appendName": true,
       "httpMethod": "PUT"
    },
  "tables" : {
    "items" : [
        {
            "tableName": "SHIPMENT",
            "selectList": "SHIPMENT_GID,SHIPMENT_NAME,PERSPECTIVE,INSERT_DATE,UPDATE_DATE"
        },
        {
            "tableName": "LOCATION"
        }
    ]
    }
}

Note the ability to specify which tables to export as well as the option to select only certain columns.

The target url is - 
https://myPAR-URL//n/nnn/b/niallc-demoBucket/o/locationTableExport

I set Auth to Basic and then execute the request in postman -

The response contains a requestID, which I can use to query export progress. 

Here I used - 

I check in Object Storage

Let's replicate this in OIC - 

Data Export via OIC


I begin by creating a REST based connection for OTM.


I then create the following integration - 
This is a synchronous integration that returns the requestId. The Invoke is configured, based on what I did in postman.

Many of the invoke request fields are standard vales, so I externalise these to a Lookup - 

The lookup values are used in the Map action before the Invoke of OTM.

I run the integration with the following request payload - 

Here is the response from OTM - 

Here is the response from the integration - 

I check progress using request id - 


I check my bucket in OCI Object Storage


Let's agentify this.

OIC AI Agent for Data Extract

First step is to expose the following 2 integrations as Agentic Tools - 


Create the Agent Pattern

Create a Prompt Template

Please note, I've hard-coded the tables, LOCATION and SHIPMENT, however, I could have defined these as variables, just as I did with {{currentDate}}. 

Export the following Tables from OTM - LOCATION and SHIPMENT. Add the following columns to the SHIPMENT select list - SHIPMENT_GID, SHIPMENT_NAME, PERSPECTIVE, INSERT_DATE, UPDATE_DATE. Use the following external reference - OIC-OTM-Export-Agent. Set the target Object Storage Folder Name to Location-Shipment-Export. Use the processing date value{{currentDate}}.

Here is the Agent configuration -

you will receive a data export request in the following format - Export the following Tables from OTM - LOCATION and SHIPMENT. Add the following columns to the SHIPMENT select list - SHIPMENT_GID, SHIPMENT_NAME, PERSPECTIVE, INSERT_DATE, UPDATE_DATE. Use the following external reference - OIC-OTM-Export-Agent. Use the processing date value dd-mm-yy.

Use the create OTM export request tool to create the request, setting the target Object Storage Folder Name to Location-Shipment-Export, adding the processing date provided as a suffix. e.g. Location-Shipment-Export-11-07-26. 

You will receive a response with the OTM request id.

Output this response to the user.

Then use the tool get OTM export request status to retrieve the status of the request. Keep executing this tool until you receive a success of failed response. 

Output this response to the user.

Finish with a quote from Marcus Aurelius.

I run the agent - 

I validate in OCI Object Storage

Looks good!
Data export, especially to a data lake,  is usually incremental, so an ask will be - how can I only export the shipments, etc. from the last week?

The OTM REST API support this as follows - 

Note the rangeBefore and rangeAfter fields. Let's try this out - 

I begin by creating a new Contact, Cathal Brugha,  in OTM - 

I execute the following request in postman - 

{
  "schema": "PRIMARY",
  "excludePublic": true,
  "contentType": "text/plain",
  "rangeAfter" : {"value": "2026-07-10T00:00:00Z"},
  "externalRef": "niallC-newContactExport-0710",
   "targetSystem": {
       "targetURL": ".../b/niallc-demoBucket/o/newContactExport",
       "appendName": true,
       "httpMethod": "PUT"
    },
  "tables" : {
        "items" : [
       
            {
                "tableName": "CONTACT"
            }
        ]
    }
}

As you can see, the raw contact data is returned immediately; no file is written to Object Storage.

I add rangeBefore to the request payload - 

I execute the request and see all my new contacts since the start of July - 

Again, no file is written to Object Storage. This I can force by adding the following HTTP Header to the REST request -

  • The "Prefer" HTTP header identifies that the request should be processed asynchronously. If not present, and there is only one table in the request message, the request will be processed synchronously, the HTTP status will be "200 OK" and the exported content will be the response data. In all other cases it will be processed asynchronously, the HTTP status will be "202 Accepted" and the response to the request will be an export status message.

Let's try this out - setting the Prefer header to respond-async -

File is exported to Object Storage - 

Now let's get this working in OIC - 

Essentially the same as the integration, create OTM export request, except I've added the 2 data range fields to the request. 

I also add the Prefer header to the OTM REST api Invoke - 

I augment the Lookup with the default Prefer value - 

I run the integration - 

Note the folder name - OTMExport-0710.

I check in Object Storage

The final step is to schedule such exports. Here I will create a scheduled integration, which will invoke the integration I just created.

I add some global variables - 

I will not use dateRangeBefore in this example. The requestId is an output field for the latest request id returned from OTM. The tables4Export parameter allows me to easily change the list of tables to be exported.

Here is the integration - 


The Stitch action is used to hard code the tables to be exported. In this demo, I hard-code CONTACT and LOCATION. As I mentioned earlier, we could make this a variable, or have it defined in the Lookup.

The Assign Action at the end updates the dateRangeAfter parameter, setting it to the current dateTime.
  
I add some "batch" specific entries to the Lookup - 

I do an ad hoc run the scheduled integration and check in Object Storage - 


Applying a schedule to the scheduled export integration is easy - 

 

Summa Summarum

OIC makes integrating with OTM easy. Whether it's transactional - e.g. create contact, or bulk data export, with OIC you can do such easily and very quickly. You also have the value add of OIC AI Agents and tools, allowing you to "agentify" the process very quickly.