Fetch Objects

The fetch_objects tool reads Pricefx objects of one type, for example Products, Customers, Contracts, Quotes, or Action Items. You can filter, sort, and page through the results. The tool returns all fields of each object.

Tool Name – fetch_objects

Title – Fetch objects

Type – Private

Access Profile – Operator

Permissions

The fetch_objects tool runs with your Pricefx session. It does not apply the same data restrictions as the Pricefx user interface, so it can return objects that you cannot open in Pricefx.

Parameters

Parameter

Required

Description

type_code

Yes

Type code of the objects to read, for example P for products. See Type Codes.

filter_property

No

Field to filter on, for example uniqueName or sku.

filter_values

No

One or more values to compare with filter_property. With several values, an object matches when any of the values matches.

filter_operator

No

How the tool compares filter_property with filter_values. See Filter Operators. The default is contains.

start_row

No

Position of the first object to return, starting at 0.
Default: 0.

max_rows

No

Maximum number of objects to return, from 1 to 200.
Default: 5.
Values outside this range are changed to the nearest allowed value.

sort

No

Field to sort by. Add - before the field name for descending order, for example -lastUpdateDate.
Default: no specific order.

Type Codes

The tool accepts any Pricefx type code. These are the most common ones:

Type Code

Objects

AI

Action Items

C

Customers

CT

Contracts

DM

Datamarts

DMDS

Data Sources

MO

Model Objects

P

Products

PG

Live Price Grids

PL

Price Lists

Q

Quotes

R

User Roles

RBA

Rebate Agreements

U

Users

W

Workflows

Filter Operators

Group

Operators

Equality

  • equals

  • iEquals

  • notEqual

  • iNotEqual

Comparison

  • greaterThan

  • greaterOrEqual

  • lessThan

  • lessOrEqual

Empty value

  • isNull

  • notNull

Text

  • contains

  • iContains

  • notContains

  • iNotContains

  • startsWith

  • iStartsWith

  • notStartsWith

  • iNotStartsWith

  • endsWith

  • iEndsWith

  • notEndsWith

  • iNotEndsWith

  • containsPattern

  • iContainsPattern

Range

  • between

  • betweenInclusive

  • iBetween

  • iBetweenInclusive

List

  • inSet

  • notInSet

Output

The tool returns a list of objects. Each object includes all of its fields, as Pricefx stores them. The tool does not return the total number of matching objects. If the tool returns as many objects as max_rows, more objects may exist. To get them, increase start_row.

Behavior and Limitations

  • The tool filters on one field only. To filter on several fields, use a more specific tool, for example the Quote Search tool for Quotes.

  • The filter is applied only when both filter_property and filter_values are given. If one of them is missing, the tool returns objects without a filter and does not report an error.

  • The tool returns all fields of each object. Objects such as Quotes can be large, so keep max_rows low.

  • To read Datamart or Data Source data, use the Datamart Query Data tool. The fetch_objects tool returns Datamart and Data Source definitions, not their rows.

See Also