Claim Source Logic

If the Claim data should be built from Quote data, you need to provide a logic which will read the Quote data and create the data for the Claim.

To understand where the source logic fits in the process, review Create Claim from Quote/Contract (Use Case).

Logic API

  • Nature: claim

    • Logic type: default (generic)

  • Input Fields: not relevant

  • Context:

    • api.currentItem() – Data of the Claim (header).

      • Specifically, you can read the Quote ID there: api.currentItem("sourceQuoteUniqueName").

    • api.getClaimContext() – API for creating the Claim and Claim line items data.

      • Specifically, there is the function api.getClaimContext().setNewClaimData(headerValues, columnNames, data).

  • Element Results: not used

Code Sample

def headerValues = [ targetDate: new Date().format("yyyy-MM-dd"), customerId: "C-0001", customerName: "Test Customer" ] def columnNames = [ // this could be eventually read from ClaimType by doing api.find("CLT",...¨) "ProductID", "EndCustomerID","ClaimQuantity", "TotalClaimAmount","QuoteID","QuoteValidFrom", "QuoteValidTo","QuoteDiscountPerItemPercent", "InvoicePricePerItem","NetPricePerItem","DiscountPerItemAmount" ] //for demonstration of the data structure only. Normally the data are read from the Quote. def data = [ [ ProductID: "CLAIMS-001", EndCustomerID: "CD-00001", ClaimQuantity: 2, TotalClaimAmount: 444, QuoteID: api.currentItem("sourceQuoteUniqueName"), QuoteDiscountPerItemPercent: 0.1, InvoicePricePerItem: 100, NetPricePerItem: 40, DiscountPerItemAmount: 10 ], [ ProductID: "CLAIMS-002", EndCustomerID: "CD-00001", ClaimQuantity: 3, TotalClaimAmount: 445, QuoteID: api.currentItem("sourceQuoteUniqueName"), QuoteDiscountPerItemPercent: 0.1, InvoicePricePerItem: 100, NetPricePerItem: 40, DiscountPerItemAmount: 10 ] ] api.getClaimContext().setNewClaimData(headerValues, columnNames, data)

Found an issue in documentation? Write to us.

Â