# Acknowledgments
Acknowledgments are sent to Sherwin Williams as 855 documents. Only one acknowledgment is required per purchase order. Sherwin Williams requires there to be an estimated shipping date for each line item. Since a purchase order could be broken up into multiple orders, it will not send the acknowledgment until these criteria are met:
- Each order with the purchase order number is made into a real order (not pending)
- Each order has an estimated ship date
Note
Sherwin Williams says that re-sending an acknowledgment with updated data (ie. changed ship dates) is allowed, however, we are not currently doing this.
WARNING
Sherwin Williams warns that if a purchase order is left in a pending state (has not received an acknowledgment) for too long, the store that made the order is more likely to cancel the order.
# Checking if ready
There are currently three places that call SW.EDI.ACK: background processing (PGMOE4138), inquiry slip update (PGMIQ1002) and the DOE inquiry detail screen (PGMOEE001).
Each time SW.EDI.ACK runs, it uses SW.LOG to find all the line items that were created for the purchase order number (could be multiple orders) and check two things:
- Each line must not be pending
- Each line must have an estimated shipping date
# Creating the data
The acknowledgment will only send back the line items that were created from the purchase order. If for some reason additional line items were added to an order that was not on the original PO from Sherwin Williams, it will not send those.
All freight lines are added up and sent in the header. It does not send these as individual lines items.
Tax amounts from all orders for the po number are added and sent in the header.
# Default data
For some reason, Sherwin Williams requires all of the fields to be sent back on the acknowledgement that were sent on their purchase order. This is according to Infocon. These fields which really shouldn't change are stored as "default values" in the SW.EDI.IN log record.
# Removig PO Suffix
When creating the order(s), the po number is stored with the suffix of "~SWEDI". After the acknowledgment is sent, it will remove this suffix from all applicable orders.
# Logging
A log of the exact JSON that is sent is stored in SW.EDI.OUT.
There are two different versions that are saved. One version saves the exact JSON string and is named with the suffix of .json.
The other version uses the LOG.JSON program to save all of the field names and values in a multi-value way. This one has a suffix of .mv.
# Errors
Any errors that are encountered are stored in SW.ERR and are also sent via email to SW.SVC.ADMIN.