Agile will pull from Worldship, manifest replaces worldship. if you just want the tracking number to pull in you would have to custom build something to do this and integrate with worldship yourself.
Are you providing any Epicor data to Worldship? PackSlip would be the best. If so, I believe there is API to get this data by looking up the PackSlip in Worldship.
Hi Jason, sorry for the late reply, but what do you mean “PackSlip” would be the best. Are you saying the packing slip info in Epicor or some piece of software called “PackSlip”?
I currently have Epicor and Worldship completely separate. I would like to do a little integration to make life easier but I don’t need a bunch of bells and whistles, just pull the order info into Worldship to prevent typing errors and then the Tracking Number back into Epicor to give to the Customer and print on the Order.
I have the UPS Worldship program export a csv file when the shipper runs an End Of Day process. Then, I have a Power Shell script that reads that UPS csv and reformats it into a new csv with columns and headings that match what DMT requires. Finally, the Power Shell script runs DMT in the Start-Process statement. The rest of the script is housekeeping of files and sends an email if something goes wrong.
I have Windows Task Scheduler run the Power Shell script 5 days a week at 5:00 pm after the UPS shipments are done, so the whole process is automatic.
Here’s the Power Shell script:
# This powershell script processes the text file output from UPS Worldship every end of day,
# formats it for Epicor DMT,
# then runs DMT.
# Then the files are renamed and saved as archives
# this file resides and is normally run from EpicorData\Reports\UPS, and a archive version is also saved at \\SERVERNAME\UD\UPS
# Rev 1 2017-11-25
# Rev 2 2018-09-08 Updated names for 10.2.200
Set-Location -Path D:\EpicorData\Reports\UPS
# Exit this PowerShell script if a UPS_Export.CSV does not exist
if (-not (Test-Path UPS_EXPORT.CSV)) {Exit}
# import CSV with headers that match DMT header names
# the where-object eliminates any TrackingNumber that had no PackNum associated with it.
$Header = "PackNum", "TrackingNumber","PkgLength","PkgWidth","PkgHeight","Weight"
$Table = Import-Csv -Path UPS_EXPORT.CSV -Header $Header | Where-Object {$_.PackNum -ne ""}
# Add a column for Company and set all to "PP"
$Table | Add-Member -MemberType NoteProperty -Name "Company" -Value "PP"
# output table as csv ready for DMT
$Table | Export-Csv -Path TrackingNumDMT.CSV -NoTypeInformation
# Run DMT to import data
$DMTPath = "C:\Epicor\ERP10\LocalClients\E102200Live\DMT.exe"
$ConnectURL = "net.tcp://SERVERNAME/E102200Live"
$User = "manager"
$Pass = "xxx"
$Import = "`"Ship Head`""
$Source = "TrackingNumDMT.CSV"
$CompleteLog = $Source + ".CompleteLog.txt"
$ErrorLog = $Source + ".Errors.txt"
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-User $User -Pass $Pass -Update -Import $Import -Source $Source -NoUI"
if (Test-Path $ErrorLog) {
Send-MailMessage -From DMT@xxxxx.com -Subject "DMT Error" -To xxxxx@xxxxx.com -Body "DMT Error during ProcessUPS. Check EpicorData\Reports\UPS" -SmtpServer 10.0.0.5
}
else
# No Error, so rename files to be ready for the next day
{
$DateString = (Get-Date -format yyyy-MM-dd)
Rename-Item UPS_EXPORT.CSV ("UPS_EXPORT-" + $DateString + ".CSV")
Rename-Item $Source ("TrackingNumDMT-" + $DateString + ".CSV")
Rename-Item $CompleteLog ("TrackingNumDMT-" + $DateString + "-CompleteLog.txt")
}