= EDI = EDI is a system that allows businesses exchange and process documents via a third party with little or no human intervention. For retailers, this means that purchase orders can be automatically sent to a supplier or customers orders can be received and processed. When generating purchase order, {{{spporep}}} can specify to generate a file and place it in the appropriate folder for sending by an external EDI vendor. == Compiling == All files must follow the format specified by the vendor. The vendor checks the file, imports the file into its database and generates a corresponding file for the recipient. Allphones use B2BE as their EDI vendor. I am not sure who DIM use for their EDI, they follow the same format as B2BE. To compile a special version of {{{spporep}}} with a different format, you will need to compile {{{spporep}}} with the "-DSPCLINCDIR=" compile time flag and rename it to something sensible. == Outgoing Files == === Setup === 1. Control allows auto-generated POs to be Emailed or Printed. You will need to choose one of these methods as the method for creating EDI files. That is, you need to choose from one of the following statements: 1. "When I print out an auto-generated PO for this creditor, I want CONTROL to create an EDI file instead" 1. "When I email an auto-generated PO for this creditor, I want CONTROL to create an EDI file instead" 1. "When I create an auto-generated PO for this creditor, I want CONTROL to always create an EDI file" 1. Set the appropriate creditors to email/print auto-generated POs as per you choice above 1. {{{craad}}}->Purchase Order (Email/Print) 1. E => "I want to email auto-generated POs for this creditor" 1. P => "I want to printout auto-generated POs for this creditor" 1. => Not sure what this does !! 1. Specify the customised {{{spporep}}} to use for generating EDI files 1. If using emails as the method to create EDI files {{{ ln -s /u/cc/std/binl/B2BEspporep /u/cc/std/binl/spporepE}}} 1. If using printouts as the method to create EDI files {{{ ln -s /u/cc/std/binl/B2BEspporep /u/cc/std/binl/spporepP}}} 1. If you want to always create EDI files for this creditor. '''NOTE:''' If any one of the symbolic links above are created, they will be used instead of the below {{{ ln -s /u/cc/std/binl/B2BEspporep /u/cc/std/binl/spporep}}} 1. (Optional) Setup EDI email alerts ({{{gencont}}} -> EDI Manager Email) 1. Ensure that {{{edi_commit.sh}}} moves the EDI files to a folder that the EDI vendor's software can access Also see * [[DIM_EDI]] * [[Allphones_EDI]] === How it works === 1. PO is generated 1. {{{spporep}}} is run via {{{sieat/stpost/steat/aleat}}} 1. {{{spporep}}} checks to see if there exists 1. {{{spporepE}}}, if creating EDI files via emails 1. {{{spporepP}}}, if creating EDI files via printing 1. If not, check to see if there exists a {{{spporep}}} 1. {{{spporep}}} creates file in /u/cc/ 1. {{{spporep}}} calls the script {{{edi_commit.sh}}} 1. {{{edi_commit.sh}}} moves newly generated file into the appropriate directory 1. EDI vendor software retrieves file and imports into their system == Incoming Files (Allphones only) == The various programs and scripts have been created, but they have not been installed for some reason. 1. EDI vendor software creates file in appropriate directory 1. crontab schedules {{{edi_import.sh}}} to run periodically 1. {{{edi_import.sh}}} runs a program {{{process_edi}}} 1. {{{process_edi}}} processes file to create order/invoice 1. On success, file extension is changed to .success 1. On failure, * For "Soft Errors", leave file for processing at another time * Delivery docket not found * After 2-3 days, generate warnings * Later on, upgrade to "Hard Error" status * For "Hard Errors", file extension is changed to .err * Invoice references PO/stock/etc. that does not exist CategoryEdi CategoryAllphones [[CategroyDim|CategoryDim]]