Opportunity: Save Package Catalogue

  • Updated

Save Package Catalogue


POST /v2/opportunity/save/quote/package

This API adds Package catalogue in an opportunity quote and returns a unique Id and its associated details. This same API allows you to update an existing Package catalogue e.g. change the price or comments.


Parameter
Id    Long

The Id of the catalogue item. Required only if you are updating the catalogue. If empty, a new catalogue item will be created.

Qty    Double

The Quantity of the catalogue item.

TemplateId    Long

The Template Id of the catalogue item.

StartDate    DateTime

The Start Date and time of catalogue item.

EndDate    DateTime

The End Date and time of catalogue item.

UnitPrice    Double

The Unit Price of the catalogue item.

DiscountType    Double

This represents the type of discount provided. The possible values could be 'P' and 'C', where 'P' is the percentile discount and 'C' is a fixed discount amount.

DiscountValue    Double

This represents the Discount provided for the catalogue item. The value provided is used along with the discount type to calculate the total discount amount.

Quote    Object { Id, QuoteNumber }

Quote to which the catalogue item is to be associated. The Quote must exist in your Priava Account. Passed in JSON format where:
Id = the ID of the Quote.
QuoteNumber = the number of the quote.

FinancialComments    String

The Financial Comment to be associated with the catalogue item.

CatalogueComments    String

The Comment to be associated with the catalogue item.

CreditOrDebit    String

This represents whether the catalogue item should be credited or debited to the opportunity. Only values supported are Credit or Debit.

PackageBreakDown Array[{}]

Breakdown catalogue items of the package.

PackageBreakDown - Id    Long

The Id of the breakdown catalogue item. Required only if you are updating the catalogue. If empty, a new catalogue item will be created.

PackageBreakDown - PackageBalancer    String

True or False.

PackageBreakDown - RefPkgId    Long

The Id of the referenced package catalogue.

PackageBreakDown - StartDate    DateTime

The Start Date and time of breakdown catalogue item.

PackageBreakDown - Formula    Object
Formula associated with the catalogue item contains the following:
  Name String
  Name of the Formula 
  CustomFormulaFields Array[{}]
  The Custom Formula Fields passed in JSON Format where:
  FieldName = Name of the Custom Formula Field
  FieldValue = Value of the Custom Formula Field
PackageBreakDown - CatalogueTypeName    String

The Catalogue Type of breakdown catalogue item.

PackageBreakDown - Qty    Double

The Quantity of the breakdown item.

PackageBreakDown - CreditOrDebit    String

This represents whether the catalogue item should be credited or debited to the opportunity. Only values supported are Credit or Debit.

PackageBreakDown - TemplateId    Long

The Template Id of the breakdown catalogue item.

PackageBreakDown - CatalogueComments    String

The Comment to be associated with the breakdown catalogue item.

PackageBreakDown - EndDate    DateTime

The End Date and time of breakdown catalogue item.

PackageBreakDown - Quote  Object { Id, QuoteNumber }

Quote to which the catalogue item is to be associated. The Quote must exist in your Priava Account. Passed in JSON format where:
Id = the ID of the Quote.
QuoteNumber = the number of the quote.

PackageBreakDown - UnitPrice    Double

The Unit Price of the breakdown catalogue item.

PackageBreakDown - FinancialComments    String

The Financial Comment to be associated with the breakdown catalogue item.

PackageBreakDown - DiscountType    Double

This represents the type of discount provided. The possible values could be 'P' and 'C', where 'P' is the percentile discount and 'C' is a fixed discount amount.

PackageBreakDown - DiscountValue    Double

This represents the Discount provided for the breakdown catalogue item. The value provided is used along with the discount type to calculate the total discount amount.

PackageBreakDown - TaxType    Object { Id, Name }

The Tax Type to be associated with the breakdown catalogue item. The Tax Type must exist in your Priava Account. Passed in JSON format where:
Id = the ID of the Tax Type.
Name = the name of the Tax Type.

PackageBreakDown - QtyModifier    String

The Quantity Modifier of the breakdown item.

PackageBreakDown - QtyType    String

The Quantity Type of the breakdown item.

RefPkgId    Long

The Id of the referenced package catalogue.

{
   "StartDate": "15/10/2019 09:30",
   "CreditOrDebit": "Debit",
   "TemplateId": 100323092,
   "CatalogueComments": "catalogue comments",
   "PackageBreakDown": [{
      "PackageBalancer": true,
      "RefPkgId": "",
      "StartDate": "05/02/2019 09:00",
      "Formula": {},
      "CatalogueTypeName": "InventoryBooking",
      "Qty": "1.00",
      "CreditOrDebit": "Debit",
      "TemplateId": 100322403,
      "CatalogueComments": "This is catalogue comment",
      "QtyModifier": "23.00",
      "QtyType": "Multiplier",
      "EndDate": "05/02/2019 17:00",
      "Quote": {
         "QuoteNumber": "573",
         "Id": ""
      },
      "TaxType": {
         "Id": 26,
         "Name": "GST - Included 10%"
      },
      "UnitPrice": "50.00",
      "FinancialComments": "This is financial comment",
      "DiscountType": "C",
      "Id": "",
      "DiscountValue": "0.00"
   }],
   "EndDate": "15/10/2019 09:30",
   "DiscountAmount": "0.00",
   "Quote": {
      "QuoteNumber": "",
      "Id": 100047161
   },
   "UnitPrice": "50.00",
   "Qty": 1,
   "FinancialComments": "comments",
   "DiscountType": "C",
   "Id": "",
   "DiscountValue": "0.00"
}
Response:
{
   "success": true,
   "result": {
      "Abbreviation": "PK",
      "TaxIncluded": true,
      "Tax": "4.55",
      "FormulaToolTip": "",
      "Difference": "0.00",
      "TotalUnitCost": "88.00",
      "NetTotalExTax": "45.45",
      "Name": "pack2",
      "StartDate": "15/10/2019 09:30",
      "Formula": {},
      "CatalogueTypeName": "PackageCatalogue",
      "Opportunity": {
         "OpportunityNumber": "569",
         "Id": 100176183,
         "Name": "Meeting"
      },
      "Qty": "1.00",
      "ProfitAmount": "-42.55",
      "ProfitPercentage": "-93.62",
      "CreditOrDebit": "Debit",
      "TemplateId": 100323092,
      "CatalogueComments": "catalogue comments",
      "PackageBreakDown": [{
         "Abbreviation": "IN",
         "PackageBalancer": true,
         "RefPkgId": "",
         "Tax": "4.55",
         "FormulaToolTip": "",
         "NetTotalExTax": "45.45",
         "Name": "newitnn",
         "StartDate": "05/02/2019 09:00",
         "Formula": {},
         "CatalogueTypeName": "InventoryBooking",
         "Opportunity": {
            "OpportunityNumber": "569",
            "Id": 100176183,
            "Name": "Meeting"
         },
         "Qty": "1.00",
         "CreditOrDebit": "Debit",
         "TemplateId": 100322403,
         "CatalogueComments": "This is catalogue comment",
         "NetTotalInclDiscount": "50.00",
         "QtyModifier": "23.00",
         "QtyType": "Multiplier",
         "EndDate": "05/02/2019 17:00",
         "DiscountAmount": "0.00",
         "Quote": {
            "QuoteNumber": "573",
            "Id": 100047161,
            "Name": "Quote1"
         },
         "TaxType": {
            "TaxPercentage": 10,
            "Position": 1095,
            "TaxIncluded": true,
            "Inactive": false,
            "Id": 26,
            "Name": "GST - Included 10%"
         },
         "UnitPrice": "50.00",
         "FinancialComments": "This is financial comment",
         "DiscountType": "C",
         "GrandTotal": "50.00",
         "Id": 100319687,
         "DiscountValue": "0.00"
      }],
      "NetTotalInclDiscount": "50.00",
      "EndDate": "15/10/2019 09:30",
      "DiscountAmount": "0.00",
      "Quote": {
         "QuoteNumber": "573",
         "Id": 100047161,
         "Name": "Quote1"
      },
      "TaxType": "",
      "UnitPrice": "50.00",
      "FinancialComments": "comments",
      "DiscountType": "C",
      "BreakDownPrice": "50.00",
      "GrandTotal": "50.00",
      "Id": 100319686,
      "DiscountValue": "0.00",
      "BalancingOptions": "DISTRIBUTED_DISCOUNT"
   }   
}

Was this article helpful?

Have more questions? Submit a request