- 3 minutes to read

Custom Logging, FAQ, Troubleshooting, Search Fields, Business Data Custom Logging, extract, business data, Order Numbers, Customer IDs, Search Field Expressions, XPath, JSON Path How to extract business data like Order Numbers, Customer IDs, and Invoice amounts from logged messages using Search Field Expressions.

Extract Business Data from Logged Messages

How do I extract business data like Order Numbers from logged messages?

Use Search Field Expressions to automatically extract Order Numbers, Customer IDs, Invoice amounts, and other business identifiers from your logged message bodies—no manual parsing, no SQL queries.

How It Works

  1. Define Message Types - Identify message formats: "PurchaseOrder#1.0", "Invoice#2.0", "CustomerUpdate#1.0"
  2. Include message body in JSON Log Event - Set Body field with XML, JSON, CSV, EDIFACT, or X12 content
  3. Create Search Field Expressions - Configure extraction rules bound to Message Types
  4. Nodinite extracts automatically - When logs arrive, Search Fields parse message bodies and extract business identifiers
  5. Business users search by business data - Log Views enable search: "Show me Order 12345" or "Export invoices >$10K for customer ACME"

Example: Extract Order Number from XML

Message Type: PurchaseOrder#1.0

Logged message body (XML):

<Order>
  <OrderId>PO-2025-001</OrderId>
  <CustomerId>CUST-12345</CustomerId>
  <OrderAmount>15750.50</OrderAmount>
  <OrderDate>2025-10-12</OrderDate>
</Order>

Search Field Expression (XPath):

/Order/OrderId/text()

Result: Nodinite automatically extracts PO-2025-001 as searchable field. Business users search: "Order PO-2025-001" → finds transaction instantly.

Example: Extract Customer ID from JSON

Message Type: APIRequest#1.0

Logged message body (JSON):

{
  "requestId": "req-98765",
  "customerId": "CUST-ACME",
  "endpoint": "/api/orders",
  "responseTime": 145
}

Search Field Expression (JSON Path):

$.customerId

Result: Extracts CUST-ACME. Business users filter Log View: "Show all API requests for customer CUST-ACME last week".

Supported Extraction Methods

Search Field Expressions support multiple parsers:

  • XPath - XML messages (/Order/OrderId/text())
  • JSON Path - JSON messages ($.order.orderId, $.items[0].sku)
  • Regular Expressions - Any text format (Order ID: (\d+))
  • Flat File parsers - CSV, fixed-width, delimited formats
  • Formula - Complex transformations, concatenation, conditional logic

Multiple Search Fields Per Message Type

Extract multiple business identifiers from same message:

Message Type: PurchaseOrder#1.0

  • Search Field 1: OrderId (XPath: /Order/OrderId/text())
  • Search Field 2: CustomerId (XPath: /Order/CustomerId/text())
  • Search Field 3: OrderAmount (XPath: /Order/OrderAmount/text())

Result: Business users search by any combination: "Orders from customer CUST-12345 with amount >$10K last month".

Configuration Steps

  1. Navigate to Administration → Log Management → Search Fields
  2. Create Search Field - Name: "Order Number", Description: "PurchaseOrder identifier"
  3. Bind to Message Type - Select "PurchaseOrder#1.0"
  4. Configure Expression - Choose parser (XPath, JSON Path, Regex), enter extraction rule
  5. Test with sample - Validate extraction with sample message body
  6. Save - Nodinite applies to all future logs with that Message Type

Existing logs: Search Fields apply retroactively—re-index existing logs to extract business data from historical messages.


Related Topics:
Search Field Expressions Overview
Message Types
Formula for Complex Transformations

See all FAQs: Troubleshooting Overview

Next Step

Back to Custom Logging Overview