Section 01

Architecture Overview

DataIQ is a dedicated integration layer sitting between LicenseIQ and external data systems β€” primarily Oracle Cloud ERP (Fusion / FSCM) and EDI trading partners. LicenseIQ never makes direct Oracle API calls. Instead it calls named MCP tools that DataIQ exposes, and DataIQ handles all the Oracle-specific complexity: authentication, SCIM query syntax, ID field mapping, expand parameters, and write-back idempotency.

LicenseIQ
AI agents & finance workflows
β†’
DataIQ
MCP tools Β· Sync Β· Write-back Β· EDI
β†’
Oracle ERP
Cloud FSCM REST APIs
EDI Partners
Walmart, Target, Costco…
β†’
DataIQ
AS2 / SFTP ingestion
All LicenseIQ ↔ DataIQ communication is via the MCP Streamable HTTP transport

Design principles

  • No business logic in DataIQ. DataIQ moves, transforms, validates, and routes data. Financial rules and business logic live in LicenseIQ.
  • MCP as the primary interface. Every operation LicenseIQ needs is exposed as a named MCP tool β€” never a raw HTTP call to Oracle.
  • Idempotency for all writes. The posting_log table ensures at-most-once Oracle submission per (client_id, tool, idempotency_key) triple. Retries return cached responses.
  • Per-client configuration. Sync schedules, Oracle path overrides, query parameters, COA rules, and UDF mappings are all configured per-client without code changes.
Section 02

Client Onboarding

Onboarding a new client involves four steps: registering the client record, connecting to their Oracle instance, configuring sync schedules, and running the bootstrap sync to load historical data.

Step 1 β€” Create the client record

In the Admin UI, navigate to Clients and create a new client. Set the client_id (used as the primary key throughout DataIQ), display name, and optional LicenseIQ company ID.

Step 2 β€” Configure the Oracle connection

Under the client's Connections tab, add an Oracle ERP connection with:

FieldDescription
oracle_base_urlBase URL of the Oracle FSCM REST API (e.g. https://acme.fa.us2.oraclecloud.com)
oracle_client_idOAuth client ID for the Oracle integration user
oracle_client_secretOAuth client secret (stored encrypted)
oracle_token_urlToken endpoint for Oracle OAuth flow
ou_nameOracle Operating Unit name for scoping (optional β€” required for multi-OU instances)

Step 3 β€” Configure sync schedules

Navigate to Sync Config for the client and add sync configurations for each Oracle resource type needed. See Transaction Sync for full details.

Step 4 β€” Run bootstrap sync

Trigger a bootstrap sync from the Admin UI (Bootstrap tab) to perform a one-time historical data load before the scheduled sync takes over. The bootstrap pulls all available Oracle history up to the current date.

Note

Bootstrap syncs can take several minutes for clients with large Oracle transaction histories. Monitor progress in the Sync Logs view.

Section 03

Transaction Sync

DataIQ pulls Oracle Receivables and Payables data on configurable per-client schedules. Each sync run is tracked, idempotent, and freshness-stamped so LicenseIQ always knows how current its data is.

Supported Oracle resources

  • receivablesInvoices β€” AR invoices (INV), credit memos (CM), debit memos (DM), and chargebacks (CB). Note: TransactionClass is not a queryable SCIM attribute β€” CM/DM/CB syncs use named Oracle finders or client-side post-filters.
  • standardReceipts β€” Customer receipts. Use /standardReceipts, not /receivablesReceipts (which returns 404). Do not add expand=receiptApplications β€” it causes HTTP 400.
  • payablesInvoices β€” AP invoices from Oracle Payables.
  • journalImportBatches β€” GL journal batches (used for status polling after write-back).

Sync configuration fields

FieldDescription
client_idClient this config applies to
oracle_resourceOracle FSCM resource path (e.g. receivablesInvoices)
sync_typeLabel for this sync (e.g. ar_invoices, receipts)
cron_expressionSchedule in cron format (e.g. 0 */4 * * * = every 4 hours)
freshness_threshold_hoursMax acceptable data age in hours β€” surfaced in MCP responses
oracle_path_overrideOverride the default Oracle API path for this client (e.g. custom receivables path)
query_paramsArray of {"{"}key, value, enabled{"}"} objects injected into Oracle requests. Set value: "" to clear a default param (e.g. to remove the default expand).
enabledWhether this sync is active
Gotcha

When using oracle_path_override, the endpoint's default expand parameter is still injected. Always add {"{"}"key":"expand","value":"","enabled":true{"}"} in query_params if the override path doesn't support the default expand.

Idempotency

Syncs upsert on the Oracle natural ID field (CustomerTransactionId for receivablesInvoices, StandardReceiptId for standardReceipts). Re-running the same sync window updates existing records rather than creating duplicates β€” making retries safe.

Freshness

Every sync run records a last_synced_at timestamp. MCP tool responses include a freshness field showing data age and whether it exceeds the configured threshold. Stale data is surfaced β€” never silently consumed.

Section 04

MCP Tools Reference

LicenseIQ connects to DataIQ's MCP endpoint at /mcp using the Streamable HTTP transport. All tools accept a client_id input to scope the operation to the correct client context.

Connection

MCP endpoint: https://dataiq.cimpleit.com/mcp β€” No OAuth required. Connect directly. The /.well-known/oauth-authorization-server endpoint returns 404 to signal this.

Read tools

get-ar-invoices read

Returns AR invoices (INV type) from the local DataIQ cache for a given client. Includes freshness metadata.

client_id * date_from date_to customer_account limit
get-credit-debit-memos read

Returns AR credit memos (CM) and debit memos (DM) for a given client, filtered from the local transaction cache.

client_id * date_from date_to transaction_class
get-payments read

Returns Oracle standard receipts (customer payments) from the local cache. Maps to the standardReceipts Oracle resource.

client_id * date_from date_to customer_account
get-ap-invoices read

Returns Accounts Payable invoices from Oracle Payables for a given client.

client_id * date_from date_to supplier_name
get-po-receipts read

Returns Purchase Order receipts for a given client from the Oracle Procurement module.

client_id * date_from date_to po_number
get-sales-transactions read

Returns sales transaction records from the DataIQ transaction cache for rebate and royalty calculation inputs.

client_id * date_from date_to product_id customer_id
get-pos-data read

Returns Point-of-Sale sell-through data received from EDI trading partners (867 transaction sets) for a given client.

client_id * partner_id date_from date_to
get-chargeback-transactions read

Returns chargeback (CB) transaction records from the local cache for dispute and deduction management workflows.

client_id * date_from date_to
get-rebate-calculation-basis read

Returns the aggregated sales basis data needed to calculate rebate accruals β€” grouped by product, customer, and period as specified by the caller.

client_id * period_start * period_end * group_by
get-master-data read

Returns master data records (customers, products, suppliers, partners) from the DataIQ master data cache.

client_id * entity_type * search limit
get-journal-status read

Polls Oracle for the current import status of a previously submitted GL journal batch. Use to confirm a post-gl-journal write-back has been processed by Oracle.

client_id * batch_name *
resolve-customer-master read

Resolves a customer name or external ID to the canonical Oracle customer account number and master data record.

client_id * query *
resolve-item-master read

Resolves a product name, SKU, or UPC to the canonical Oracle item number and product master record.

client_id * query *
resolve-supplier-master read

Resolves a supplier name or external ID to the canonical Oracle supplier number, site name, and master record.

client_id * query *

Write-back tools

post-gl-journal write

Posts a GL journal import batch to Oracle. COA segments are derived automatically from the rules engine before submission. Idempotent β€” safe to retry with the same idempotency_key.

client_id * idempotency_key * journal_lines * batch_name accounting_date
create-ar-invoice write

Creates a new AR invoice in Oracle Receivables. UDF fields are translated using the client's Store 2 mappings before submission.

client_id * idempotency_key * customer_account * lines * transaction_date
create-ap-invoice write

Creates a new AP invoice in Oracle Payables. Idempotent via posting_log.

client_id * idempotency_key * supplier_id * lines * invoice_date
deliver-to-partner write

Delivers an outbound EDI document (810 invoice, 856 ASN) to a configured trading partner via AS2 or SFTP.

client_id * partner_id * document_type * payload *

Derive tools

derive-coa-segments derive

Runs the COA rules engine for a given client and input context, returning the derived Oracle Chart of Account segment values. Optionally validates derived segments live against Oracle before returning.

client_id * context * validate_live
Idempotency

All write-back tools use the posting_log table with a composite unique key of (client_id, tool, idempotency_key). The first call submits to Oracle and caches the response. Subsequent calls with the same key return the cached response β€” Oracle never sees duplicate submissions.

Section 05

Write-Back & COA Rules

COA Rules Engine

Before any write-back tool submits data to Oracle, the COA (Chart of Accounts) rules engine derives the Oracle GL segment values from the transaction context. Rules are evaluated in priority order β€” the first rule whose conditions match wins.

Rule structure

FieldDescription
priorityEvaluation order β€” lower number = higher priority
conditionsJSON match criteria evaluated against the input context (product category, customer type, transaction class, etc.)
segment_valuesOracle COA segment values to assign when this rule matches (Company, Cost Center, Account, etc.)
validate_liveIf true, derived segments are validated against Oracle's FSCM API before the write-back proceeds

UDF Translation (Store 2)

Client-specific User Defined Field (UDF) definitions and value mappings are maintained in DataIQ's Store 2 schema. When a write-back tool receives a LicenseIQ field value, it looks up the client's UDF mapping to translate it to the Oracle-expected code.

  • translation_gaps β€” If a UDF value has no mapping, the MCP response includes a translation_gaps array identifying the missing mappings. The write-back is not blocked β€” the gap is surfaced for resolution.
  • client_udf_definitions β€” Defines which UDF fields exist for each client.
  • client_udf_value_mappings β€” Maps LicenseIQ field values to Oracle-expected equivalents.

posting_log

The posting_log table is the source of truth for every Oracle write-back attempt. It records the tool name, client ID, idempotency key, Oracle response (status code, body), and timestamp. Use the Admin UI's Posting Log view to audit all write-backs and identify any submissions that failed at the Oracle layer.

Section 06

EDI Integration

DataIQ provides EDI connectivity for trading partners via two transport protocols: AS2 (Mendelson, for partners requiring encrypted and signed document exchange) and SFTP (for partners using file-drop delivery). Partners and their transaction sets are configured entirely through the Admin UI.

Supported transaction sets

  • 850 β€” Purchase Orders (inbound)
  • 810 β€” Invoices (outbound)
  • 856 β€” Advance Ship Notices / ASNs (outbound)
  • 997 β€” Functional Acknowledgements (bidirectional)

Per-partner configuration

FieldDescription
partner_nameDisplay name for this trading partner
isa_qualifier / isa_idISA06/ISA08 sender/receiver identifiers for the EDI interchange
transportas2 or sftp
as2_urlPartner's AS2 endpoint URL (AS2 partners only)
sftp_host / sftp_userSFTP connection details (SFTP partners only)
inbound_tx_setsEnabled inbound transaction types for this partner
outbound_tx_setsEnabled outbound transaction types for this partner
enabledWhether this partner is active

Document lifecycle

  1. Inbound: Partner transmits EDI document β†’ DataIQ receives via AS2/SFTP β†’ document parsed and stored in edi_transaction_log β†’ MCP tools expose data to LicenseIQ.
  2. Outbound: LicenseIQ calls deliver-to-partner MCP tool β†’ DataIQ generates EDI document β†’ transmits via configured transport β†’ 997 acknowledgement tracked.
Acknowledgements

997 functional acknowledgements are tracked per interchange in the edi_transaction_log. Accepted, rejected, and pending 997s are visible in the Admin UI EDI Log for each trading partner.

Section 07

Oracle API Notes

Oracle Cloud FSCM REST APIs have a number of non-obvious behaviours. This section documents the ones that have caused issues in production.

ID field naming

  • receivablesInvoices returns CustomerTransactionId β€” not TransactionId
  • standardReceipts returns StandardReceiptId β€” not ReceiptId or CashReceiptId

TransactionClass is not queryable

Sending q=TransactionClass='CM' returns HTTP 400 on receivablesInvoices. TransactionClass is not a SCIM-queryable attribute. CM/DM/CB syncs must use a named Oracle finder or apply a client-side post-filter after fetching. Oracle returns TransactionType (a named string like 45 INV), not a class code.

standardReceipts vs receivablesReceipts

The correct Oracle FSCM path for customer receipts is /standardReceipts. The path /receivablesReceipts returns 404. Do not add expand=receiptApplications β€” it causes HTTP 400 on known Oracle instances.

Clearing default expand

To remove a default expand parameter injected by the sync endpoint, add a query param entry with an empty value:

{"{"} "key": "expand", "value": "", "enabled": true {"}"}

DataIQ treats empty-string values as "delete this key" from the outgoing Oracle request.

OU scoping

For multi-OU Oracle instances, requests may need to be scoped to a specific Operating Unit. Set the ou_name on the client's Oracle connection, or inject it via query_params in the sync config.

Section 08

Troubleshooting

Sync not running

  • Verify the sync configuration is enabled for the client.
  • Check that Oracle connection credentials are valid β€” Oracle returns descriptive error bodies on auth failure.
  • Review sync logs for the last error message.
  • Verify the oracle_path_override (if set) is correct for this client's Oracle instance version.

Write-back returning cached response unexpectedly

If a write-back tool returns a success response but no new record appears in Oracle, the posting_log may have a cached response from a previous call with the same idempotency_key. To re-submit, use a new idempotency key.

translation_gaps in MCP response

A translation_gaps array in a tool response means one or more UDF field values have no mapping in Store 2 for this client. Add the missing mapping in Store 2 Config β†’ UDF Value Mappings.

MCP connection issues from LicenseIQ

  • Confirm the MCP endpoint is https://dataiq.cimpleit.com/mcp with Streamable HTTP transport.
  • The Accept header must include text/event-stream β€” DataIQ auto-injects this if omitted, but some clients may need it set explicitly.
  • The /.well-known/oauth-authorization-server endpoint intentionally returns 404 β€” this signals no OAuth is required to connect.

EDI document not delivered

  • Check the outbound document status and any transport errors in the EDI log.
  • For AS2 partners, verify the partner's AS2 URL and certificates are current in partner config.
  • Check 997 acknowledgement status β€” a rejected 997 indicates the partner received the document but found a format error.