Deals

The following services are included in this functional area:

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

Manage - Object. See list of elements for detail

Items - Object. See list of elements for detail

Components - Object. See list of elements for detail

ItemLocation - Object. See list of elements for detail

ProofOfPerformance - Object. See list of elements for detail

Fulfillment - Object. See list of elements for detail

Threshold - Object. See list of elements for detail

Promotion - Object. See list of elements for detail

ReferencedPromotion - Object. See list of elements for detail

ManageError - Object. See list of elements for detail

Response Code: 200 (Success)

ManageResponse - Object. See list of elements for detail

ComplexDeals - Object. See list of elements for detail

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.

ManageError - Object. See list of elements for detail

Manage Fixed Deals

Functional Area

Deals

Business Overview

This service can be used to create, modify and delete Merchandise as well as non-Merchandise based Fixed Deals.

Service Type

PUT

ReST URL

MerchIntegrations/services/deals/fixedDeals/manage

Input Payload Details

Manage - Object. See list of elements for detail

Items - Object. See list of elements for detail

Taxes - Object. See list of elements for detail

Merchandise - Object. See list of elements for detail

Locations - Object. See list of elements for detail

Promotions - Object. See list of elements for detail

ProofOfPerformance - Object. See list of elements for detail

Fulfillment - Object. See list of elements for detail

ManageError - Object. See list of elements for detail

Sample Input Message

{
"collectionSize": 1,
"items": [
{
"action": "CREATE",
"externalReferenceNo": "FIXEDDEALREST_01",
"dealId": 133588,
"status": "A",
"dealDescription": "Fixed Deal",
"vendorType": "SS",
"vendorId": null,
"supplierId": 2400,
"dealType": "OTHER",
"dealAmount": 1000,
"currencyCode": "USD",
"organizationUnitId": null,
"merchandiseInd": "Y",
"nonMerchandiseCode": null,
"taxInd": "N",
"taxCode": null,
"merchandiseIncomeApportionMethod": "R",
"locationIncomeApportionMethod": "R",
"recalculateInventoryValueInd": "N",
"prepaidInd": "N",
"collectFrequency": "M",
"collectStartDate": "2001-12-31",
"collectCount": 1,
"postingFrequency": null,
"postingOccurrence": null,
"invoiceProcessingLogic": "AA",
"invoiceDocumentType": "C",
"comments": "Fixed Deal Header via ReST FDEALREST_01",
"clearComments": "N",
"taxes": [
{
"action": "CREATE",
"taxCode": "S",
"taxBasis": 1000,
"clearTaxBasis": "N",
"taxAmount": 50,
"clearTaxAmount": "N"
}
],
"merchandise": [
{
"action": "CREATE",
"sequenceNo": 1,
"merchandiseLevel": "D",
"dept": 1000,
"class": null,
"subclass": null,
"itemParent": null,
"item": null,
"contributionRatio": null,
"clearContributionRatio": "N",
"locations": [
{
"action": "CREATE",
"locationType": "S",
"location": 1521,
"contributionRatio": null,
"clearContributionRatio": "N"
}
]
}
],
"promotions": [
{
"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 for fixed deal",
"fulfillment": [
{
"action": "CREATE",
"fulfillmentSequenceNo": 1,
"promotionId": 14,
"startDate": "2001-12-31",
"endDate": "2001-12-31",
"comments": "Fulfillment of POP"
}
]
}
]
}
]
}

Response Code: 200 (Success)

ManageResponse - Object. See list of elements for detail

FixedDeals - Object. See list of elements for detail

Sample Response Message

{
"fixedDeals": [
{
"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.

ManageError - Object. See list of elements for detail

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,
"merchSeqNo": 271772,
"location": 190104,
"taxCode": "String",
"popDefSeqNo": 390833,
"popType": "String",
"popFulfillSeqNo": 195679,
"promotionId": 799212,
"errorMessage": [
"String"
]
}
]
}

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-116 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-117 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-118 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"
  ]
}