Get Master Data Fields

The get_master_data_fields tool lists the columns of one Master Data table (Customers, Products, Sellers, or Product Competition) and the data type of each column. Use the column names in the Master Data Query Data tool. The get_master_data_fields tool does not read any rows.

Tool Name – get_master_data_fields

Title – Get Master Data Fields

Type – Private

Access Profile – Operator

Permissions

The tool is available to the Operator access profile when tool access control is on. The get_master_data_fields tool uses your Pricefx permissions and lists only the columns that you have permission to query.

Parameters

Parameter

Required

Description

table

Yes

The Master Data table to describe: customers (Customers), products (Products), sellers (Sellers), or productCompetitions (Product Competition).

filter

No

Text to narrow the list of columns, for example id. The tool returns the columns whose name contains this text. The comparison ignores case.

Default: Empty, which lists every column of the table.

Output

The get_master_data_fields tool returns an object with the following fields.

Field

Description

table

The Master Data table that was described, for example customers.

label

The business name of the table: Customer Master, Product Master, Seller Master, or Product Competition.

total

The number of columns returned. When filter is set, total counts only the matching columns.

fields

The returned columns. Each column is an object: {name, type}. name is the column name to use in the master_data_query_data tool. type is the data type of the column.

Behavior and Limitations

  • The get_master_data_fields tool describes one Master Data table per call and reads no rows.

  • A configured attribute appears under its label, for example Customer Id. An attribute without a label appears under its system name, for example attribute3.

  • Column names can contain spaces. Use each name in the master_data_query_data tool exactly as the get_master_data_fields tool returns it.

  • The filter parameter matches the column name only.

  • The tool describes Customers, Products, Sellers, and Product Competition only. To list the columns of a Datamart, use the get_data_source_fields tool.

Errors

Situation

Error Message

table is not customers, products, sellers, or productCompetitions

Input should be 'customers', 'products', 'sellers' or 'productCompetitions'

Pricefx rejects the request

The error message from Pricefx.