Deals

The following services are included in this functional area:

Deals Download Service

The following services are included in this functional area:

Get Item Location Deals

Functional Area

Deals

Business Overview

This service allows the Store Inventory system to query Merchandising for deals that are present for a given item/location combination based on a specific date and source (supplier, partner) criteria. Merchandising will respond with details of the off-invoice deals that the item/location are part of based on the date that has been provided. These details will include the active and close dates and the discounts that are present on these deals.

Service Type

POST

ReST URL
MerchIntegrations/services/deals/itemLocation/get
Input Payload Details

Table 5-52 Get - Object. See list of elements for detail

Element Name Required Data Type Description

sourceId

Yes

Number (10)

This is the source supplier or warehouse.

location

Yes

Number (10)

This contains the destination location of the store order.

locationType

Yes

String (1)

This contains the destination location type of the store order.

item

Yes

String (25)

Contains the item number in the distro.

notBeforeDate

Yes

date

Contains the first date that the delivery of the order will be accepted.

Sample Input Message

{
  "sourceId": 2400,
  "location": 6000,
  "locationType": "S",
  "item": "100100076",
  "notBeforeDate": "2001-12-31"
}
Response Code: 200 (Success)

Table 5-53 GetResponse - Object. See list of elements for detail

Element Name Required Data Type Description

items

No

Collection of Object

References a collection of store order initiated deals.

Table 5-54 Items - Object. See list of elements for detail

Element Name Required Data Type Description

dealId

Yes

Number (10)

Deal that applies to the order item.

dealType

Yes

String (10)

Contains the Deal Type

activeDate

Yes

date

Date the deal will become active.

closeDate

No

date

Date the deal will end or ended

dealClass

No

String (6)

Identifies the calculation class of the deal component.

limitType

No

String (6)

Identifies whether thresholds will be set up as quantity values, currency amount values or percentages. Deal limit types will be held on the codes table under a code type of DLLT (Deal Component Threshold Limits). It can only be NULL for an M-type deal (vendor funded markdown). Examples of theshold limits are Amount - total value of units (A) and Quantity - number of Units (Q).

valueType

No

String (6)

Identifies whether the discount values associated with the thresholds will be set up as qty values, currency amount values, percentages or fixed amounts. Valid values are Q for qty, A for currency amount, P for percentage or F for fixed amount. Qty threshold deals are only allowed on off-invoice discounts. Deal threshold value types will be held on the codes table under a code type of DLL2. It can only be NULL for an M-type deal (vendor funded markdown).

lowerLimit

Yes

Number (20,4)

Lower limit of the deal component. This is the minimum value that must be met in order to get the specified discount. This value will be either a currency amount or quantity value, depending on the value of the threshold limit type.

upperLimit

Yes

Number (20,4)

Upper limit of the deal component. This is the maximum value for which the specified discount will apply. This value will be either a currency amount or quantity value, depending on the threshold_limit_type of this deal component.

value

Yes

Number (20,4)

Value of the discount that will be given for meeting the specified thresholds for this deal component.

Sample Response Message

{
  "items": [
    {
      "dealId": 133578,
      "dealType": "String",
      "activeDate": "2001-12-31",
      "closeDate": "2001-12-31",
      "dealClass": "String",
      "limitType": "String",
      "valueType": "String",
      "lowerLimit": 500,
      "upperLimit": 10000,
      "value": 20
    }
  ]
}
Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element "validationErrors" will be present when input payload or input parameters are not as per the schema definition of this service. The element "businessError" will be present if the payload passes schema validation but exception is caught while processing business logic.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    "Error message"
  ]
}

Manage Complex Deals

Functional Area

Deals

Business Overview

This service can be used to create all forms of complex deals that are currently supported through the application UI such as Off Invoice, Allowance, Bill Back, Bill Back Rebate, Vendor Funded Markdown, Vendor Funded Promotion, Promotional Consignment Rate, and Clearance Consignment Rate.

It would work as an enhanced version of the existing dealupld batch but containing the latest set of enhancements that have taken place in this workflow.

Service Type

PUT

ReST URL

MerchIntegrations/services/deals/complexDeals/manage

Input Payload Details

Table 5-55 Manage - Object. See list of elements for detail

Element Name Required Data Type Description
collectionSize Yes Number (4) Number of complex deals in the collection.
items Yes Collection of Object Collection of complex deals to be uploaded.

Table 5-56 Items - Object. See list of elements for detail

Element Name Required Data Type Description
action Yes String (10) Contains the action for the request. Valid value: CREATE.
externalReferenceNo No String (30) Unique external reference number associated with the deal. Can be null. If not NULL, then it must be unique.
dealId No Number (10) Unique deal number. If Null, it will be generated based of a sequence. If Not Null (that is, external system generated number), it must be unique.
vendorType Yes String (6) Type of the supplier or partner the deal applies to. Valid values are S for supplier, SS for supplier site, S1 for supplier hierarchy level 1 (for example, manufacturer), S2 for supplier hierarchy level 2 (for example, distributor) and S3 for supplier hierarchy level 3 (for example, wholesaler). Descriptions of these codes will be held on the codes table under a code_type of SUHL.
vendorId No String (10) Level of supplier hierarchy (for example, manufacturer, distributor or wholesaler), set up as a partner in the PARTNER table, used for assigning rebates by a level other than supplier. Rebates at this level will include all eligible supplier/item/country records assigned to this supplier hierarchy level.
supplierId No Number (10) Contains the unique number representing a supplier or supplier site. It holds a value when partner_type is S (Supplier) or SS (Supplier Site).
dealTimingType No String (6) Type of the deal. Valid values are A for annual deal, P for promotional deal, O for PO-specific deal or M for vendor-funded markdown. Deal types will be held on the codes table under a code type of DLHT.
status No String (6) Code for the status of the deal. Valid values are W for worksheet, S for submitted, A for approved, R for rejected and C for closed. Deal statuses will be held on the codes table under a code type of DLHS.
currencyCode No String (3) Currency code of the deal's currency. All costs on the deal will be held in this currency.
activeDate No date Date on which the deal will become active. This date will determine when deal components begin to be factored into item costs. For a PO-specific deal, the active_date will be the orders written date.
closeDate No date Date the deal will/did end. This date determines when deal components are no longer factored into item costs. It is optional for annual deals, required for promotional deals. It will be left NULL for PO-specific deals.
orderNo No Number (12) Order the deal applies to, if the deal is PO-specific.
billingType No String (6) Billing type of the deal component. Valid values are OI for off-invoice and BB for bill-back Billing types will be held on the codes table under a code type of DLBT.
thresholdLimitType No String (6) Identifies whether thresholds will be set up as qty values, currency amount values or percentages (growth rebates only). Valid values are Q for qty, A for currency amount or P for percentage. Deal limit types will be held on the codes table under a code type of DLLT. It can only be NULL for an M-type deal (vendor funded markdown).
thresholdLimitUom No String (4) Unit of measure of the threshold limits, if the limit type is quantity. Only UOMs with a UOM class of VOL (volume), MASS or QTY (quantity) can be used in this field.
comparisonDate No String (6) Indicates the type of date on the purchase order to be used to determine deal eligibility. Applies to off-invoice deals. Default value is NBD (Not Before Date). Valid values and description are held in the codes table under a code_type of DQCD.
recalculateApprovedOrdersInd No String (1) Indicates if approved orders should be recalculated based on this deal once the deal is approved. Valid values are Y or N.
recalculateInventoryValueInd No String (1) This field controls whether deal income will be posted in aggregate or should impact the WAC of the item-locations on the deal. For Off-Invoice and Allowance this indicator will have 'Y'. For Vendor Funded Promotion, Vendor Funded Markdown, Clearance Consignment Rate and Promotional Consignment deals, this flag is always 'N'. For Billback/Billback Rebate deals, this flag is defaulted to 'N' and can be updated to 'Y' before the deal is approved.
billBackReportingLevel No String (6) This will determine the periods to be shown in the deal income screen and the frequency of the deal income accrual reporting. Valid values are D for day, W for week, M for month or Q for Quarter - which are held on the codes table under the code type of DLRL. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billBackDealBasis No String (6) Indicates if the rebate should be applied to purchases, sales or issues. Valid values are P for purchases, S for sales, or I for Issues. Rebate purchase/sales indicators will be held on the codes table under a code type of DLRP. This field only applies when the billing type is BB, BBR, VFP. Other billing types require this field to be NULL.
billBackInvoicingBasis No String (6) Indicates the timing of application of the deal component which could be at the time of PO approval, time of receiving, when the invoice is matched, or time of shipment to the deal location. Valid values are O for PO approval, R for receiving, G for Gross Receipt, I for Invoice Matched, and S for Shipment. These values are held on the codes tables under a code_type of AALC. It will be NULL for a VFM type of deal (vendor funded markdown). This field is applicable only when the billing type is BB or BBR. Other billing types require this field to be NULL.
billBackIncludeFranchiseLocations No String (1)

This field defines whether franchise purchases or sales need to be considered as part of the deal income calculation in case the related invoicing location has been added as part of the deal definition. Valid values are Y or N. If the billBackDealBasis is set to 'P' and this field is Y, then INCLUDE_FRANCHISE_PURCH_IND will be set to Y, otherwise it will be set to N. If the billBackDealBasis is set to 'S' and this field is Y, then INCLUDE_FRANCHISE_SALES_IND will be set to Y, otherwise it will be set to N. This does not apply for a billBackDealBasis value of 'I'. This field applies only when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.

billBackUseSuggestedRetailInd No String (1) This field indicates whether the Suggested Retail value present at the item-location level is to be used while calculating deal income in case of Sales-based deals instead of the selling unit retail. Valid values are Y or N. This field applies only when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
useSupplierCostInd No String (1) This field indicates if Supplier Unit Cost should be used for deal income calculation. Valid values are Y or N. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billBackAdditionalReportingDays No Number (3) This column will give the number of extra reporting days that should be added to the Deal_actuals_forecast table to cater to the late postings of the transactions after the deal close date. This field only applies when the billing type is BB or BBR. Other billing types require this field to be NULL.
billBackAddPeriodScope No String (6) Code that determines whether to apply billBackAdditionalReportingDays to the last reporting period. Valid values are 'L' (apply to last period) or 'A' (apply to all periods). These values are maintained in the codes table under code type 'BAPS'. This field only applies when the billing type is BB or BBR. Other billing types require this field to be NULL.
billBackPackLevelTrackingInd No String (1) Used to indicate whether the packs are to be tracked at pack level or not. Valid values are Y or N. This field only applies when the billing type is BB or BBR. Other billing types require this field to be Null and will be defaulted to N.
billBackRebateCalculationType No String (6) Indicates if the rebate should be calculated using linear or scalar calculation methods. Valid values are L for linear or S for scalar. This field will be required if billing type is Bill Back Rebate. Rebate calculation types will be held on the codes table under a code type of DLCT. This field only applies when the billing type is BBR. Other billing types require this field to be NULL.
billBackGrowthRebateInd No String (1) Indicates if the rebate is a growth rebate, meaning it is calculated and applied based on an increase in purchases or sales over a specified period of time. Valid values are Y or N. This field is applicable only for billing type BBR. Other billing types require this field to be NULL and will be defaulted to N.
billBackRebateHistCompareStartDate No date The first date of the historical period against which growth will be measured in this growth rebate. Note performance and the rebate amount are not calculated - this field is for informational/reporting purposes only. This field is applicable only for billing type BBR. Other billing types require this field to be NULL.
billBackRebateHistCompareEndDate No date The last date of the historical period against which growth will be measured in this growth rebate. Note performance and the rebate amount are not calculated - this field is for informational/reporting purposes only. This field is applicable only for billing type BBR. Other billing types require this field to be NULL.
billBackPeriod No String (6) Code that identifies the bill-back period for the deal component. This field will only be populated for billing types of BB and BBR. Valid billing periods will be held on the codes table under a new code type of DLBP. Valid values are W for week, M for month, Q for Quarter, A for Annual and D for Deal End. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billBackMethod No String (6) This will determine the bill back method. It will be required for bill back deals only. Valid values are Credit note or Debit note - these will be held on the codes table under a new code type of DLBM. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billingVendorType No String (6) Type of the partner the deal applies to. Valid values are S1 for supplier hierarchy level 1 (for example, manufacturer), S2 for supplier hierarchy level 2 (for example, distributor), S3 for supplier hierarchy level 3 (for example, wholesaler), S for supplier and SS for supplier site. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billingVendorId No String (10) Level of supplier hierarchy (for example, manufacturer, distributor or wholesaler), set up as a partner in the PARTNER table, used for assigning rebates by a level other than supplier. Rebates at this level will include all eligible supplier/item/country records assigned to this supplier hierarchy level. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
billingSupplierId No Number (10) Unique identifying number for a supplier within the system. This indicates the supplier that will be included on the invoice information. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
estimatedNextInvoiceDate No date This is the estimated next invoice date for the deal. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
dealIncomeCalculationLogic No String (6) This will determine how the income will be calculated. Valid values are Actuals earned to date or Pro-rated using forecast - these will be held on the codes table under a new code type of DLIC. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
invoiceProcessingLogic No String (6) This will determine if the credit notes or debit notes created should be created manually or require manual intervention and also if negative amounts should be included. Valid values are AA for Automatic All values, MA for Manual All Values, AP Automatic Positive values only, MA Manual Positive values only, NO - no invoice processing - these will be held on the codes table under a new code type of DLIP. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
includeIncomeInStockLedgerInd No String (1) Indicates if the deal income accrual will also be written to the Merchandising stock ledger. Valid values are Y or N. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
includeTaxInd No String (1) Indicates if VAT will be included in the billing information. Valid values are Y or N. This field only applies when the billing type is BB, BBR, VFP or VFM. Other billing types require this field to be NULL.
taxRegion No Number (4) Holds the tax region for which the corresponding tax rates would need to be considered while processing the income for the related deals. This field only applies when the billing type is BB, BBR, VFP or VFM and when includeTaxInd is Y. Other billing types require this field to be NULL.
comments No String (2000) Free-form comments entered with the deal.
components No Collection of Object Collection of deal component records.
referencedPromotion No Collection of Object Collection of deal promotion records.
proofOfPerformance No Collection of Object Collection of deal proof of performance records.

Table 5-57 Components - Object. See list of elements for detail

Element Name Required Data Type Description
action Yes String (10) Contains the action for the request. Valid value: CREATE.
dealDetailId Yes Number (10) Deal component ID number, uniquely sequenced within each deal.
dealComponentType No String (6) Type of the deal component, user-defined and stored on the DEAL_COMP_TYPE table.
applyOrderSequenceNo Yes Number (10) Number indicating the order in which the deal component should be applied with respect to any other deal components applicable to the item within the deal. This number will be unique across all deal components within the deal. It can only be NULL for an M-type deal (vendor funded markdown).
thresholdValueType No String (6) Identifies whether the discount values associated with the thresholds will be set up as qty values, currency amount values, percentages or fixed amounts. Valid values are Q for qty, A for currency amount, P for percentage or F for fixed amount. Qty threshold deals are only allowed on off-invoice discounts. Deal threshold value types will be held on the codes table under a code type of DLL2. It can only be NULL for an M-type deal (vendor funded markdown).
dealClass No String (6) Identifies the calculation class of the deal component. Valid values are CU for cumulative (discounts are added together and taken off as one lump sum), CS for cascade (discounts are taken one at a time with subsequent discounts taken off the result of the previous discount) and EX for exclusive (overrides all other discounts). EX type deal components are only valid for promotional deals. Deal classes will be held on the codes table under a code type of DLCL. It can only be NULL for an M-type deal (vendor funded markdown).
costApplicationType No String (6) Indicates what cost bucket the deal component should affect. Valid values are N for net cost, NN for net net cost and DNN for dead net net cost. These values will be held on the codes tables under a code_type of DLCA. It can only be NULL for an M-type deal (vendor funded markdown).
includeDealInPricingCost No String (1) Identifies deal components that should be included when calculating a pricing cost.
quantityThresholdBuyItem No String (25) Identifies the item that must be purchased for a quantity threshold-type discount. This value is required for quantity threshold-type discounts.
quantityThresholdBuyQuantity No Number (12,4) Identifies the quantity of the threshold buy item that must be ordered to qualify for the free item. This value is required for quantity threshold-type discounts.
quantityThresholdBuyOrderTarget No Number (12,4) Indicates the targeted purchase level for all locs on a purchase order. This is the target level that will be used for future calculation of net cost.
quantityThresholdBuyAverageQuantityPerLocation No Number (12,4) Indicates the average targeted purchase level per location on the deal. This value will be used in future cost calculations.
quantityThresholdRecursiveInd No String (1) For buy/get free discounts, indicates if the quantity threshold discount is only for the first buy amt. purchased (for example, for the first 10 purchased, get 1 free), or if a free item will be given for every multiple of the buy amt purchased on the order (for example, for each 10 purchased, get 1 free). This value is required for quantity threshold-type discounts with a get type of free. Valid values are Y or N.
quantityThresholdGetType No String (6) Identifies the type of the get discount for a quantity threshold-type (buy/get) discount. Valid values include X (free), P (percent), A (amount) and F (fixed amount). They are held on the codes table under a code type of DQGT. This value is required for quantity threshold deals.
quantityThresholdGetItem No String (25) Identifies the get item for a quantity threshold-type (buy/get) discount. This value is required for quantity threshold deals.
quantityThresholdGetValue No Number (20,4) Identifies the value of the get discount for a quantity threshold-type (buy/get) discount that is not a free goods deal. The type of the value is identified by the get type in the quantityThresholdGetType field. This value is required for quantity threshold deals that are not a get type of free.
quantityThresholdGetQuantity No Number (12,4) Identifies the quantity of the identified get item that will be given at the specified get discount if the buy amt of the buy item is purchased. This value is required for quantity threshold-type discounts.
quantityThresholdFreeItemUnitCost No Number (20,4) For buy/get free discounts, identifies the unit cost of the threshold free item that will be used in calculating the prorated qty. discount. It will default to the item/supplier cost, but can be modified based on the agreement with the supplier. It must be greater than zero as this is the cost that would normally be charged for the goods if no deal applied.
discountApportionPercentage No Number (12,4) This column specifies how much percentage of the total discount should be apportioned from the get items unit cost for off invoice deals where buy item is not same as the get item and quantityThresholdGetType is X, P and A. The remaining will be apportioned from the buy item unit cost.
transactionDiscountInd No String (1) Indicates if the discount is a transaction-level discount (for example, 10% across an entire PO).
calculateIncomeFromZeroThresholdInd No String (1) Indicates if the valid values are Y or N. In cases where multiple thresholds are created but one does not exist from zero upwards, this additional indicator when checked will apply the income calculation from zero to the upper limit on the lower threshold rather than on just between the lower and upper limit of the lowest threshold.
vendorContributionType No String (6) Identifies the type of component contribution for a vendor funded-type of deal. Valid values include P (percent) and A (amount). They are held on the deal_comp_type table. This value is required for vendor funded markdown/promotion deals.
vendorContributionValue No Number (20,4) Identifies the value of component contribution for a vendor funded-type of deal. The type of the value is identified by the contribution type in the vend_contrib_type. This value is required for vendor funded markdown/promotion deals.
consignmentRate No Number (12,4) Rate used to capture the deal consignment rate applicable for the set of item/location combinations that are included in the deal during the deal timeframe, instead of the regular consignment rate.
comments No String (2000) Free-form comments entered with the deal component.
itemLocation No Collection of Object Collection of deal component item location records.
threshold No Collection of Object Collection of deal component threshold records.
promotion No Collection of Object Collection of deal component promotion records.
proofOfPerformance No Collection of Object Collection of deal component proof of performance records.

Table 5-58 ItemLocation - Object. See list of elements for detail

Element Name Required Data Type Description
action No String (10) Contains the action for the request. Valid value: CREATE.
itemLocationSequenceNo Yes Number (10) Sequence number that uniquely identifies each item/location line within the deal component.
excludeInd No String (1) Indicates if the deal component item/location line is included in the deal component or excluded from it. Valid values are Y or N.
merchandiseHierarchyLevel Yes String (6) Indicates what level of the merchandise hierarchy the record is at.
division No Number (4) ID of the division included in or excluded from the deal component.
group No Number (4) ID of the group included in or excluded from the deal component.
dept No Number (4) ID of the department included in or excluded from the deal component.
class No Number (4) ID of the class included in or excluded from the deal component.
subclass No Number (4) ID of the subclass included in or excluded from the deal component.
itemParent No String (25) Alphanumeric value that uniquely identifies the item/group at the level above the item. This value must exist as an item in another row on the item_master table.
item No String (25) This contains the item associated to the deal.
diff1 No String (10) Diff_group or diff_id that differentiates the current item from its item_parent.
diff2 No String (10) Diff_group or diff_id that differentiates the current item from its item_parent
diff3 No String (10) Diff_group or diff_id that differentiates the current item from its item_parent.
diff4 No String (10) Diff_group or diff_id that differentiates the current item from its item_parent.
originCountryId No String (3) This contains the Origin country of the item that the deal component should apply to.
organizationHierarchyLevel No String (6) Indicates what level of the organizational hierarchy the record is at. Valid values include 1 for chain, 2 for area, 3 for region, 4 for district and 5 for location. These level types will be held on the codes table under a code type of DIOL.
chain No Number (10) ID of the chain included in or excluded from the deal component.
area No Number (10) ID of the area included in or excluded from the deal component.
region No Number (10) ID of the region included in or excluded from the deal component
district No Number (10) ID of the district included in or excluded from the deal component.
location No Number (10) This contains the location associated to the deal.
locationType No String (1) This contains the location type of the location associated to the deal.
proofOfPerformance No Collection of Object Collection of deal item location proof of performance records.

Table 5-59 ProofOfPerformance - Object. See list of elements for detail

Element Name Required Data Type Description
action No String (10) Contains the action for the request. Valid value: CREATE.
dealReferenceItem No String (25) Specific transaction level (or below) item whose proof of performance is being measured. This can be populated when the deal itself is on a case UPC but the proof of performance is on an individual selling unit.
type No String (6) Code that identifies the proof of performance type (i.e. term is that the item must be displayed on an end cap for 28 days - the pop_type is code E for end cap display). Valid values for this field are stored in the code_type = PPT. This field is required by the database.
duration No Number (4) Value that describes the term of the proof of performance type (i.e. term is that the item must be displayed on an end cap for 28 days - the pop_value is 28). This field is required by the database if the record has a pop_value_type.
durationType No String (6) Value that describes the type of the pop_value (i.e. term is that the item must be displayed on an end cap for 28 days - the pop_value_type is the code D for days). Valid values for this field are stored in the code_type = PPVT. This field is required by the database if the record has a pop_value.
vendorRecommendedStartDate No date This column holds the date that the vendor recommends that the POP begin.
vendorRecommendedEndDate No date This column holds the date that the vendor recommends that the POP end.
plannedStartDate No date This column holds the date that the merchandiser/category manager plans to begin the POP.
plannedEndDate No date This column holds the date that the merchandiser/category manager plans to end the POP.
comments No String (2000) Free-form comments entered with the deal/deal component or deal item loc record.

Table 5-60 Threshold - Object. See list of elements for detail

Element Name Required Data Type Description
action No String (10) Contains the action for the request. Valid values: CREATE.
lowerLimit No Number (20,4) Lower limit of the deal component. This is the minimum value that must be met in order to get the specified discount. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_limit_type field of this deal component.
upperLimit No Number (20,4) Upper limit of the deal component. This is the maximum value for which the specified discount will apply. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_limit_type field of this deal component.
allowanceCode No String (10) This field contains the allowance component ID and is populated only in case of Allowance deals.
allowanceRate No Number (20,4) Holds the allowance rate for the allowance component ID. This field is defaulted from the ELC_COMP table and is populated only in case of Allowance deals. The value in this field will be a percentage if the allowance component’s Calculation Basis is V (Value) and a monetary amount in Deal’s currency if the Calculation Basis is S (Specific).
discountValue No Number (20,4) Value of the discount that will be given for meeting the specified thresholds for this deal component. This value will be either a currency amount or quantity value, depending on the value in the deal_detail.threshold_value_type field of this deal component. For allowance deals this will have value 1 by default.
useForCostCalculationInd No String (1) Indicates if a threshold level is the targeted purchase or sales level for a deal component. This indicator will be used for cost calculations. Valid values are Y or N.
applyAtTotalOrUnit No String (1) Indicates if the value for deal components for which the threshold type is amount off is amount off by unit or in total. Valid values are Y (by total) and N (by unit).

Table 5-61 Promotion - Object. See list of elements for detail

Element Name Required Data Type Description
action No String (10) Contains the action for the request. Valid values: CREATE.
promotionSource No String (2) This identifies the source of the associated deal promotion. Valid values are MP (Merch Pricing) or CE (Customer Engagement).
promotionId No Number (10) Promotion identification number. This can be either the promotion Id of promotion in Merch Pricing or CE.
offerId No Number (10) Promotion offer identification number. This must be the Offer Id if the source is MP Else it must be the Deal Id of the promotion if the source is CE.
vendorContributionType No String (6) Identifies the type of component contribution for a vendor funded-type. Valid values include P (percent) and A (amount). They are held on the deal_comp_type table. This value is required for vendor funded markdown/promotion deals.
vendorContributionValue No Number (20,4) Identifies the value of component contribution for a vendor funded-type. The type of the value is identified by the contribution type in the vend_contrib_type. This value is required for vendor funded markdown/promotion deals.
promotionalConsignmentRate No Number (12,4) Rate used to capture the deal consignment rate applicable for the set of item/location combinations that are included in the deal during the deal timeframe, instead of the regular consignment rate.

Table 5-62 ReferencedPromotion - Object. See list of elements for detail

Element Name Required Data Type Description
action No String (10) Contains the action for the request. Valid value: CREATE.
promotionId No Number (10) This contains the number which uniquely identifies a promotion in Merchandising.

ManageError - Object. See list of elements for detail

Element Name Required Data Type Description
externalReferenceNo Yes String (30) The external reference number of the deal that failed validation.
dealId Yes Number (10) The deal Id of the deal that failed validation.
dealDetailId Yes Number (10) The deal detail Id of the deal that failed validation.
itemLocationSequenceNo Yes Number (10) The sequence of the deal hierarchy record of the deal that failed validation.
proofOfPerformanceType Yes String (6) The proof of performance type of the deal/deal detail/deal hierarchy record that failed validation.
thresholdLowerLimit Yes Number (20,4) Lower limit of the deal component that failed validation.
thresholdUpperLimit Yes Number (20,4) Upper limit of the deal component that failed validation.
promotionId Yes Number (10) Promotion Id of the deal component that failed validation.
offerId Yes Number (10) Offer Id of the deal component promotion that failed validation. When source is MP, this maps to Offer ID else it maps to Deal Id.
referencedPromotionId Yes Number (10) Promotion Id of the deal that failed validation.
errorMessage Yes Array of String List of errors for the deal/deal component/deal hierarchy/deal threshold/deal component promotion/deal promotion.

Sample Input Message

{
  "collectionSize": 1,
  "items": [
    {
      "action": "CREATE",
      "externalReferenceNo": "CDEALREST_01",
      "dealId": 133578,
      "vendorType": "SS",
      "vendorId": null,
      "supplierId": 2400,
      "dealTimingType": "A",
      "status": "W",
      "currencyCode": "USD",
      "activeDate": "2001-12-31",
      "closeDate": "2001-12-31",
      "orderNo": null,
      "billingType": "BB",
      "thresholdLimitType": "Q",
      "thresholdLimitUom": "EA",
      "comparisonDate": null,
      "recalculateApprovedOrdersInd": "N",
      "recalculateInventoryValueInd": "N",
      "billBackReportingLevel": "W",
      "billBackDealBasis": "P",
      "billBackInvoicingBasis": "O",
      "billBackIncludeFranchiseLocations": "Y",
      "billBackUseSuggestedRetailInd": "Y",
      "useSupplierCostInd": "Y",
      "billBackAdditionalReportingDays": 2,
      "billBackAddPeriodScope": "L",
      "billBackPackLevelTrackingInd": "N",
      "billBackRebateCalculationType": "L",
      "billBackGrowthRebateInd": "N",
      "billBackRebateHistCompareStartDate": null,
      "billBackRebateHistCompareEndDate": null,
      "billBackPeriod": "W",
      "billBackMethod": "C",
      "billingVendorType": "SS",
      "billingVendorId": null,
      "billingSupplierId": 2400,
      "estimatedNextInvoiceDate": null,
      "dealIncomeCalculationLogic": "A",
      "invoiceProcessingLogic": "AA",
      "includeIncomeInStockLedgerInd": "Y",
      "includeTaxInd": "Y",
      "taxRegion": 1000,
      "comments": "Deal Header via ReST CDEALREST_01",
      "components": [
        {
          "action": "CREATE",
          "dealDetailId": 1,
          "dealComponentType": "TBB",
          "applyOrderSequenceNo": 1,
          "thresholdValueType": "Q",
          "dealClass": "CS",
          "costApplicationType": "NN",
          "includeDealInPricingCost": "N",
          "quantityThresholdBuyItem": "100950003",
          "quantityThresholdBuyQuantity": 20,
          "quantityThresholdBuyOrderTarget": 5,
          "quantityThresholdBuyAverageQuantityPerLocation": 5,
          "quantityThresholdRecursiveInd": "N",
          "quantityThresholdGetType": "P",
          "quantityThresholdGetItem": "100100068",
          "quantityThresholdGetValue": 12,
          "quantityThresholdGetQuantity": 4,
          "quantityThresholdFreeItemUnitCost": 25,
          "discountApportionPercentage": 6,
          "transactionDiscountInd": "N",
          "calculateIncomeFromZeroThresholdInd": "N",
          "vendorContributionType": null,
          "vendorContributionValue": null,
          "consignmentRate": null,
          "comments": "Deal Detail for CDEALREST_01",
          "itemLocation": [
            {
              "action": "CREATE",
              "itemLocationSequenceNo": 1,
              "excludeInd": "N",
              "merchandiseHierarchyLevel": "12",
              "division": null,
              "group": null,
              "dept": null,
              "class": null,
              "subclass": null,
              "itemParent": null,
              "item": "100100050",
              "diff1": null,
              "diff2": null,
              "diff3": null,
              "diff4": null,
              "originCountryId": null,
              "organizationHierarchyLevel": "5",
              "chain": null,
              "area": null,
              "region": null,
              "district": null,
              "location": 1531,
              "locationType": "S",
              "proofOfPerformance": [
                {
                  "action": "CREATE",
                  "dealReferenceItem": "100100092",
                  "type": "ECD",
                  "duration": 7,
                  "durationType": "MONTH",
                  "vendorRecommendedStartDate": "2001-12-31",
                  "vendorRecommendedEndDate": "2001-12-31",
                  "plannedStartDate": "2001-12-31",
                  "plannedEndDate": "2001-12-31",
                  "comments": "proof of performance at deal"
                }
              ]
            }
          ],
          "threshold": [
            {
              "action": "CREATE",
              "lowerLimit": 1,
              "upperLimit": 50,
              "allowanceCode": null,
              "allowanceRate": 21.00,
              "discountValue": 6,
              "useForCostCalculationInd": "Y",
              "applyAtTotalOrUnit": "Y"
            }
          ],
          "promotion": [
            {
              "action": "CREATE",
              "promotionSource": "MP",
              "promotionId": 1081,
              "offerId": 1191,
              "vendorContributionType": "OTHER",
              "vendorContributionValue": 4,
              "promotionalConsignmentRate": null
            }
          ],
          "proofOfPerformance": [
            {
              "action": "CREATE",
              "dealReferenceItem": "100100092",
              "type": "ECD",
              "duration": 7,
              "durationType": "MONTH",
              "vendorRecommendedStartDate": "2001-12-31",
              "vendorRecommendedEndDate": "2001-12-31",
              "plannedStartDate": "2001-12-31",
              "plannedEndDate": "2001-12-31",
              "comments": "proof of performance at deal"
            }
          ]
        }
      ],
      "referencedPromotion": [
        {
          "action": "CREATE",
          "promotionId": 1121
        }
      ],
      "proofOfPerformance": [
        {
          "action": "CREATE",
          "dealReferenceItem": "100100092",
          "type": "ECD",
          "duration": 7,
          "durationType": "MONTH",
          "vendorRecommendedStartDate": "2001-12-31",
          "vendorRecommendedEndDate": "2001-12-31",
          "plannedStartDate": "2001-12-31",
          "plannedEndDate": "2001-12-31",
          "comments": "proof of performance at deal"
        }
      ]
    }
  ]
}

Response Code: 200 (Success)

Table 5-63 ManageResponse - Object. See list of elements for detail

Element Name Required Data Type Description
complexDeals Yes Collection of Object Collection of deals (deal ID and external Reference No) successfully uploaded.

Table 5-64 ComplexDeals - Object. See list of elements for detail

Element Name Required Data Type Description
dealId Yes Number (10) Deal number. If input payload had this field as NULL then a unique system generated deal Id will be sent in the response. If input payload had a number sent from the external system, the same will be sent in the response.
externalReferenceNo Yes String (30) Unique external reference number associated with the deal.

Sample Response Message

{
  "complexDeals": [
    {
      "dealId": 133578,
      "externalReferenceNo": "String"
    }
  ]
}

Response Code: 400 (Error)

In case of error, the following standard error response will be returned. The element validationErrors will be present when input payload or input parameters do not match the schema definition for this service. The element businessError will be present if the payload passes schema validation but an exception is caught while processing the business logic.

Table 5-65 ManageError - Object. See list of elements for detail

Element Name Required Data Type Description
externalReferenceNo Yes String (30) The external reference number of the deal that failed validation.
dealId Yes Number (10) The deal Id of the deal that failed validation.
dealDetailId Yes Number (10) The deal detail Id of the deal that failed validation.
itemLocationSequenceNo Yes Number (10) The sequence of the deal hierarchy record of the deal that failed validation.
proofOfPerformanceType Yes String (6) The proof of performance type of the deal/deal detail/deal hierarchy record that failed validation.
thresholdLowerLimit Yes Number (20,4) Lower limit of the deal component that failed validation.
thresholdUpperLimit Yes Number (20,4) Upper limit of the deal component that failed validation.
promotionId Yes Number (10) Promotion Id of the deal component that failed validation.
offerId Yes Number (10) Offer Id of the deal component promotion that failed validation. When source is MP, this maps to Offer ID else it maps to Deal Id.
referencedPromotionId Yes Number (10) Promotion Id of the deal that failed validation.
errorMessage Yes Array of String List of errors for the deal/deal component/deal hierarchy/deal threshold/deal component promotion/deal promotion.

Sample Error Message

{
  "status": "ERROR",
  "message": "Error found in validation of input payload",
  "validationErrors": [
    {
      "error": "must be one of Y, N",
      "field": "createRecord.arg0.approveInd",
      "inputValue": "X"
    }
  ],
  "businessError": [
    {
      "externalReferenceNo": "String",
      "dealId": 133578,
      "dealDetailId": 510756,
      "itemLocationSequenceNo": 155375,
      "proofOfPerformanceType": "String",
      "thresholdLowerLimit": 14.00,
      "thresholdUpperLimit": 67.00,
      "promotionId": 756050,
      "offerId": 154881,
      "referencedPromotionId": 154554,
      "errorMessage": [
        "String"
      ]
    }
  ]
}