OpenPro EDI Processing and Setup Guide
Back
EDI Processing and Setup Guide
EDI is the procedure of importing electronic documents from suppliers or vendors into your ERP system for processing.
OpenPro works with three different transaction processors:
XML format—manually converts the data.
WebEDI—web-based EDI processor used to convert data; set up with your trading partner.
Ecom system—an additional format.
Electronic Data Interchange (EDI) can be established by the conventional ANSI x25 method using a Value Added Network.
OpenPro is designed with Electronic Data Interchange (EDI) in mind. OpenPro also has XML layouts for importing and exporting data to other systems.
OpenPro ERP Software can interface to each trading partner and send OpenPro XML formatted data.
OpenPro EDI Solution - Simple and Affordable
Our EDI solution is a simple way for small and medium-sized suppliers to process EDI transactions. Our EDI services are affordable and turnkey, which means you do not have to know anything about EDI or how it works. All you need is Internet access and email.
Our web-based solution allows you to trade EDI documents/files, including the ability to:
Receive 850 Purchase Orders
Receive 997 Functional Acknowledgement
Send 810 Invoices
Send 997 Functional Acknowledgement
Send 856 Advanced Ship Notice (ASN)
Send 855 Purchase Order Acknowledgement (PO)
Send / Receive any other EDI documents required
Advantages of OpenPro’s EDI Offering
The OpenPro EDI Pipeline can serve as a stand-alone solution to meet trading partner requirements, or can be a single interface to trade EDI documents with all of your customers.
There are hundreds of known trading partners. Our system can streamline your EDI communications with any partners.
The advantages of using our system include:
Plain English view of documents (purchase orders, invoices, etc)
Web-based system allows you to access it from any computer
No software installation required
No additional staff required
No technical skills required
We handle all set up and technical interaction with your trading partner’s font
We train you on the web-based control panel
We handle all technical aspects of setup and continued maintenance
We can provide electronic files that import into your software systems
We speak English, and we answer the phone when you call us
You can stop stressing about EDI and focus on growing your business
You gain our technology and experienced support staff for a fraction of the price of one employee
Details of Our EDI Offering
The OpenPro EDI Pipeline solution for trading partners includes access to a web-based, password protected control panel that allows you to view and manage all aspects of document trading. The web-based Control Panel includes the following features:
Communication Manager
The communication manager is an easy to understand interface that allows you to see every EDI file / document sent to and received from trading partners. The files can be viewed in a plain English printable format, or in the raw EDI format. The following components are included with the communication manager:
Inbox – showing all pending inbound documents (i.e. 850 Purchase Orders and 997 Functional Acknowledgements).
Received Log – a historical log of all inbound documents already processed.
Outbox – showing all pending outbound documents (i.e. 810 Invoices, 856 Advance Ship Notices, 855 Purchase Order Acknowledgements, and 997 Functional Acknowledgments)
Sent Log – a historical log of all outbound documents already processed.
Deleted Log – A log of all pending documents that were deleted before being processed.
Order Log
The Order Log is an alternative way to view of all documents related to a single inbound Purchase Order. When the 850 Purchase Order is received from trading partners, it is set up in the Order Log. In addition, all of the corresponding documents associated with the Purchase Order (i.e. the 810 Invoice, the 997 Functional Acknowledgements, etc) are tied to it for easy access.
How You Get Purchase Orders
Once the 850 Purchase Order is received by the EDI Pipeline system, it is converted into a plain English (readable) format that you can view and print. The plain English format is available in any of the following ways:
Via Email – automatically sent to your email address(es)
Via Your Control Panel – log in and view it at any time
Via Fax – automatically sent to your fax number
In addition, the Purchase Order can be converted into an electronic file that can be imported into any industry standard or unique electronic format.
Import into Your Software Programs
The EDI Pipeline solution can optionally include a method to electronically import trading partner Purchase Orders into your financial / inventory software (or any other software system), eliminating the need to manually key in the order data. The Purchase Order is received by the EDI Pipeline system, translated into the specific format your software needs, and sent to your office to import. The file can be sent via any method desired; the most popular being via email or FTP (to a specific server location).
EDI Configuration Processing
OpenPro EDI Processing and Setup
EDI must be turned on in the Business Rules.
Configuration file and setup for OpenPro:
This is the table that needs to be set up for sending and receiving formats.
EDI Format Setup: communicates your data formatting preferences to the OpenPro system.
EDI Configuration Processing
Description – enter a description of the transaction type.
PO/OE—if the transaction is from the OpenPro Sales Order Processing or Purchase Order Module.
FORMAT:
XML—for the XML document format
WEBEDI—for using WebEDI ANSI x12 processor
ECOM —for using ECOM systems ANSI x12 processor
USE:
Y if you are using that record vs. other records in the table
MODE:
P for Production, T for TESTING
Batch processing:
OpenPro uses batch processing to send and receive data from the VAN.
OpenPro expects all data from the VAN to be in the following folders:
/documents/edi/in for incoming
/documents/edi/out for outgoing
This batch processing varies based upon the system used, but this is a good start on what programs to run within OpenPro for the batch processing.
When Records come into and flow out of the OpenPro system:
Program edi_batch_process_incoming.php
This can then be put on a scheduler and run every hour, or 2 times a day, etc.
After you import the ASCII records, you then can create a Sales Order or Purchase Order.
Program: edi_batch_850_create_so.php
This will create a Sales Order in order entry.
Program: edi_po_810.php
This program will create AP vouchers from the purchasing system, from the customer’s electronic invoice.
Batch processing uses FTP to send and receive documents.
FTP instructions for Push/Pull Scenario:
Directory Structure:
RCV: Customer will push the files to this folder.
SND: Customer will pull the files from SND folder.
Sending Files to VAN
The following illustrates the sequence of a typical send session:
-
Once connected, you will be prompted for your User ID and Password. Please enter exactly as provided (case sensitive).
You will be in the root directory, do a “cd rcv”.
Then push the files to rcv folder.
Receiving Files from VAN
The following illustrates the sequence of a typical send session:
-
Connect to ecomint.ecomtoday.com.
Once connected, you will be prompted for your User ID and Password. Please enter exactly as provided (case sensitive).
You will be in the root directory, do a “cd snd”.
Then pull the files one by one from snd folder.
Once you pull the files, they have to be deleted from the snd folder to avoid duplication. Files in snd should be deleted individually because there are files coming into the snd folder in real-time.
Sample FTP batch program:
Click to open
#!/bin/ksh
#####################################################################
#
# Script name: ftp.job
#
# Called by send_receive
#
###### M O D I F I C A T I O N H I S T O R Y ################
#
#
#
####################################################################
local_recv_path=/var/www/html/documents/edi/in
move_file_script=/u34/gentran/script/move_inbfiles.sh
mondir=/u34/gentran/monitor
network_dir=$1
jobname=$2
config=$3
out_dir_filename=$4
userid=$5
passwd=$6
hostname=$7
rcvcd=$8
delvpath=$9
delvfile=${10}
remote_recv_path=${11}
filename=`basename $out_dir_filename`
tpid=`echo $filename | cut -f1 -d"." | cut -f2 -d"_" | tr "[:upper:]" "[:lower:]"`
out_dir=`dirname $out_dir_filename`
pid=$$
putcmd=put
tmp_local_recv_path=$local_recv_path/$pid
joblog=$network_dir/`echo $jobname| cut -f1 -d"."`.log
tmpjoblog=$network_dir/`echo $jobname| cut -f1 -d"."`.log.$pid
email_script=/usr/adm/scripts/network_mail
email_message=/tmp/ftp_email_message.$pid
member=OUTB
fail_flag="N"
if [ ! -s $out_dir_filename -a "${remote_recv_path}A" = "A" ]
then
echo "FTP job tried to execute without data in the file and we do not" \
> $email_message
echo "pull from trading partner $tpid." >> $email_message
echo "file $out_dir_filename has been deleted" >> $email_message
$email_script "$member" "Invalid FTP job" "$email_message"
rm $email_message $out_dir_filename > /dev/null 2>&1
return 1
fi
dts=`date +D%y%m%d.T%H%M%S` # create a unique date stamp for the filename
delvfile=${delvfile}.${dts}
echo "FTP failed for job=$jobname sending $out_dir/$filename\n" > $email_message
echo "\n\n `date +%T` ********** FTP LOGON ********** `date +%a` `date
+%b` `date +%e,` `date +%Y`" \
>> $tmpjoblog
echo 1 network_dir=$network_dir >> $tmpjoblog
echo 2 jobname=$jobname>> $tmpjoblog
echo 3 config=$config>> $tmpjoblog
echo 4 out_dir_filename=$out_dir_filename>> $tmpjoblog
echo 5 userid=$userid>> $tmpjoblog
#echo 6 passwd=$passwd>> $tmpjoblog
echo 7 hostname=$hostname>> $tmpjoblog
echo 8 rcvcd=$rcvcd>> $tmpjoblog
echo 9 delvpath=$delvpath>> $tmpjoblog
echo 10 delvfile=$delvfile>> $tmpjoblog
echo 11 remote_recv_path=$remote_recv_path >> $tmpjoblog
echo filename=`basename $out_dir_filename`>> $tmpjoblog
echo tpid=`echo $filename | cut -f1 -d"." | cut -f2 -d"_" | tr "[:upper:]" "[:lower:]"` >>
$tmpjoblog
echo out_dir=`dirname $out_dir_filename`>> $tmpjoblog
# A file is created to monitor the length of time the job runs to ensure it does not
hang. The name of the file is the time stamp that the job begins and the contents of
the file is the process ID. If the job runs longer than a preset time, then the process is
killed and it starts over. The ftp command is dynamically created each time the job
runs.
monitor_dttm=`date +%y%j.%H%M%S.pr`
echo "open $hostname" > $network_dir/${jobname}_ftpcmds.$pid
echo "user $userid $passwd" >> $network_dir/${jobname}_ftpcmds.$pid
echo "! echo \$PPID > $mondir/ftp_in_out.${monitor_dttm}" \
>> $network_dir/${jobname}_ftpcmds.$pid
echo asc >> $network_dir/${jobname}_ftpcmds.$pid
if [ -s $out_dir_filename ]
# if there is data to send
then
# create send commands
echo "cd $delvpath" >> $network_dir/${jobname}_ftpcmds.$pid
echo "lcd $out_dir" >> $network_dir/${jobname}_ftpcmds.$pid
echo "$putcmd $filename .${delvfile}" >> $network_dir/${jobname}_ftpcmds.$pid
echo "rename .${delvfile} ${delvfile}" \
>> $network_dir/${jobname}_ftpcmds.$pid
echo "dir" >> $network_dir/${jobname}_ftpcmds.$pid
fi
if [ ! "${remote_recv_path}A" = "A" ] # if we pull data
then
# create directory
mkdir $tmp_local_recv_path
# and create receive commands
echo "cd $remote_recv_path" >> $network_dir/${jobname}_ftpcmds.$pid
echo ls >> $network_dir/${jobname}_ftpcmds.$pid
echo "lcd $tmp_local_recv_path" >> $network_dir/${jobname}_ftpcmds.$pid
echo "prompt" >> $network_dir/${jobname}_ftpcmds.$pid
echo "mget *" >> $network_dir/${jobname}_ftpcmds.$pid
fi
echo "lcd $network_dir" >> $network_dir/${jobname}_ftpcmds.$pid
echo bye >> $network_dir/${jobname}_ftpcmds.$pid
#The ftp job is executed and the log file is checked for errors.
ftp -inv >> $tmpjoblog < $network_dir/${jobname}_ftpcmds.$pid
rm $mondir/ftp_in_out.$monitor_dttm > /dev/null 2>&1
check_error=`grep -c "Unknown host" $tmpjoblog`
if [ $check_error -gt 0 ]
then
echo "Invalid hostname used" >> $email_message
fail_flag="Y"
fi
check_error=`grep -c "Not connected." $tmpjoblog`
if [ $check_error -gt 0 ]
then
echo "Cannot Connect to Host" >> $email_message
fail_flag="Y"
fi
check_error=`grep "^530" $tmpjoblog|grep -cv "bytes"`
if [ $check_error -gt 0 ]
then
echo "Invalid login" >> $email_message
fail_flag="Y"
fi
check_error=`grep "^550" $tmpjoblog|grep -cv "bytes"`
if [ $check_error -gt 0 ]
then
echo "No Such file or Directory" >> $email_message
fail_flag="Y"
fi
check_error=`grep "^553" $tmpjoblog|grep -cv "bytes"`
if [ $check_error -gt 0 ]
then
echo "Permission Denied" >> $email_message
fail_flag="Y"
fi
check_error=`grep "^425" $tmpjoblog|grep -cv "bytes"`
if [ $check_error -gt 0 ]
then
echo "Cannot Open Data Connection" >> $email_message
fail_flag="Y"
fi
check_error=`grep "^500" $tmpjoblog|grep -cv "bytes"`
if [ $check_error -gt 0 ]
then
echo "Connection Failed" >> $email_message
fail_flag="Y"
fi
check_error=`grep -c "Connection timed out" $tmpjoblog`
if [ $check_error -gt 0 ]
then
echo "Connection timed out, host may be down" >> $email_message
fail_flag="Y"
fi
#These next lines are used to determine whether files were picked up. If they were
then we know they need to be deleted.
file_count=`grep ^total $tmpjoblog |cut -f2 -d" "`
if [ "${file_count}A" = "A" ]
then
filestart=`date +%m-..-%y`
grepfile=`echo ${delvfile}|cut -f1 -d"."`
file_count=`grep ^${filestart} $tmpjoblog|grep -v $grepfile|wc -l`
if [ "${file_count}A" = "A" ]
then
file_count=0
fi
fi
if [ -d $tmp_local_recv_path ]
then
# When files are picked up they go into a separate directory and a list of the files is
created. Each file on the list is then followed by the del command—you can see it
below. The log is then checked again to make sure no errors were detected.
if [ $file_count -gt 0 ]
then
monitor_dttm=`date +%y%j.%H%M%S.pr`
echo "open $hostname" > $network_dir/${jobname}_ftpcmds.$pid.del
echo "user $userid $passwd" >> $network_dir/${jobname}_ftpcmds.$pid.del
echo "! echo \$PPID > $mondir/ftp_in_out.${monitor_dttm}" \
>> $network_dir/${jobname}_ftpcmds.$pid.del
echo "cd $remote_recv_path" >> $network_dir/${jobname}_ftpcmds.$pid.del
filelist=`ls ${tmp_local_recv_path}`
for fl in `echo $filelist`
do
echo "del $fl" >> $network_dir/${jobname}_ftpcmds.$pid.del
done
echo "bye" >> $network_dir/${jobname}_ftpcmds.$pid.del
cat ${tmp_local_recv_path}/* >> ${local_recv_path}/${rcvcd}${pid} 2>
/dev/null
rm $tmp_local_recv_path/* 2> /dev/null
rmdir $tmp_local_recv_path
ftp -inv >> ${tmpjoblog}.del < $network_dir/${jobname}_ftpcmds.$pid.del
rm $mondir/ftp_in_out.$monitor_dttm > /dev/null 2>&1
ftp_stat=0
ftp_stat=`grep -c "Unknown host" ${tmpjoblog}.del`
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep -c "Not connected." ${tmpjoblog}.del`
fi
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep -c "Connection timed out" ${tmpjoblog}.del`
fi
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep -c "^530" ${tmpjoblog}.del`
fi
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep "^550" ${tmpjoblog}.del|grep -cv "bytes sent"`
fi
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep "^500" ${tmpjoblog}.del|grep -cv "bytes sent"`
fi
if [ ${ftp_stat} -eq 0 ]
then
ftp_stat=`grep -c "^553" ${tmpjoblog}.del`
fi
if [ ${ftp_stat} -ne 0 ]
then
echo "FTP failed deleting received files on `uname -n` from $hostname" \
>> ${email_message}.del
echo "The files must be manually deleted from $hostname" \
>> ${email_message}.del
echo "\nThe file\(s\) to delete are:" >> ${email_message}.del
echo $filelist >> ${email_message}.del
subject="Unable to delete ftp files"
$email_script "$member" "$subject" "${email_message}.del"
rm -f ${email_message}.del
fi
else
rmdir $tmp_local_recv_path
fi
fi
if [ ${file_count} -gt 0 -a ! -s ${local_recv_path}/${rcvcd}${pid} ]
then
echo "Files in mailbox to receive but the file(s) did not transfer" \
>> $email_message
fail_flag="Y"
rm -f $local_recv_path/${pid} 2> /dev/null
fi
if [ $fail_flag = "Y" ]
then
echo "\nThe log follows:" >> $email_message
cat $tmpjoblog >> $email_message
subject="outside FTP failed"
$email_script "$member" "$subject" "$email_message"
fi
# Received files are concatenated together. A log is created so another process does
not pick it up before the concatenation completes. Another script is also called to
further process the file after it is concatenated.
if [ -f $local_recv_path/${rcvcd}${pid} ]
then
echo "if [ -f $local_recv_path/${rcvcd}${pid} ]" found >> $tmpjoblog
ll $local_recv_path/${rcvcd}${pid} >> $tmpjoblog
echo $move_file_script $local_recv_path/${rcvcd}${pid} >> $tmpjoblog
$move_file_script $local_recv_path/${rcvcd}${pid}
else
echo "if [ -f $local_recv_path/${rcvcd}${pid} ]" not found >> $tmpjoblog
fi
while [ -f $network_dir/cat.lck ]
do
sleep 1
done
touch $network_dir/cat.lck
cat $tmpjoblog >> $network_dir/ftp.log
echo >> $network_dir/ftp.log
if [ -f ${tmpjoblog}.del ]
then
cat ${tmpjoblog}.del >> $network_dir/ftp.log
echo >> $network_dir/ftp.log
fi
echo "
FTP COMMANDS" >> $network_dir/ftp.log
echo >> $network_dir/ftp.log
cat $network_dir/${jobname}_ftpcmds.$pid |grep -v user >> $network_dir/ftp.log
if [ -f $network_dir/${jobname}_ftpcmds.$pid.del ]
then
echo >> $network_dir/ftp.log
cat $network_dir/${jobname}_ftpcmds.${pid}.del |grep -v user \
>> $network_dir/ftp.log
fi
rm -f $network_dir/cat.lck $email_message $tmpjoblog
$network_dir/${jobname}_ftpcmds.$pid ${tmpjoblog}.del
$network_dir/${jobname}_ftpcmds.$pid.del
if [ $fail_flag = "Y" ]
then
return 1
else
return 0
fi
Processing Purchase Orders to Send out EDI Transactions to Suppliers
If you would like to set up EDI with a particular vendor, first edit the vendor’s profile.
EDIT the vendor:
Go to config tab.
If the EDI Processing mark is checked, during the EDIT and creation of PO’s you can send and receive documents.
PO transactions processing:
EDIT PO
The screen below shows a Purchase Order where the vendor is set as an EDI vendor. Click on EDI Transactions to view the incoming and outgoing EDI transactions.
On top of the Purchase Order, see that is says EDI VENDOR because the system flag and the Vendor flags were set.
Also the Create EDI and EDI Transactions are highlighted.
Click on EDI Transactions to show the transactions inbound and outbound.
Processing Sales Orders to Send and Receive EDI Transactions from Customers If you would like to set up EDI with a particular customer, edit the customer’s profile to allow EDI processing.
When editing a Sales Order, click on EDI Transactions to show the complete history of the transaction type in EDI.
Here is where you can check off and resend any documents. You can also set up auto creation of some transactions during the processing.
Here is a complete history of the transaction within the system.
[Last Review Date November 2017]