Retrieving Items in Transaction Scope
Retrieving Transaction-Scope Items (Order Center Items)

Get single transaction-scope item

transactionScopeItems are items in the "order center" they are different in the way they are retrieved since they require transaction AND item keys
You can get specific item by UUID/ExternalID/InternalID
1
pepperi.api.transactionScopeItems.get(
2
{ transaction:{UUID:"<transaction UUID>"},
3
item: {UUID:"<item UUID>"},// {ExtrenalID:""}/{"InternalID":123}
4
fields:["Price", "Item.Name"] })
Copied!
Returns:
1
{success: true,
2
object:
3
{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,
4
Price: 123.4 , Item.Name: "Item AB Test1"}}
Copied!

Search list of transaction-scope items by filter

Supported from CPI 16 only!
To retrieve multiple objects use the search function for the desired resource - it returns the following object:
1
pepperi.api.transactionScopeItems.search (
2
{
3
transaction:{UUID:"<transaction UUID>"},
4
fields: [ "UUID", "ItemExternalID" , "MyTSA"] ,
5
filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",
6
Values : ["7"]},RightNode:{ApiName: "ApiName2",
7
Operation: "InTheLast", Values: ["4","Weeks"]} } ,
8
sorting : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }] ,
9
pageSize : 1000 , page: 1
10
});
Copied!
Returns:
1
{success: true, objects:
2
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ItemExternalID: "abc123", MyTSA: 12.8},
3
{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ItemExternalID: "abc456", MyTSA: 34.5}
4
] }
Copied!
Last modified 1yr ago