JS Client API
  • Getting Started
  • Rule Engine Unique Functions
  • Custom Form Window Functions
  • Known Issues
  • Use Cases & Code Samples
  • Retrieving Data
    • Retrieving Standard Resources
    • Retrieving User Defined Tables
    • Retrieving Attachments
    • Retrieving Items in Transaction Scope
    • Retrieving Transaction Lines
    • ADAL
  • Updating Data
    • Adding Objects to Standard Resources
    • Updating Standard resources
    • Updating User Defined Table
    • Updating Items in Transaction Scope
    • Adding Transaction Lines
    • Removing Transaction Lines
Powered by GitBook
On this page

Was this helpful?

  1. Updating Data

Adding Transaction Lines

Add Lines to an existing Transaction Cart

THIS FUNCTION IS CURRENTLY IMPLEMENTED ONLY FOR THE "api" NAMESPACE - NOT FOR "app"

This function will only add line to the cart - not to the "order center"

LeadingLine is optional - it should be used for "bonus items" to assign an item to it's "parent" item.

pepperi.app.transactions.addLines
(
  { 
    transaction:{UUID:"11cda91f-df09-4d3c-826d-184e5f394d06"},
    lines:
    [
      {
        item:  {ExternalID:"MCR00101BLUEL"},
        lineData:  { UnitsQuantity:5 },
        leadingLine:{UUID:"11cda91f-df09-4d3c-826d-184e5f394d0d"}
      }
    ]
    
  }  
);

Returns:

{
  "success": true,
  "result": [
    {
      "id": "69dc3368-c74a-4616-b1dc-b21ba38c4daa",
      "status": "added",
      "message": ""
    }
  ]
}
PreviousUpdating Items in Transaction ScopeNextRemoving Transaction Lines

Last updated 3 years ago

Was this helpful?