SubmitVendorOrderAcknowledgement
Submits acknowledgements for one purchase order.
Execute
The Driver Uses #TEMP tables as fields for aggregate information entered
You must include in your query information for both OrderAcknowledgement and OrderItemAcknowledgement.
First we create an OrderItemAcknowledgements temporary table for the OrderAcknowledgement number 1:
INSERT INTO itemAck1#TEMP (AcknowledgementCode, AcknowledgedAmount, AcknowledgedUnit, AcknowledgedUnitSize, ScheduledShipDate, ScheduledDeliveryDate, RejectionReason)
VALUES ('Accepted', 100, 'Cases', 10, '2022-02-02T12:00:00Z', '2022-02-10T15:00:00Z', 'TemporarilyUnavailable')
INSERT INTO itemAck1#TEMP (AcknowledgementCode, AcknowledgedAmount, AcknowledgedUnit, AcknowledgedUnitSize, ScheduledShipDate, ScheduledDeliveryDate, RejectionReason)
VALUES ('Accepted', 100, 'Cases', 20, '2022-03-02T12:00:00Z', '2022-03-10T15:00:00Z', 'InvalidProductIdentifier')
INSERT INTO itemAck1#TEMP (AcknowledgementCode, AcknowledgedAmount, AcknowledgedUnit, AcknowledgedUnitSize, ScheduledShipDate, ScheduledDeliveryDate, RejectionReason)
VALUES ('Rejected', 100, 'Cases', 30, '2022-04-02T12:00:00Z', '2022-04-10T15:00:00Z', 'ObsoleteProduct')
INSERT INTO itemAck1#TEMP (AcknowledgementCode, AcknowledgedAmount, AcknowledgedUnit, AcknowledgedUnitSize, ScheduledShipDate, ScheduledDeliveryDate, RejectionReason)
VALUES ('Rejected', 101, 'Cases', 30, '2022-04-02T12:00:00Z', '2022-04-10T15:00:00Z', 'ObsoleteProduct')
Then we create another OrderItemAcknowledgements temporary table for the OrderAcknowledgement number 2:
INSERT INTO itemAck2#TEMP (AcknowledgementCode, AcknowledgedAmount, AcknowledgedUnit, AcknowledgedUnitSize, ScheduledShipDate, ScheduledDeliveryDate, RejectionReason)
VALUES ('Accepted', 99, 'Cases', 9, '2022-09-09T12:00:00Z', '2022-08-8T15:00:00Z', 'ObsoleteProduct')
After that we have to create another temporary table referencing previously created temporary tables itemAck1#TEMP and itemAck2#TEMP
INSERT INTO orderAck#TEMP (ItemSequenceNumber, AmazonProductIdentifier, VendorProductIdentifier, OrderedAmount, OrderedUnit, OrderedUnitSize, NetCostCurrencyCode, NetCostAmount, ListPriceCurrencyCode, ListPriceAmount, DiscountMultiplier, ItemAcknowledgements)
VALUES ('seq1', 'id1', 'vendId1', 100, 'Cases', 2, 'ALL', 999, 'ALL', 999, 'discount_multiplier_123', 'itemAck1#TEMP')
INSERT INTO orderAck#TEMP (ItemSequenceNumber, AmazonProductIdentifier, VendorProductIdentifier, OrderedAmount, OrderedUnit, OrderedUnitSize, NetCostCurrencyCode, NetCostAmount, ListPriceCurrencyCode, ListPriceAmount, DiscountMultiplier, ItemAcknowledgements)
VALUES ('seq2', 'id2', 'vendId2', 200, 'Cases', 4, 'ALL', 992, 'ALL', 992, 'discount_multiplier_456', 'itemAck2#TEMP')
After we have created necessary temporary tables we can execute the stored procedure, as shown in the example below:
EXECUTE SubmitVendorOrderAcknowledgement
PurchaseOrderNumber = 'PurchaseOrderNumber1',
SellerPartyId = '123',
SellerTaxRegistrationType = 'VAT',
SellerTaxRegistrationNumber = '123456',
AcknowledgementDate = '2022-01-01T10:00:00.000',
Items = 'orderAck#TEMP';
OrderAcknowledgement temporary table schema info:
Column Name | Type | Required | Description |
ItemSequenceNumber | string | false | Line item sequence number for the item. |
AmazonProductIdentifier | string | false | Amazon Standard Identification Number (ASIN) of an item. |
VendorProductIdentifier | string | false | The vendor selected product identification of the item. Should be the same as was sent in the purchase order. |
OrderedAmount | integer | true | Ordered quantity. This value should not be zero. |
OrderedUnit | string | true | Unit of measure for the ordered quantity. |
OrderedUnitSize | integer | true | The case size, in the event that we ordered using cases. |
NetCostCurrencyCode | string | false | Three digit currency code in ISO 4217 format. |
NetCostAmount | string | false | A decimal number with no loss of precision. |
ListPriceCurrencyCode | string | false | Three digit currency code in ISO 4217 format. |
ListPriceAmount | string | false | A decimal number with no loss of precision. |
DiscountMultiplier | string | false | The discount multiplier that should be applied to the price if a vendor sells books with a list price. |
ItemAcknowledgements | string | true | This is used to indicate acknowledged quantity. Should be specified using a #TEMP table. |
OrderItemAcknowledgement temporary table schema info:
Column Name | Type | Required | Description |
AcknowledgementCode | string | true | This indicates the acknowledgement code. |
AcknowledgedAmount | integer | true | Ordered quantity. This value should not be zero. |
AcknowledgedUnit | string | true | Unit of measure for the ordered quantity. |
AcknowledgedUnitSize | integer | false | The case size, in the event that we ordered using cases. |
ScheduledShipDate | datetime | false | Estimated ship date per line item. Must be in ISO-8601 date/time format. |
ScheduledDeliveryDate | datetime | false | Estimated delivery date per line item. Must be in ISO-8601 date/time format. |
RejectionReason | string | false | Indicates the reason for rejection. |
Input
Name | Type | Required | Description |
PurchaseOrderNumber | String | True | The purchase order number |
SellerPartyId | String | True | Assigned identification for the party. For example, warehouse code or vendor code. |
SellerTaxRegistrationNumber | String | False | Tax registration number for the entity. For example, VAT ID. |
SellerTaxRegistrationType | String | False | Tax registration type for the entity.
The allowed values are VAT, GST. |
SellerAddressAddressLine1 | String | False | First line of the address. |
SellerAddressAddressLine2 | String | False | Additional address information, if required. |
SellerAddressAddressLine3 | String | False | Additional address information, if required. |
SellerAddressCity | String | False | The city where the person, business or institution is located. |
SellerAddressCountryCode | String | False | The two digit country code in ISO 3166-1 alpha-2 format. |
SellerAddressCounty | String | False | The county where person, business or institution is located. |
SellerAddressDistrict | String | False | The district where person, business or institution is located. |
SellerAddressName | String | False | The name of the address of the person, business or institution. |
SellerAddressPhone | String | False | The phone number of the person, business or institution located at that address. |
SellerAddressPostalCode | String | False | The postal code of that address. It contains a series of letters or digits or both. |
SellerAddressStateOrRegion | String | False | The state or region where person, business or institution is located. |
Items | String | True | An aggregate representation items. Can be in the form of #TEMP table. |
AcknowledgementDate | Datetime | False | The date and time when the purchase order is acknowledged, in ISO-8601 date/time format. |
Result Set Columns
Name | Type | Description |
Success | String | |
TransactionId | String |