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-120 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-121 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-122 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, modify and delete all forms of complex deals that are currently supported via 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-123 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-124 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 values: CREATE, UPDATE, DELETE.

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 (i.e. external system generated number), it must be unique.

vendorType

No

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 (e.g. manufacturer), S2 for supplier hierarchy level 2 (e.g. distributor) and S3 for supplier hierarchy level 3 (e.g. 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 (e.g., 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.

status

No

String (6)

Code for the status of the deal. Valid values are W for worksheet, S for submitted, A for approved.

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 must be NULL for PO-specific Off Invoice/Allowance type of deals and required for PO-specific Bill Back/Bill Back Rebate type of deals.

clearCloseDate

No

String (1)

This field indicates if the corresponding field i.e. closeDate must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Close Date' of a deal needs to be updated to NULL, then this field must be set to 'Y' and closeDate set to NULL in the input payload.

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 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 held on the codes table under code type of DLLT.

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. Valid values are held on the codes table under 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 and 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 must be 'Y'. For Vendor Funded Promotion, Vendor Funded Markdown, Clearance Consignment Rate and Promotional Consignment deals, this flag must be 'N'. For Billback/Billback Rebate deals, this flag can be either 'Y' or 'N'.

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 an 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 and N. If the billBackDealBasis is set to 'P' and this field is Y, then INCLUDE_FRANCHISE_PURCH_IND will be set to Y else 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 else 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 if 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 and 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 and 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 and 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 are held on the codes table under the 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 and 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 are held on the codes table under a new code type of DLBP. Valid values are W for week, M for month, Q for Quarter, H for Half Year, 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 and these are held on the codes table under the 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 (e.g. manufacturer), S2 for supplier hierarchy level 2 (e.g. distributor), S3 for supplier hierarchy level 3 (e.g. 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.

clearBillingVendorType

No

String (1)

This field indicates if the corresponding fields i.e. billingVendorType, billingVendorId and billingSupplierId must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Billing Partner Type', 'Billing Partner Id' and 'Billing Supplier Id' of a deal needs to be updated to NULL, then this field must be set to 'Y', billingPartnerType set to NULL, billingPartnerId set to NULL and billingSupplierId set to NULL in the input payload.

billingVendorId

No

String (10)

Level of supplier hierarchy (e.g. 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. At the time of create, if this field is NULL (for applicable billing types) , then the estimated next invoice date is calculated.

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 and these are held on the codes table under the 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 held on the codes table under code type of CDIP. 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 and 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 and 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.

clearTaxRegion

No

String (1)

This field indicates if the corresponding field i.e. taxRegion must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Tax Region' of a deal needs to be updated to NULL, then this field must be set to 'Y', taxRegion set to NULL and includeTaxInd set to 'Y' in the input payload.

comments

No

String (2000)

Free-form comments entered with the deal.

clearComments

No

String (1)

This field indicates if the corresponding field i.e. comments must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Comments' of a deal needs to be updated to NULL, then this field must be set to 'Y' and comments set to NULL in the input payload.

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-125 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 values: CREATE, UPDATE, DELETE.

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

No

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.

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 are held on the codes table under the code type of DLL2.

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 are held on the codes table under the code type of DLCL.

clearDealClass

No

String (1)

This field indicates if the corresponding field i.e. dealClass must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Deal Class' of a deal component needs to be updated to NULL, then this field must be set to 'Y' and dealClass set to NULL in the input payload.

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 are held on the codes tables under the code type of DLCA.

clearCostApplicationType

No

String (1)

This field indicates if the corresponding field i.e. costApplicationType must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Cost Application Indicator' of a deal component needs to be updated to NULL, then this field must be set to 'Y' and costApplicationType set to NULL in the input payload.

includeDealInPricingCost

No

String (1)

Identifies deal components that should be included when calculating a pricing cost. Valid values are Y and N.

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 (e.g. 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 (e.g. 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 and 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 the 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 (e.g. 10% across an entire PO).

calculateIncomeFromZeroThresholdInd

No

String (1)

Indicates if the valid values are Y and 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.

totalBaselineTurnover

No

Number (20,4)

This column holds the total baseline turnover at the deal component level. This value cannot be updated once deal is approved. It must be either NULL or 0 for OI/ALW/CCR/PCR/VFP/VFM type of deals.

totalBudgetTurnover

No

Number (20,4)

This column holds the total budget turnover at the deal component level. This value cannot be updated once deal is approved. It must be either NULL or 0 for OI/ALW/CCR/PCR/VFP/VFM type of deals.

totalActualOrForecastTurnover

No

Number (20,4)

This column holds the total actual/forecast turnover at the deal component level. This field is applicable only during update of approved BB/BBR deals else it must be NULL.

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.

clearComments

No

String (1)

This field indicates if the corresponding field i.e. comments must be set to NULL during an UPDATE action. Valid values are Y and N. If the 'Comments' of a deal component needs to be updated to NULL, then this field must be set to 'Y' and comments set to NULL in the input payload.

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-126 ItemLocation - Object. See list of elements for detail

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, UPDATE, DELETE. Update of deal component item location information is not supported. Update action can be used to add new proof of performance definition information at the deal component item-loc level.

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 and N. While creating an exclusion record, there must be at least one inclusion record that is part of the payload. While creating an exclusion record, the merchandiseHierarchyLevel of this exclusion record must be less than the max(merchandiseHierarchyLevel) of the inclusion records. While creating an inclusion record, the merchandiseHierarchyLevel of this inclusion record must be greater than the max(merchandiseHierarchyLevel) of the exclusion records

merchandiseHierarchyLevel

No

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 are held on the codes table under the 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-127 ProofOfPerformance - Object. See list of elements for detail

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, UPDATE, DELETE.

proofOfPerformanceSequenceNo

Yes

Number (10)

Sequence number that uniquely identifies each proof of performance line for a deal/deal component/deal item loc record. This number must be unique across Merchandising and within the payload.

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 type is code E for end cap display). Valid values are held on the codes table under the code type of PPT.

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 duration is 28). This field is required if durationType is provided.

durationType

No

String (6)

Value that describes the type of the duration (i.e. term is that the item must be displayed on an end cap for 28 days - the durationType is the code D for days). Valid values are held on the codes table under the code type of PPVT. This field is required if duration is provided.

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.

fulfillment

No

Collection of Object

Collection of proof of performance fulfillment records.

Table 5-128 Fulfillment - Object. See list of elements for detail

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, DELETE.

fulfillmentSequenceNo

Yes

Number (10)

Instance of the proof of performance fulfillment (i.e. POP is that an item must be advertised three times during the month of July - three records will be required for one proofOfPerformanceSequenceNo). The values in this column must be sequenced for each proofOfPerformanceSequenceNo.

promotion

No

Number (10)

This column holds the Merchandising identification number that is associated with the proof of performance. This must be the Promotion Display Id of the promotion in Merchandising.

startDate

No

date

This column holds the first date of the proof of performance.

endDate

No

date

This column holds the last date of the proof of performance.

comments

No

String (2000)

Free-form comments entered with the deal/deal component or deal item loc record proof of performance fulfillment record.

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

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, UPDATE, DELETE.

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 in the deal_detail.threshold_limit_type field of this deal component.

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 value in the deal_detail.threshold_limit_type field of this deal component.

updatedLowerLimit

No

Number (20,4)

Updated value to be considered as the lower threshold limit while applying the corresponding rate/discount.

updatedUpperLimit

No

Number (20,4)

Updated value to be considered as the upper threshold limit while applying the corresponding rate/discount.

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 of the thresholdValueType 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 and 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).

reason

No

String (250)

This holds the reason for changing / adding / deleting a threshold for an approved complex deal.

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

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, UPDATE, DELETE. Update of component promotion is only supported for PCR type of deals.

promotionSource

Yes

String (2)

This identifies the source of the associated deal promotion. Valid values are MP (Merch Pricing) or CE (Customer Engagement) and are held on the codes table under the code type of PRSC.

promotionId

Yes

Number (10)

Promotion identification number. This can be either the Promotion Display Id of promotion in Merch Pricing or Promotion Id of promotion in CE.

offerId

Yes

Number (10)

Promotion offer identification number. This must be the Offer Display Id of the promotion 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. This field is updatable for PCR type of deals.

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

Element Name Required Data Type Description

action

Yes

String (10)

Contains the action for the request. Valid values: CREATE, DELETE.

promotionId

Yes

Number (10)

Promotion identification number. This must be the Promotion Display Id of the promotion in Merchandising.

Table 5-132 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.

proofOfPerformanceSequenceNo

Yes

Number (10)

Sequence number that uniquely identifies each proof of performance line for a deal/deal component/deal item loc record.

proofOfPerformanceType

Yes

String (6)

Proof of performance Type. This is for information purpose only.

fulfillmentSequenceNo

Yes

Number (10)

Sequence number that uniquely identifies the fulfillment for each proof of performance line for a deal/deal component/deal item loc record.

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",
"clearCloseDate": "N",
"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",
"clearBillingVendorType": "N",
"billingVendorId": null,
"billingSupplierId": 2400,
"estimatedNextInvoiceDate": null,
"dealIncomeCalculationLogic": "A",
"invoiceProcessingLogic": "AA",
"includeIncomeInStockLedgerInd": "Y",
"includeTaxInd": "Y",
"taxRegion": 1000,
"clearTaxRegion": "N",
"comments": "Deal Header via ReST CDEALREST_01",
"clearComments": "N",
"components": [
{
"action": "CREATE",
"dealDetailId": 1,
"dealComponentType": "TBB",
"applyOrderSequenceNo": 1,
"thresholdValueType": "Q",
"dealClass": "CS",
"clearDealClass": "N",
"costApplicationType": "NN",
"clearCostApplicationType": "N",
"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",
"totalBaselineTurnover": 1000,
"totalBudgetTurnover": 800,
"totalActualOrForecastTurnover": 0,
"vendorContributionType": null,
"vendorContributionValue": null,
"consignmentRate": null,
"comments": "Deal Detail for CDEALREST_01",
"clearComments": "N",
"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",
"proofOfPerformanceSequenceNo": 1,
"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",
"fulfillment": [
{
"action": "CREATE",
"fulfillmentSequenceNo": 1,
"promotion": 14,
"startDate": "2001-12-31",
"endDate": "2001-12-31",
"comments": "fulfillment of pop"
}
]
}
]
}
],
"threshold": [
{
"action": "CREATE",
"lowerLimit": 1,
"upperLimit": 50,
"updatedLowerLimit": null,
"updatedUpperLimit": null,
"allowanceCode": null,
"allowanceRate": 21.00,
"discountValue": 6,
"useForCostCalculationInd": "Y",
"applyAtTotalOrUnit": "Y",
"reason": "promotional"
}
],
"promotion": [
{
"action": "CREATE",
"promotionSource": "MP",
"promotionId": 1081,
"offerId": 1191,
"vendorContributionType": "OTHER",
"vendorContributionValue": 4,
"promotionalConsignmentRate": null
}
],
"proofOfPerformance": [
{
"action": "CREATE",
"proofOfPerformanceSequenceNo": 1,
"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",
"fulfillment": [
{
"action": "CREATE",
"fulfillmentSequenceNo": 1,
"promotion": 14,
"startDate": "2001-12-31",
"endDate": "2001-12-31",
"comments": "fulfillment of pop"
}
]
}
]
}
],
"referencedPromotion": [
{
"action": "CREATE",
"promotionId": 1121
}
],
"proofOfPerformance": [
{
"action": "CREATE",
"proofOfPerformanceSequenceNo": 1,
"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",
"fulfillment": [
{
"action": "CREATE",
"fulfillmentSequenceNo": 1,
"promotion": 14,
"startDate": "2001-12-31",
"endDate": "2001-12-31",
"comments": "fulfillment of pop"
}
]
}
]
}
]
}

Response Code: 200 (Success)

Table 5-133 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-134 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 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.

Table 5-135 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.

proofOfPerformanceSequenceNo

Yes

Number (10)

Sequence number that uniquely identifies each proof of performance line for a deal/deal component/deal item loc record.

proofOfPerformanceType

Yes

String (6)

Proof of performance Type. This is for information purpose only.

fulfillmentSequenceNo

Yes

Number (10)

Sequence number that uniquely identifies the fulfillment for each proof of performance line for a deal/deal component/deal item loc record.

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,
"proofOfPerformanceSequenceNo": 390833,
"proofOfPerformanceType": "String",
"fulfillmentSequenceNo": 195679,
"thresholdLowerLimit": 14.00,
"thresholdUpperLimit": 67.00,
"promotionId": 756050,
"offerId": 154881,
"referencedPromotionId": 154554,
"errorMessage": [
"String"
]
}
]
}