Page History: Order Import Automation
Compare Page Revisions
Page Revision: Tue, 01 Jun 2021 12:51
General
Program Name - MBSREAD
Text File - mbstext
Function - This program is designed to automatically import Sales Orders and Quotes from emailed files using the logic from the Questware Import process. A new email account will need to be set up by the customer's email provider. The name of the email does not matter, but the account will need to be able to send emails through SMTP and connect through IMAP. The program will log in to the email account and check for new files every 30 seconds. If the proper files are found, the program will attempt to create an order. It will then send a confirmation email back to original sender letting them know if the import was successful, or explaining why it failed.
Text File Setup
This should be set up the same way the Inboxtext and Poptext files are set up, using the credentials for the new email account that is required for this program to run.
Header File Template
The Header file template must be a CSV file with the following columns:
Type – Type code for the type of order to create. This value should come from the Sales Order Types rule, or the Quote Types rule, depending on the value entered in the SorQ column (explained below).
New Number – SO or Quote number to use for the order. This can be left blank to let Adjutant assign the next available order number.
Soldto – Organization ID of the customer for the order.
Billto – Organization ID of the entity responsible for paying the bill. This can be different from the Soldto, but is more commonly the same.
Shipto – Organization ID of the address that the order is being shipped to.
Whse – Warehouse responsible for shipping the finished products.
Plant – Warehouse responsible for producing the finished products.
SorQ – Either an “S” to import the order as a Sales Order, or a “Q” to import the order as a Quote.
Lines File Template
The Lines file must be a CSV file with the following columns:
Qty – Quantity of the finished product item.
Pcmk – Piece mark of the item. This gets matched to the Piece Mark Configuration question for the item code (Rep Code A). This is also how the finished product item is matched up to the BOM inputs.
Descr – Description of the finished product item.
Clrname – Color Name. Can be left blank.
Dwg – Drawing reference. Can be left blank.
Sleng – Length of the finished product item. If not applicable, leave blank or 0.
Swgt – Weight of the finished product item.
Spunch – Punch code for the item. Can be left blank.
Slenin – Length of the finished product item in inches. If not applicable, leave blank or 0.
Sclass – Class of the finished product item. Can be left blank.
Spart – Not in use.
Sthk – Thickness for the finished product item. This can be left blank.
Sclrcode – Color code. This can be left blank.
Adjpartno – This is the Adjutant Item Code for the finished product item that will be used during the match up process. If this does not match a code in Adjutant, the import will fail.
Price – Price per “qty” (without tax) of the associated line. Taxes will be calculated in Adjutant.
BOM File Template
The Lines file template must be a CSV file with the following columns:
Asmpmk – Piece mark of the finished product item that this input item belongs to.
Pcmk – Piece mark of the input item. This can be left blank if the item doesn’t have or need a piece mark question.
Descr – Description of the input item.
Qty – Quantity of the input item needed to make the finished product. If the input item is stocked in FT, use “1” here and enter the quantity needed in the slenin column.
Swgt – Weight of the input item.
Sleng – Length needed of the input item if stocked in FT (does not drive custom BOM Qty).
Slenin – Length in inches needed of the input item if stocked in FT. This is the driving factor when determining how much qty to call out on the custom BOM. If 50 feet of coil is needed, then the value here should be 600.
Sthk – Thickness of the input item. This can be left blank.
Sarea - Not in use.
Clrname – Color Name. This can be left blank.
Sclrcode – Color code. This can be left blank.
Adjpartno – This is the Adjutant Item Code for the input item that will be used to make the finished product it is associated with. If this does not match a code in Adjutant, the import will fail.