Datamart Transaction Retrieval (Agents)

Pricefx Agents use Model Context Protocol (MCP) tools to retrieve and analyze transaction data directly from a Datamart. These tools allow Large Language Models (LLMs) to query specific records based on customer or product attributes.

Overview

Pricefx Agents utilize two primary MCP tools to access Datamart transactions. These tools require specific Datamart field configurations to accurately map natural language prompts (e.g., "revenue") to technical field names (e.g., InvoicePrice).

Available MCP Tools

Tool Name

Description

Required Inputs

acc_ag_get_datamart_customer_transactions

Retrieves transaction records for a specific customer.

Customer Id or Customer Name

acc_ag_get_datamart_product_transactions

Retrieves transaction records for a specific product.

Product Id or Product Name

acc_ag_get_agents_customer_transactions

Retrieves transaction records for a specific Action Item.

Action Item Id

Example Prompts

You can use natural language to query the Datamart via the Pricefx Agent. Examples include:

:question_mark:

Show me the transactions for customer [Customer Name] from the last quarter.

:question_mark:

What is the total revenue for product [Product Id] in the current year?

:question_mark:

List all sales records for [Customer Id] where the margin was below 10%.

:question_mark:

Find the latest transactions for [Product Name].

Configuration Requirements

To ensure the MCP tool correctly identifies fields, you must configure the Meta Description attribute for relevant fields in the Datamart.

Meta Description Field

The Meta Description provides the LLM with context about the data contained in a field. If a user asks for "revenue" but the Datamart field is named InvoicePrice, the tool uses the Meta Description to bridge this gap.

  • LocationAnalytics > Data Manager > Datamarts > Fields

  • Usage – Enter common synonyms or descriptive text (e.g., "revenue", "total sales") in the Meta Description column for the corresponding field.

  • Impact – If the Meta Description is empty, the tool may fail to find matching fields when the user's wording does not exactly match the technical Label or Name.

Field Mapping Attributes

The following elements in the Fields screen are critical for MCP tool discovery.

  • Data Type – The format of the data (e.g., Text, Money, Date).

  • Label – The display name shown in the Pricefx UI.

  • Name – The technical identifier used in the database.

  • Measure – Indicates if the field is a quantitative value (e.g., Extended).

  • Dimension – Indicates if the field is a categorical attribute used for grouping.

  • Meta Description – The descriptive text used by Agents to understand the field's purpose.

Limitations

  • Currency conversion is not supported in the current version of these tools.

  • The tools currently retrieve a maximum of 20 attributes to ensure performance and accuracy.

  • Issues related to the % symbol in prompts may result in incorrect returns and are scheduled for a future fix.

If the Copilot cannot detect parameters like Customer Id or Product Id, you may need to restate the prompt with explicit identifiers.

info Always populate the Meta Description for core metrics like revenue, margin, and cost to improve the reliability of Agent responses.

See Also