eAdaptorDevelopersGuide - 11 March 2024
eAdaptorDevelopersGuide - 11 March 2024
Terms of Use
WTG grants you access to this eAdaptor Developer's Guide for the following purpose(s):
Any person within your organization who accesses this eAdaptor Developer's Guide (irrespective
of how it is accessed) may only do so only for the Permitted Purpose. All intellectual property
rights in this eAdaptor Developer's Guide are owned by WTG and are the sole and absolute
property of WTG, throughout the world.
Neither you, nor any person within your organization who accesses this eAdaptor Developer's
Guide is permitted to copy or distribute, forward, or publicly display the contents of this Adaptor
Developer's Guide (or any part of it) to any third party without first obtaining the written consent
of WTG.
There are two key questions you need to be able to answer before using this guide.
First, are you going to build your own integrations with your customers and partners that are
specific to your needs, using eAdaptor SOAP or HTTP+XML to map to our XML interfaces
yourself? Or are you going to be using WiseTech Global’s next generation middleware platform
xHub and have us do the mapping for you?
xHub has replaced eHub and provides the stability, scalability, and redundancy that our
customers demand to meet the needs of their expanding businesses, ensuring CargoWise
remains at the forefront of supply-chain technology. xHub messaging interfaces are available in
all industry supported message formats and transport protocols. You will specify your interfacing
requirements; we’ll manage the project from analysis to delivery and provide on-going support.
If you will use xHub, this guide will help you understand what happens within CargoWise once the
XML comes in or before it leaves, but the sections on transport (eAdaptor SOAP or HTTP+XML)
and how to formulate our XML will be of less interest to you. The workflow configuration sections
will also be of interest to you.
Where you are transferring data from one CargoWise system to another, it is easy to use xHub as
every CargoWise system is connected to xHub out of the box. Refer to our E2E Messaging guides
available from our My Account web portal for more information on this.
If you want to use eAdaptor SOAP or eAdaptor HTTP+XML and map to our XML dataset yourself,
you will need to make yourself thoroughly familiar with this guide. You will also need middleware
that will connect using the eAdaptor interface and arrange transformation and transfer of data
when dealing with non-CargoWise systems. eAdaptor provides a single interface suitable for in-
house; middleware is then used to build and maintain interfaces from eAdaptor to internal and
external systems and parties.
Before you choose to use eAdaptor, you will need staff with an appropriate level of
experience mapping between different forms of XML along with web service development
experience before attempting this. This means you need a Senior Web Developer with strong
experience using SOAP Web Services, WSDL, XML, XSD, and RESTful Web Services if you want
to proceed using eAdaptor SOAP or eAdaptor HTTP+XML.
You will also need staff well versed in the module you wish to interface with and configuring
Workflow Templates in those modules. They will be responsible for specifying the setup
within CargoWise and, of course, testing during implementation.
If your staff does not have these capabilities. However, if you would still like to manage the
mappings and workflow yourself, you can engage one of our WiseService Partners with
experience with the modules you are targeting, along with Setup & Maintenance of Workflow
and Developing Bespoke Service-based Interfaces.
If you are unsure about any of the above, we recommend that you talk to your WiseTech
Global representative about having us do your mappings for you using xHub.
For more information on Universal XMLs refer to Universal XML Guide. For more information
on Native XMLs refer to the Native XML Guide
These can be sent out from modules with a Workflow tab automatically when an event is
recorded within CargoWise. They can also be sent into those same modules when you want to
record an event from an external source. There is one Universal Event XML schema that covers all
modules, which is why it’s called Universal.
A good example where Universal Events are used is for Airline Messaging, where Airlines send
status updates (FSU messages) for Air Waybills as they occur. We map these status updates into
Universal Events and forward them to CargoWise systems, where they then appear against the
matching Forwarding Consol. Events can be configured to trigger automatic processes via
Workflow automation; for more information, see our Workflow Automation user guides.
This is done by having all elements for all supported transaction types present in the one
schema. Where values are common across multiple transaction types like Posted Date, Local
Total, and Currency, the same elements are used. Each transaction type uses elements relevant
to that transaction type and ignores those not relevant. As an example, you might have a Check
Number on a Payment but not on an AR Invoice.
For unposted job related costs and revenue, you should use the JobCosting element in the
Universal Shipment XML mentioned below.
The Universal Shipment XML schema contains all possible elements from all modules
implementing this interface. With our global logistics worldview, we found many data elements
across all business areas (weight, volume, packages, origin, destination, etc.). Wherever possible,
we use the same common elements from the Universal Shipment schema to store the same
common data.
That’s why we call it Universal XML. You can map to Universal once and then use it across
multiple modules.
You can send Universal Shipment XML into any operational module involving movement of goods.
You can send it out of the same modules automatically using Workflow Automation, or you can
query for Universal Shipment XML using the Universal Shipment Query interface.
Just like the other Universal XML schemas, one schema is used across all PAVE modules, making
it possible to transfer data across modules and systems seamlessly.
Once you have mapped to a Universal XML schema, you can target any module supporting that
schema without having to remap for the next business process you want to implement.
All of our Reference Files are accessible using Native XML datasets for both data import and
export. Reference Files include entities like Products, Organizations, Locations, and
Currencies/Exchange Rates.
Native XML can be pushed in or queried via the XNDT Web Service Interface; it can be sent in as
a message via eAdaptor or xHub and sent out via eAdaptor or xHub where Workflow Automation
has been implemented on the Reference File Module concerned.
Complete information on Native XML is found in the Native XML sections of the guide following.
Legacy XML was generally published and imported using a legacy product called
InterfaceConnector, which is unavailable in CargoWise InterfaceConnector and has not been
available as a new license under ediEnterprise for several years now. It is not advisable to develop
any new interfaces using Legacy XML.
This Reference Guide covers the broader functionality of our core XML services; although it’s a
good reference, it is not the only resource available. Each module that is mapped to a Universal or
Native XML dataset will have a Module Mapping Guide that covers that module’s specific
implementation details.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s location
in the GUI. They can be found in WiseTech Academy under Integration Options – Mapping Guides
At the time of writing this section, Module Mapping Guides exist for many modules across
CargoWise, and there are many that are still in progress. If you cannot find one for a module
you are working with, please raise an incident to register your interest.
You should also read the eAdaptor System Administrator’s Guide, which covers the installation
and initial setup required to get the eAdaptor interface working. Web Services are an optional
component of CargoWise and have some additional deployment requirements covered in that
guide.
So, where does this Reference Guide fit in? Once you have a general understanding of how things
work end to end and have a high-level picture in mind of what you want to do, this reference
guide is best used to obtain specifics on individual pieces of functionality as the need for in-
depth detail arises.
It’s recommended to review this guide to appreciate the range of functionality available. There’s a
lot in there, and although you probably don’t want to dig into every detail at first, it’s helpful to
have at least an overview of what’s available and, therefore, possible. Later on, when you
encounter a problem or are unsure how to proceed, you’ll know which sections you want to
check in this guide.
The interface self publishes a WSDL describing the requirements of the interface, and we provide
documentation describing the functionality of the interface as part of this guide. You can also
download a Sample Client from the Technical Guides section of our My Account web portal.
At the SOAP level, we use the same Web Service interface in both directions. This means that you
can also use the eAdaptor SOAP Sample Client to test your interface implementation before
connecting it up to CargoWise.
This interface provides a lighter alternative to the SOAP-based interface, where an ordered
queue is not required. It also allows for Queries to be made requesting current data from active
jobs within CargoWise. You can also download a Sample Client from the Technical Guides section
of our My Account web portal.
The functionality available via the XNDT Service will be made available from the eAdaptor
HTTP+XML interface at some point in the future.
These are all tools that an experienced Senior Web Services Developer will be able to use to build
connections using our interface. The sample Clients and Services are not a basis for your own
development; they are working samples that can be used to test and demonstrate the operation
of both our Interfaces; and, in some cases, your own implementation.
You will need to have your own Developer using your own choice of middleware to interface with
CargoWise successfully. Your Developer will need to be familiar with tools like Fiddler (web
service transport layer debugging tool) and SOAP UI (tool for working with WSDL to produce
SOAP), although they may have their own tools of choice.
This guide does not tell you how to develop your own interface. It provides the information
required for a Senior Web Services Developer to develop one for you. If you do not have an
experienced Web Services developer on staff, please get in touch with one of our WiseTechnical
Partners to arrange a suitable resource.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found in WiseTech Academy under Integration Options -
eAdaptor Guides.
Information on setting up eAdaptor can be found in the eAdaptor System Administrator’s Guide.
Once you have completed the instructions in that guide, you will have two URLs, one for eAdaptor
SOAP/HTTP+XML components and one for the XNDT Web Service component.
We provide a sample web client and web service, which can be used to test and/or demonstrate
the setup of the eAdaptor SOAP interface in your own CargoWise system once the Web
Components have been deployed.
If you don’t already have this, it’s available for download from WiseTech Academy in
Integration Options – eAdaptor Guides
Queued messages in both directions show in the EDI Interchange and EDI Message Modules
within CargoWise.
The UMI and NMI service tasks pick up incoming XML from the inbound message queue and
process them in received order.
Workflow Automation is used to queue outgoing XML for the eAdaptor Outbound Service Task to
pick up and push to the eAdaptor SOAP interface you implement in your middleware.
Please refer to the diagram following, which gives an overview of this functionality. The sample
webclient/web service can be used in place of your own middleware as you develop a
connection in your middleware.
The CargoWise xHub Interface functions in parallel with the eAdaptor SOAP Interface via the
same message queue (EDI Message Module). Messages are then processed inbound and
outbound using the same service tasks and automations. This means you have access to all
the same facilities we use when implementing automations within CargoWise.
1. Test the CargoWise setup using the sample web client and/or service (depending on which
directions of message flow you require). This will familiarize you with basic operations and
allow you to use Fiddler to obtain samples of the interface functioning in your own
environment.
2. Implement the eAdaptor SOAP Interface in your middleware using the WSDL from your
CargoWise setup and samples you generated from step one. Test your implementation using
the sample web client and/or web service.
3. Configure your CargoWise setup and your middleware to point at each other and test using
real data. It’s this step that requires a little more knowledge of CargoWise, although everything
you need to know is found later in this guide.
4. Move onto the Data Flow section later in this chapter.
As mentioned previously, you will need an experienced Senior Web Service Developer to
implement this interface in your choice of middleware. This guide does not tell you how to build a
web service interface; it provides information about the eAdaptor SOAP Interface and gives some
general pointers for web service developers who are not yet familiar with CargoWise.
First, you will need to build the eAdaptorSamples solution. Navigate to the folder you have
extracted the eAdaptorSampleInterfaces zip file to open the SOAP.C# folder and open the
contained eAdaptorSamples solution in Visual Studio.
All samples applications provided in eAdaptor Sample Interface Pack are for demonstration
purpose only. Sample Applications or libraries should not be used in Production environment.
Once you have opened the solution, select Debug > Start Debugging from the menu or press the
F5 key.
Figure 2 Debugging.
Paste the URL of your eAdaptor Inbound Web Service into the Service Address field. Ensure you
add https before entering the service address to ensure the web service is correctly processed.
The next field that you will need to enter is the Recipient ID. The Recipient ID field must contain
the nine-character CargoWise license code of the system you are sending data into. This will be
used to control which Company the incoming data is processed under.
To find your CargoWise license code, open your instance of CargoWise, log into the Company
you want to obtain a license code for, navigate to the Jump Menu, select the Help action menu
button at the bottom, and then About. The window below will open, and the nine-digit CargoWise
license code will be listed towards the top just under your company name.
Copy the nine-character CargoWise license code (excluding dashes) and enter it into the
Recipient Id field on your eAdaptor client interface. For example, the license code for the system
shown above is HYEDAUA04. Ensure you use the correct casing when entering the Recipient Id.
Finally, you will need to enter a Sender Id and Password. Both of these are set in the registry of
CargoWise, to locate them go to Maintain > System > Registry > eServices > eAdaptor >
Inbound > Basic Authentication.
You can copy the user name from this registry setting. In order to enhance password security,
the password field is read-only. Users won’t be able to type a password, but instead, a complex
password will be generated.
The password should be copied before saving the form. The generated password will be masked
once the Save button is pressed:
Take the user name and password entered on the eAdaptor Inbound Basic Authentications page
and enter them into their corresponding fields on the eAdaptor interface. Your eAdaptor Sample
Client Form should look something like this if you've followed all the instructions.
You are now ready to send Universal XML to your instance of CargoWise. You can click on the
Ping button, which will check to see if your URL is valid and responding, or you can send a test
message.
To send a test message you will need to have a valid xml file. For this guide we have elected to
use a RefUNLOCO XML file, which is shown below. This sample is included in the SampleXML
folder in NativeUNLOCO_AUANN.xml
When this XML is imported into CargoWise, the UNLOCO for Annandale in Sydney, Australia
(AUANN) will be updated to have the Is Rail flag turned on.
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<Header>
<SenderID>MYSENDER</SenderID>
<RecipientID>MYRECIPIENT</RecipientID>
</Header>
<Body>
<Native xmlns="http://www.cargowise.com/Schemas/Native/2011/11">
<Header>
<OwnerCode>MYSENDER</OwnerCode>
<EnableCodeMapping>false</EnableCodeMapping>
</Header>
<Body>
<UNLOCO version="2.0">
<RefUNLOCO Action="UPDATE">
<Code>AUANN</Code>
<PortName>Annandale</PortName>
<HasRail>true</HasRail>
</RefUNLOCO>
</UNLOCO>
</Body>
</Native>
</Body>
</UniversalInterchange>
To select the file you want to send, click on Browse, and the file explorer window will open.
Navigate to and select the example XML file described as shown.
If you see a ‘Send message successful.’ message, that means the XML you sent was accepted by
CargoWise and is stored in the DB as an EDI Interchange, ready for the service tasks to process.
You will be able to see the XML you submitted in the EDI Interchanges modules as described in
Section 2.4.6.1 Inbound XML in CargoWise.
If the details you entered are incorrect, or the XML you submitted is malformed, you will get an
error message indicating what it was that caused the problem. Fix the details indicated by the
error message and click on the Send button again until you see a Send message successful
message and are ready for the next step.
eAdaptor interface also can be tested using tools like SoapUI, Postman etc.
For more information on processing of inbound messages, refer to our learning units:
1COR193 - How do I check data imports through EDI Messages?
1COR417 – Understanding Service Tasks?
Once this is built and configured, you can then send data to the URL you have configured for the
eAdaptor Sample Web Service from your CargoWise system. You can also use this to test an
eAdaptor Web Client you have developed in your own middleware before you try and send XML
into your CargoWise system.
This web service is provided as a sample for demonstration and test purposes only. You will
need to have a copy of Microsoft Visual Studio installed along with an IIS instance running to
use this sample.
You will need to create a Web Site on your IIS instance to host the eAdaptor Sample Web Service.
One the computer hosting your IIS instance, right-click on your Computer/This PC icon and
select the Manage option. This will open the Computer Management window and navigate to
Computer Management > Services and Applications > Internet Information Services (IIS)
Manager.
Expand your web server in the Connections pane, right-click on Sites, and select Add website.
A file explorer window will open. Navigate to the root folder of your web server. (The default path
for IIS is C:\inetpub\wwwroot)
Create a new folder using the Make New Folder button called eAdaptorOutbound. Select the
new eAdaptorOutbound folder and click the OK button. This will return you to the Add Website
window as shown below.
Click on the OK button to finish creating your website. You may get a dialog telling you there is a
conflict with another site.
You can either assign another port number or continue on anyway. If you choose to continue, it
will stop the other website from running. Keep in mind that if you choose a non-standard port
(suggest something in the 80xx series), you will have to make sure you use the port number you
choose as part of your URL. You should also be aware that https and http use different ports, so
you will need to check any port specified in the URL when switching between those.
In order to use eAdaptor securely, you must create and/or configure an SSL Certificate for the
site you just created.
You can create a self-signed certificate if you don’t already have a certificate for your IIS
server/site. Instructions on how to do this can be found under Obtain a Certificate, Create Self
Signed Certificate here: http://learn.iis.net/page.aspx/144/how-to-set-up-ssl-on-iis-7/
You now have an SSL Certificate and a new Web Site, so you need to create a new binding on
your website to enable SSL (https) using your certificate, and assuming that you still have IIS
Manager open, right-click on your new eAdaptorOutbound web service and select Edit Bindings.
Click on the Add button, then select a Type of https. You will then see a drop-down menu where
you can select the SSL certificate you created in the previous steps.
Assuming you have resolved any port conflicts that came up, you now have a website ready and
prepared for you to deploy your eAdaptor Outbound Web Service. The next step is to build the
Sample Service and deploy it to the folder your website operates from.
This section assumes that you have already downloaded and unzipped the eAdaptor Sample
Interfaces and have a current version of Visual Studio installed.
First, you will need to build the eAdaptorSamples solution. Navigate to the folder you have
extracted the eAdaptorSampleInterfaces zip file to open the SOAP.C# folder and open the
contained eAdaptorSamples solution in Visual Studio.
While you are there, you can remove the #warning line that’s there to remind you to complete
this step.
In the same project, navigate to and open the Web. config file. Find the behavior section for the
eAdaptorStreamedServiceBehavior and change the find Value property to the name of your
machine-running instance of Internet Information Service. This tells your web service where to
find the certificate you generated earlier in the process.
Select build from the top drop-down menu, select the build solution option, or press the F6 key.
If the solution builds with no errors or warnings, you are now ready to publish the service you just
built.
After completing the build of the eAdaptor Sample Web Service project, you will need to deploy
it. Right-click on the eAdaptorOutboundWebService project and select publish from the list of
options.
Figure 16 Publish WCF Service Delete All Existing Files Prior to Publish
As long as no errors come up during the publish, you now have your eAdaptor Outbound Web
Service set up and ready to use. You can confirm this has been successful by looking in the
target location to see if the svc file and bin folder have been deployed.
The next step is to test the https URL for the web service, then configure CargoWise to send
interchanges to your deployed Sample Web Service.
Re-open your computer management window, find IIS Manager in the tree, navigate to the
eAdaptorOutbound application, switch to content view (see bottom of the form), and right-click
on eAdaptorOutboundWebService.svc and select browse.
Your choice of web browser should start, and if all is working properly, you will see the following
landing page.
http://sydco-wbjg-1.wtg.zone/eAdaptorSampleWebService.svc
Before you can put your URL into the registry, you need to convert it to an https URL. Generally,
it’s as simple as changing the http at the beginning of the URL to be https. If you chose to use
non-standard ports when creating your new site in IIS Manager and creating an https binding, you
will need to either update or remove the port numbers in the URL as well.
Take the https URL you have just calculated and enter it in your browser’s address box. If your
https binding is set up correctly and your certificate correctly keyed to your IIS host, you should
see the same landing page with no certificate errors.
Once this is working as above, take note of the https URL in your browser’s address bar. This is
your Sample Web Service URL. You will need to enter this into your CargoWise registry, so the
system knows how to find your web service. In this example, the URL is:
https://sydco-wbjg-1.wtg.zone/eAdaptorSampleWebService.svc
Once you have your Sample Web Service URL, open your instance of CargoWise and go to
Maintain > System > Registry > eServices > eAdaptor. Go to Outbound, then “Service URL”
within the registry tree. Tick the Override Default box and paste the https URL from the previous
step. Click on the Save button to save your changes.
To set up a web service password, select the Company you want to enter a password for, tick the
Override Default box, enter the password, and click on the Save button to save your changes.
When the EAM (eAdaptor Outbound Messaging) service task sends EDI Interchanges out to your
Web Service implementation, it sends from each company individually. In the security section of
the SOAP message, the username will be the Enterprise License Code for the Company the EDI
Interchange was generated under, and the password will be from that company’s registry setting.
In the Sample Web Service, the username and password from the incoming SOAP are passed
through to the eAdaptorUserNamePasswordValidator class, which you can modify to reject
unauthorized connections. This may be useful in testing security rejections from your own Web
Service Client implementation in your middleware.
To send XML out from CargoWise via the eAdaptor SOAP interface, you need to configure an EDI
Communications Mode on an Organization that you are sending the XML to. The easiest
Organization to use for this is the Company Org Proxy in a test system. Go to Maintain > User
Admin > Companies, then find the company where the name matches the company you are
logged in under. You can see you’re logged in company in the title of the form, as shown below.
Open the company and find the Organization Proxy field. Select the area, then press the F3 key.
This will bring up the Organization that is your current company’s Org Proxy.
Open the Details > Config > EDI Communications tab in the Org Proxy Organization.
There are four Communications Modes set up in the sample above. They are used to say how and
where different types of XML messages will go when sent from a given module to this
Organization.
The Module is where the XML is coming from; the Direction indicates this is for sent XML (TRX –
Transmit), the File Format shows XUE and XUS, which are Universal Shipment and Event XML, and
the Transport Layer is EDP – eAdaptor. The Recipient ID is included in the header of the Universal
Interchange when XML is sent out via eAdaptor. Generally, the Recipient ID is used within your
middleware to identify the intended recipient of the XML you are sending.
When testing, it’s advised that you set up a row for both Universal XML File Formats (XUE and
XUS) for the module you are testing. If you are not sure exactly what your business process is
going to be and are just getting the transport layer working, add the four EDI Communications
modes shown above, allowing you to send test messages from the Forwarding Shipment and
Consol modules while you establish your business process.
Once you are done, click on the Save and Close button, then go to the Forwarding Shipment
module under Operate > Forwarding > Forwarding > Shipment. Either open a new shipment or
create one with minimal information required to save.
You can work out the mandatory fields by clicking on the New button, then click straight on the
Save button when the form comes up. A dialog will pop up telling you what is mandatory, and
those fields will be highlighted as red when you close the error dialog. Fill the red fields in and
Once you have a Forwarding Shipment open and saved in the database, select Actions > Send
Universal XML > Universal Event from the menu.
Fill in the dialog shown above to send an Authorized event to the Organization Proxy you
previously configured for eAdaptor, then click on the Send & Close button.
If the dialog following shows Universal Event queued for sending to Organisation [xxxx], you have
queued an event for sending.
You can see the queued outbound interchange if you go to the Maintain > System > EDI
Interchanges module.
You can see the interchange we just created with a status of AQU (Queued eAdaptor). Once this
has been sent out by the EAM (eAdaptor Outbound) Service Task, the status will change to SNT
(Sent).
To make testing the transport layer easier, you can resubmit interchanges by right-clicking on
them and selecting Actions > Reset Status to Queued. This also works when multiple rows are
selected in the grid for a bulk resend.
If you double click on an interchange, you can see the XML that will be sent. You can also click the
Save to Disk button to save the content to a file.
Within the Logs tab, you can see a history of send attempts, and if there is a failure, there will also
be a log recorded. There may also be a note recorded in the Notes tab with additional
information depending on the cause of the failure.
If the interchange stays with a status of AQU, this can indicate either your service task has not
run yet or may be turned off, in which case you will need to start your service tasks for your
message to be sent.
If the interchange is not sending or is set to an Error status, check the service task log for the
EAM (eAdaptor Outbound) service task to see what is happening in the Maintain > System >
Service Tasks module.
If you open up the EAM service task itself and navigate to the Log Files tab, you will see any errors
that occur when sending to your web service here. You will also see a log of all interchanges sent
to allow you to monitor the flow of interchanges from your CargoWise system.
Once the EDI Interchange status changes to SNT (Sent), if you open the folder on your Web
Server that you configured to receive outbound interchanges, you will see a file containing the
Universal Event you have sent.
Congratulations! You have successfully set up the eAdaptor Sample Web Service.
Now that your eAdaptor Sample Web Service is built and configured, you should see a new file
created in the destination folder every time you send Universal or Native XML out via eAdaptor.
Because the same interface is used in both directions, you can use the sample web client and
web service to test the eAdaptor SOAP Interface implementation as you build it into your own
middleware. This can be very useful when testing your own end of the interface as it reduces the
reliance on CargoWise during initial interface development.
CargoWise has some additional validation for inbound messages, like making sure the Application
Code is recognized and that the recipient company targeted exists. These issues are usually easy
to deal with once you know the transport layer is working.
The sample web client can also connect to the sample web service; everything uses the same
interface/transport layer.
The eAdaptor SOAP interface self publishes a WSDL describing the requirements of the interface.
If you take the eAdaptor URL provided from the Web Components setup and enter it in a web
browser, you will see a landing page for the eAdaptor SOAP interface, as shown below.
Two blue underlined links will bring up the WSDL describing the form of XML used when
connecting via this interface. The WSDL describes the following three web service methods.
• Ping – Accepts a simple SOAP Ping message returning success if the service is alive
• ProcessStream – Not used. This was part of a poll based interface and has been
superseded
• SendStream – Accepts a SendStreamRequest with multiple eHubGatewayMessages. This is
the method you use to push XML messages into CargoWise. Each eHubGatewayMessage
becomes one Interchange in the EDI Interchanges module within CargoWise. The content
of each EDI Interchanges is split out into EDI Messages, which are then processed as
described in the diagram above
You are always best to use a web service debugging tool like Fiddler from Telerik to capture
SOAP samples from your own working interface. (http://www.telerik.com/fiddler) The following
samples are provided purely, so you know what you are looking for when using your choice of
web service debugging tool.
SendStream Post
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd">
<s:Header>
<h:SendStreamRequestTrackingID xmlns:h="http://CargoWise.com/eHub/2010/06">483560eb-dc8a-4661-a42d-
3593a9b37785</h:SendStreamRequestTrackingID>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2016-06-10T04:23:53.138Z</u:Created>
<u:Expires>2016-06-10T04:28:53.138Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-0c344944-2c97-46d6-9d0f-b7ee94816994-19">
<o:Username>abc</o:Username>
<o:Password o:Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-
1.0#PasswordText">123</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<SendStreamRequest xmlns="http://CargoWise.com/eHub/2010/06">
<Payload>
<Message
ApplicationCode="UDM"
ClientID="WTGCWISYD"
TrackingID="5c2643ed-6ae7-4cbe-bf35-8db3c875aea2"
SchemaName="http://www.cargowise.com/Schemas/Universal/2011/11#UniversalInterchange"
SchemaType="Xml"
EmailSubject=""
FileName="">
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33
/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPzVsrjM6yYrTy/zZZu+W5TL5rOP5m27enT37tXV1Xia1RfVVdHk42m1uPt6Os8XWXPXvnZ3b2
d39+7u7kcp/i6q5Wcf7Y53Pzr6jZM0fcww+Vf642nWZifVss3fmY/0wzfUQ96eVGWZT1uCYL8Nvvc+pc/fXK/yo2dVfZXVs2J58XperBbU1+O7/EX
Q9PfKr49e79CzS/9/fBd/eh3cjfTgfxigZRuc0jDqVU1UOXt69N03nz++G3xi273OayILffL693n6+K79y35/Ui1W2TJA6KSa5Ucn3z17fJd/cziF
bQVHR0/9lCn+pljkRzQvn27v0P8evtnde3Rv79Hu3nh/jxC1LYJXQLbjN9823xsq6t/0+2M35+aj/wf7vUSQQAIAAA==
</Message>
</Payload>
</SendStreamRequest>
<s:Body/>
</s:Envelope>
Data Flows
As data comes into CargoWise, each eHubGatewayMessage becomes an EDI Interchange which
is visible in the EDI Interchanges module under Maintain > System > EDI Interchange.
There are many types of interchanges shown here; it’s easy to narrow this down to interchanges
you are creating using the filters at the top of the module. The Application Code is the same as
you specified in the eHubGatewayMessage, UDM for Universal XML, and NDM for Native XML.
There are many other filters available; this module is useful to make sure that your data got into
CargoWise but does not indicate processing success.
Assuming that the content you sent in was correctly wrapped in a Universal Interchange, each
EDI Interchange will cause one or more EDI Messages to be created. These are visible in the EDI
Messages module found under Maintain, then System, then EDI Message.
If you can see EDI Messages created with a valid ‘Sub Type’ on them (anything except ‘UNK –
Unknown’), then your transport layer is working, and you are at the point where you can work on
your content in more detail. If you can see EDI Interchange, but not EDI Messages, that means
that your transport layer is working, but the content you are sending is not quite correct.
Either way, once you can see EDI Interchanges being created, it’s time to work on your content
using information in the following sections regarding Native XML and Universal XML content.
Outbound XML
Outbound is the reverse of Inbound. Referring back to the diagram at the beginning of this
section, Workflow is used to create outgoing XML. An EDI Interchange is created for each EDI
Message generated on the outbound side with a status of AQU – Queued for eAdaptor. Assuming
the eAdaptor Outbound Messages (EAM) service task is running, it will try and push any queued
EDI Interchanges to the URL configured in the registry.
eAdaptor Outbound guarantees delivery, but guarantees at least once delivery, not once only
delivery. Under exceptional circumstances, there is a small possibility that an interchange will be
sent to the middleware, and the Interchange queued in the database will not be marked as sent. If
this happens, the interchange will be sent again. If duplicates cause problems, the receiving
middleware can discard duplicates with the same TrackingID on the eHubGatewayMessage.
eAdaptor Outbound service requires an HTTP 2XX response for all requests with SOAP response
message as per 2.4.5.2 SendStream Response. Any non-2XX response will be treated as sent
failed and will get re-queued until it has received a valid response. This will block all other
messages in the queue to maintain the message queue order. Messages may be failed manually
via EDI Message Module to allow the queue to process new messages.
For more information on how to send Universal XML, please see section 5.2 Sending Universal
XML
There may be instances where multiple eAdaptor outbound Universal Interchange Messages are
pending from the same ClientID (i.e., RecipientID). In such cases, when an EAM Service task
triggers an outbound message, the pending messages will be merged into a single envelope.
Below is an example of multiple pending messages from the same ClientID being presented in an
eAdaptor SOAP outbound message:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-utility-1.0.xsd">
<s:Header>
<h:SendStreamRequestTrackingID xmlns:h="http://CargoWise.com/eHub/2010/06">483560eb-dc8a-4661-a42d-
3593a9b37785</h:SendStreamRequestTrackingID>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2016-06-10T04:23:53.138Z</u:Created>
<u:Expires>2016-06-10T04:28:53.138Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-0c344944-2c97-46d6-9d0f-b7ee94816994-19">
<o:Username>abc</o:Username>
<o:Password o:Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-
1.0#PasswordText">123</o:Password>
</o:UsernameToken>
</o:Security>
</s:Header>
<s:Body>
<SendStreamRequest xmlns="http://CargoWise.com/eHub/2010/06">
<Payload>
<Message
ApplicationCode="UDM"
ClientID="WTGCWISYD"
TrackingID="5c2643ed-6
SchemaName="http://www.cargowise.com/Schemas/Universal/2011/11#UniversalInterchange"
SchemaType="Xml"
EmailSubject=""
FileName="">
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33
/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv
</Message>
<Message
ApplicationCode="UDM"
ClientID="WTGCWISYD"
TrackingID="5c2643ed-6ae7-4cbe-bf35-8db3c875aea2"
SchemaName="http://www.cargowise.com/Schemas/Universal/2011/11#UniversalInterchange"
SchemaType="Xml"
EmailSubject=""
FileName="">
H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33
/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/Iv7Hv/cffPzVsrjM6yYrTy/zZZu+W5TL5rOP5m27enT37tXV1Xia1RfVVdHk42m1uPt6Os8XWXPXvnZ3b2
d39+7u7kcp/i6q5Wcf7Y53Pzr6jZM0fcww+Vf642nWZifVss3fmY/0wzfUQ96eVGWZT1uCYL8Nvvc+pc/fXK/yo2dVfZXVs2J58XperBbU1+O7/EX
Q9PfKr49e79CzS/9/fBd/eh3cjfTgfxigZRuc0jDqVU1UOXt69N03nz++G3xi273OayILffL693n6+K79y35/Ui1W2TJA6KSa5Ucn3z17fJd/cziF
bQVHR0/9lCn+pljkRzQvn27v0P8evtnde3Rv79Hu3nh/jxC1LYJXQLbjN9823xsq6t/0+2M35+aj/wf7vUSQQAIAAA==
</Message>
</Payload>
</SendStreamRequest>
<s:Body/>
</s:Envelope>
You choose the component you want by the XML content you send in the request. Each
component has its own XML schema for the request, which is how the single connection or
endpoint knows how to process your request and respond.
That means that you need to know how to use the single Connection first (that’s the HTTP part),
and then you need to know which content to use for the Component you want to use (the XML
part).
2.5.1.1 Connection
There is no SOAP layer involved. This avoids the inevitable interoperability complications that
arise when trying to implement SOAP messaging on different platforms using different languages
and SDKs. HTTP provides security, encryption, and compression and is simple to implement on all
messaging platforms. XML provides the content and is also universally understood. The
combination provides everything you need and nothing you don’t.
If an HTTP GET request is sent to the same URL, the eAdaptor HTTP+XML service returns HTTP
containing documentation on how to get started with the interface. This means that if you simply
browse to the URL of your eAdaptor web service using your browser of choice, once credentials
have been established, it will show you getting started documentation including links to further
documentation. As more functionalities becomes available via this interface, the documentation
here will also be expanded. You will only see documentation on facilities that are actually
available on the version you are running, so there should be no confusion about what is and what
is not available.
This interface can use either HTTP or HTTPS simply by changing the protocol prefix on the URL. If
you are connecting via an open connection across the internet, you should always use HTTPS as
it encrypts all sent and received XML messages along with the username and password used to
authenticate. HTTP should only be used where the associated security risks are completely
understood, and steps have been taken to mitigate those via other means. If you are hosted with
WiseTech Global, always use HTTPS with TLS v1.2 or above.
Over time, we will move all Web Service-based components across to HTTP+XML providing the
simplest and most effective integration layer possible. This is a simple, light, efficient web
service-based interface that will be using for all new web services from this point.
• Universal Shipment Query – Query to have any current job in CargoWise returned as
Universal Shipment XML.
• Universal Document Query – Query to extract eDocs (electronically archived documents)
stored against any current job in CargoWise Returns Universal Event XML, including all
matching documents as base64 encoded binary content.
• Universal Inbound Synchronous – Send in Universal Shipments and Events synchronously.
Returns the processing status and logs as Universal Events in the result.
• Universal Inbound Asynchronous - Send in Universal Shipments and Events
asynchronously, leaving the processing to occur from the EDI Message Queue. The result
confirms that the inbound XML is in the processing queue. Processing results can
optionally be returned via the eAdaptor SOAP Outbound channel.
• Universal Accounting Transaction Batch Export – Create and/or Export Accounting
Transaction Batches. Used by those who want to feed Accounting Transactions generated
in CargoWise into an external accounting or analysis engine.
• Universal Interchange Requeue Component - Using the eAdaptor HTTP+XML web service
interface, you can bulk resubmit EDI Interchanges for sending out via the eAdaptor
Outbound web service interface.
Universal Events can contain eDocs as part of their payload which means that Universal
Inbound can process inbound eDocs as well.
2.5.1.3
If there is nothing in this registry item, please raise a CR9 eRequest to have this setup or to
provide your URL. If your URL is present, you can work out what your eAdaptor HTTP+XML web
service URL is by removing the file name from the end of the eAdaptor SOAP URL (everything to
the right of the last ‘/’) and adding the suffix eAdaptor. This means that for the example shown
above:
https://***tstservices.wisegrid.net/eAdapterStreamedService.svc
…becomes:
https://***tstservices.wisegrid.net/eAdaptor
In this example “***” correlates to your enterprise code, if using WiseCloud hosted eAdaptor.
For hosted customers, the webservice endpoint exposed using HTTPS and the minimum TLS
version required to connect is TLS v1.2.
If you change the username and password, you will need to update all clients connecting via
both interfaces where applicable. You will also need to have the Web Services restarted if
you want an immediate effect when these are changed, as the values are cached for a period
of time.
Once you have your URL, username, and password, you can test them by entering the URL into
the address bar of your favorite browser. If the web service is correctly configured, you will be
asked for a username and password. If you enter these correctly, you will see a simple landing
page as per below:
You have now verified that you have the web service setup correctly and that you have the
correct URL, Username, and Password. The next step is to try sending a query using the Sample
Client.
You may also want to download and install Fiddler from Telerik. (http://www.telerik.com/fiddler)
This is a free tool that will allow you to see the web traffic as it occurs. A very handy way to see
what is happening at the HTTP level and essential if you plan to implement your client using
something other than Microsoft .NET.
Once Visual Studio is installed, unzip the HTTP+XML Sample Client ZIP file to an appropriate
location. Once you have it unzipped, double click on HTTP+XML Sample Client.sln to open.
There is very little code in the Sample Client itself. You can use this code as a sample for your
own connectivity solution, or you can use it to understand how the HTTP+XML interface works at
a lower level using Fiddler to implement it in another environment.
If you press the F5 key (or click on the Start button on the toolbar), the client will start.
You can switch between HTTP and HTTPS by simply changing the URL prefix. Authentication is
HTTP Basic Authentication, so there is no need to pre-share certificates out of the box.
You can turn compression on and off for response messages using the check box provided at the
top of the form. That will allow you to see what compressed responses look like using Fiddler.
Note that the compression used in the Sample Client is GZIP, although some other alternatives
are available by modifying the code depending on what the web server you are using supports.
This is all part of the standard HTTP protocol; our software supports whatever HTTP and your web
server support in this area. Keep in mind that it may be more efficient not to use compression
when you know the request and response are going to be small.
You will note that there is a default sample UniversalShipmentRequest message present in the
sample client. If you have a Forwarding Consol in your system with the number C00001000 as
most CargoWise users will, this query will return the content of that Consol as UniversalShipment
XML.
More information on how to use the UniversalShipmentRequest follows in a later section; for now,
enter your eAdaptor URL, username, and password in the appropriate spaces and click on Post. If
there is no Consol present with that reference, you will see a UniversalResponse XML message
coming back like this:
The status is ERR for Error, and the ProcessingLog indicates that a matching entity could not
be found, and there is nothing in the Data element.
If the Consol is present in the system your query, you will get a UniversalResponse with a status
containing PRS for Processed Ok, the ProcessingLog will be empty, and the Data element will
contain UniversalShipment XML representing that Consol.
There are more complicated ways you can use the UniversalShipmentRequest, and there are
other XML requests you can send. These are documented in the following sections: this section
deals with the connection only. Any XML that is not recognized will generate an error response
telling you what forms of requests are supported by your system.
With that information in hand, it is up to you as a Senior Web Services Developer to select the
tool that works best with your application and develop your connection from there. Once the
Connection is working, the content you can send and receive for each Component available
through this interface is described in the following chapters.
2.5.3.1 UniversalShipmentRequest
The UniversalShipmentRequest is designed to query for and return a single UniversalShipment
matching the parameters enclosed in the message. Every module that supports exporting
UniversalShipment XML works with the UniversalShipmentRequest interface.
Each ‘well formed’ UniversalShipmentRequest sent (opening and closing tags matching/present
and no mandatory elements missing) will get a UniversalResponse XML back.
<Company>
<Code>BEN</Code>
</Company>
<EnterpriseID>HYE</EnterpriseID>
<ServerID>BEN</ServerID>
</DataContext>
</ShipmentRequest>
</UniversalShipmentRequest>
Demo Companies can be used to send messages within CargoWise. However, when sending
data externally Demo Companies cannot be used. For more information on Demo Companies
refer to What is the purpose of the Demo Company?
At this point, only querying by DataTarget Key in the DataContext is implemented. In upcoming
releases. The DataTarget Key will become optional, and queries by other references will be
possible. This is planned to be done using the Reference and Party ID matching facility already
available when importing Universal Shipment XML.
This works by following the premise that References issued by a given Party are globally unique
where you can identify the issuing Party. This means that you can query by things like House Bill
number where you can identify the Issuing (Sending) Forwarder, and query by Order Number
where you can identify the Buyer.
Each module has a list of Reference and Party ID pairs that are known to be good identifiers in
that module’s context. Examples in use right now are:
Forwarding Consol
Forwarding Shipment
Customs Declaration
This set will be added to as required where truly unique references can be identified for each
module.
Each ‘well formed’ UniversalShipmentRequest sent with opening and closing tags
matching/present and no mandatory elements missing will get a UniversalResponse XML back.
The UniversalResponse contains:
Following is a sample of what you would expect to see in the HTTP+XML Sample Client on a
successful query:
Posting...
Begin POST to https://xxxtstservices.wisegrid.net/eAdaptor
<<<------------------------------------------------- Begin Message Body ----------------------
--------------------------->>>
<UniversalShipmentRequest xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<ShipmentRequest>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingConsol</Type>
<Key>C00001000</Key>
</DataTarget>
</DataTargetCollection>
<Company>
<Code></Code>
</Company>
<EnterpriseID></EnterpriseID>
<ServerID></ServerID>
</DataContext>
</ShipmentRequest>
</UniversalShipmentRequest>
<<<-------------------------------------------------- End Message Body -----------------------
--------------------------->>>
Waiting Response...
<AgentsReference></AgentsReference>
Each ‘well formed’ UniversalShipmentRequest sent (opening and closing tags matching/present
and no mandatory elements missing) will get a UniversalResponse XML back.
A malformed request will return an HTTP ‘400-Bad Request’ response with nothing in the body.
2.5.4.1 UniversalDocumentRequest
The UniversalDocumentRequest is designed to query for and return documents via a
UniversalEvent containing documents matching the parameters and filters enclosed in the
message. Every module that supports exporting UniversalEvent XML works with the
UniversalDocumentRequest interface. Additionally it is possible to retrieve documents from the
eDocs tab across modules using <DataTarget> as ‘DocManager’ and <DataTarget> key as ‘Module
code Job number’
Each ‘well formed’ UniversalDocumentRequest sent (opening and closing tags matching/present
and no mandatory elements missing) will get a UniversalResponse XML back.
The UniversalDocumentRequest has two main sections, the DataContext and the FilterCollection.
Information from the DataContext is used to Target a particular data source entity or job in a
particular module. The eDocs against that job is then queried using information in the
Following is a sample query/request for all documents with a document type of ARN from
Customs Declaration B00001000:
<UniversalDocumentRequest xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<DocumentRequest>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>CustomsDeclaration</Type>
<Key>B00001000</Key>
</DataTarget>
</DataTargetCollection>
<Company>
<Code>CWI</Code>
</Company>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>SYD</ServerID>
</DataContext>
<ReturnDocumentDescriptionsOnly>true</ReturnDocumentDescriptionsOnly>
<FilterCollection>
<Filter>
<Type>DocumentType</Type>
<Value>ARN</Value>
</Filter>
</FilterCollection>
</DocumentRequest>
</UniversalDocumentRequest>
Below is a sample query/request for documents in the Product Warehouse module using the
<DataTarget> type of ‘DocManager’:
UniversalDocumentRequest xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<DocumentRequest>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>DocManager</Type>
<Key>WTD W000027944</Key>
</DataTarget>
</DataTargetCollection>
<Company>
<Code>CWI</Code>
</Company>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>SYD</ServerID>
</DataContext>
</DocumentRequest>
</UniversalDocumentRequest>
• DataTarget Type
The DataTarget Type is used to determine which module you want to retrieve the data
from. The DataTarget Type is mandatory. If you do not include it, you will get an Entity Not
Found result no matter what else you include.
• DataTarget Key
The DataTarget Key is used to identify the job or entity within the module you are
querying. Each module has a designated Key field of fields that uniquely identify rows
within that module, usually a job number like the Shipment, Consol and Declaration
Numbers.
The DataTarget Type and Key contains the same values you see in the DataSource of a
UniversalShipment or UniversalEvent exported from any module supporting the
UniversalShipmentQuery.
Some modules like Customs are ‘Company Specific’ in that each job is tied to a particular
Company. For those modules, you will need to provide the EnterpriseID, ServerID and Company
Code elements to identify the Company you are querying from. If you do not provide this
information where it is required, you will get an Entity Not Found response. Most Customs
modules are Company specific which is also how they are linked to a given Country. (As each
company is tied to a country)
Where a module is not ‘Company Specific’ (like Forwarding Consol or Forwarding Shipment), you
can still send the EnterpriseID, ServerID and Company Code where known. This will not affect
which entity is returned, but it will affect filtering of content that is Company Specific like Job
Costing or Billing information. If you are not using these sections of the returned XML, you do not
need to provide these elements in the query.
You can tell if a module is ‘Company Specific’ or not by logging into the same system under two
different companies. If you can see the same set of jobs in a given module, it is not Company
Specific.
The FilterCollection is an optional section that you use when you want to return only some of the
eDocs present on a given Job/Entity. If the FilterCollection is not included or contains no
elements, all eDocs from the matching parent Job/Entity will be returned.
Each Filter element contains two sub elements, Type to indicate what type of filter to and Value
to provide the value that filter is going to use. Where a Filter is not included for any given type,
the default behavior is to return all eDocs. This means that for a filter like CompanyCode, default
behavior when this type is not specified is to return all documents regardless of company
affiliation.
Where multiple filter elements are provided with the same Type, these are treated as an ‘Or’ style
filter so any document matching any of the values presented will be returned. Filter elements
with different Types are treated as an ‘And’ style filter where all values must match on eDocs
being returned.
Some filters only work with one per request, these are noted in the definitions following.
IsPublished – Retrieve only published or un-published documents. Possible values for this filter
are: True and False. This can only be specified once.
SaveDateUTCFrom – Retrieve only documents that were added or modified on or after the
specified date/time (provided in UTC time). This can only be specified once.
SaveDateUTCTo – Retrieve only documents that were added or modified on or before the
specified date/time (provided in UTC time). This can only be specified once.
FileName – Retrieve only document matching with the specified File Name.
DocumentID – Retrieve only document matching with specified DocumentID (Primary Key –
GUID).
Related eDocs – Retrieve documents attached any Related eDocs which are specified. For
example, it will return the eDocs under the related CustomsEntry of a Declaration in addition to
the eDocs in the Declaration itself.
<ReturnDocumentDescriptionsOnly>true</ReturnDocumentDescriptionsOnly>
Sample Filters
• Using filter: FileName
<FilterCollection>
<Filter>
<Type>FileName</Type>
<Value>sample file.docx</Value>
</Filter>
</FilterCollection>
<Company>
<Code>DAU</Code>
</Company>
<EnterpriseID>EDI</EnterpriseID>
<ServerID>82A</ServerID>
</DataContext>
<ReturnDocumentDescriptionsOnly>true</ReturnDocumentDescriptionsOnly>
<FilterCollection>
<Filter>
<Type>DocumentID</Type>
<Value>BDF6A934-304B-49B6-B9C6-A88E91FF093A</Value>
</Filter>
</FilterCollection>
</DocumentRequest>
</UniversalDocumentRequest>
Where multiple filter elements are provided with the same Type, these are treated as an ‘Or’ style
filter so any document matching any of the values presented will be returned. Filter elements
with different Types are treated as an ‘And’ style filter where all values must match on eDocs
being returned.
Example filters – multiple filters in one filter collection: Only return document type is ‘ARN’ And
file name is ‘sample file.docx’ Or ‘sample file 2.docx’
<FilterCollection>
<Filter>
<Type>FileName</Type>
<Value>sample file.docx</Value>
</Filter>
<Filter>
<Type>FileName</Type>
<Value>sample file 2.docx</Value>
</Filter>
<Filter>
<TYpe>DocumentType</Type>
<Value>ARN</Value>
</Filter>
</F1ilterCollection>
2.5.4.2 UniversalResponse
Each ‘well formed’ UniversalDocumentRequest sent with opening and closing tags
matching/present and no mandatory elements missing will get a UniversalResponse XML back.
The UniversalResponse contains:
ProcessingLog - Contains Errors and Warnings that were detected during processing of the sent
query. Even for Processed Ok there may be warnings regarding processing the content of the
incoming query XML (e.g., Over length element values being truncated on import)
Data - When the status is Processed Ok, contains the resulting UniversalEvent XML
Following is a sample of what would come back from the sample UniversalDocumentRequest
shown earlier in this section assuming there was a matching Customs Declaration, and that
entity/job had an eDoc attached with a Document Type of ARN:
ImageData - Document contains as a base64 encoded binary stream. The sample above was
truncated for brevity.
If there is a failure matching to a parent entity/job using information from the requested
DataContext, or no eDocs are found matching the filters specified, you will get a
UniversalResponse back with a status of ERR for Error and a reason in the Processing Log like so:
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Status>ERR</Status>
<ProcessingLog>
CustomsDeclaration B00001000 was found, but no eDocs were found matching the filters specified.
</ProcessingLog>
<Data />
</UniversalResponse>
A malformed request will return an HTTP ‘400-Bad Request’ response with nothing in the body.
This is a direct path to the Universal Data Buss. This can publish Universal XML to all operational
modules within CargoWise.
There is no EDI Interchange, EDI Message, or any Service Tasks involved in processing in this
manner. Although this is a direct, light, and efficient channel by its very nature, keep in mind that
you will need to manage data processing, logging, and reprocessing within your own
Middleware/ESB.
This section covers the transport layer with one sample coming in and samples of the
possible responses that might come back in the UniversalResult XML. It does not contain in-
depth information on all of the possible forms and uses of Universal Shipment and Event XML.
Detailed information about these, their usage and their capabilities are available in the
Universal Shipment and Universal Event sections of this document. If you are already using
the eAdaptor SOAP interface, this channel accepts and processes the same content minus
the Universal Interchange XML wrapper.
Following is a sample XML file that will add a small text file as a PreAlert document to the eDocs
tab of Forwarding Shipment S00001000 if that job exists in the target system.
<UniversalEvent xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Event>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S00001000</Key>
</DataTarget>
</DataTargetCollection>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>SYD</ServerID>
<Company>
<Code>CWI</Code>
</Company>
</DataContext>
<EventTime>2016-06-09T12:32:12.42</EventTime>
<EventType>DDI</EventType>
<EventReference>PAL</EventReference>
<IsEstimate>false</IsEstimate>
<AttachedDocumentCollection>
<AttachedDocument>
<FileName>Tiny PreAlert.txt</FileName>
<ImageData>SGV5ISBXYWtlIFVwIQ==</ImageData>
<Type>
To use this sample in your own testing, you would need to make sure that there was an ‘Active’
Forwarding Shipment present in the target system with the Shipment Number S00001000, or
you could change the DataTarget Key to match another Shipment. You will also need to make
sure that the EnterpriseID, ServerID and Company Code match the registered values in the
system you are testing.
For more information on how to target entities using Universal XML, please see Section 5.1.5
DataContext when Importing XML
2.5.5.2 UniversalResponse
Each ‘well formed’ UniversalShipment or UniversalEvent XML sent with opening and closing tags
matching/present and no mandatory elements missing will get a UniversalResponse XML back.
The UniversalResponse contains:
Following is a sample of what would come back from the sample UniversalEvent XML shown
earlier in this section assuming there was a matching Forwarding Shipment present in the target
system, and the EnterpriseID, ServerID and Company Code all match the registration of the target
system:
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Status>PRS</Status>
<ProcessingLog />
<Data>
<UniversalEvent xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Event>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>ForwardingShipment</Type>
<Key>S00001000</Key>
</DataSource>
</DataSourceCollection>
<Company>
<Code>CWI</Code>
</Company>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>SYD</ServerID>
</DataContext>
<EventTime>2016-06-08T09:48:13</EventTime>
<EventType>DIM</EventType>
<IsEstimate>false</IsEstimate>
<ContextCollection>
<Context>
<Type>HBOLNumber</Type>
<Value>HB432178972345</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
</Data>
</UniversalResponse>
You can see that the Status element is shown as PRS (Processed Ok) and the EventType element
in the Universal Events is set to DIM (Data Imported). The combination of these two elements
needs to be checked to indicate complete success.
You will also see that the DataSourceCollection will contain the DataSource Type and Key
identifying the entity/job that was updated using the incoming data. The ContextCollection will
contain supplementary references from the entity/job being updated that can be used as
alternate references if required.
The Data element in the UniversalResponse may contain multiple UniversalEvents if multiple
modules elect to consume the Universal Event you sent in. This is because incoming
Universal XML is published to all modules in parallel via the Universal Data Buss. More
information is available on the Universal Data Buss in Section 5.3 Receiving Universal XML.
The Status on the UniversalResponse will still show PRS (Processed OK) as a status code as the
message was successfully parsed and passed Message level validation. The Universal Event
contained in the Data element will have an EventType of DIF (Data Import Failure) and in the
ContextCollection you will see a Context element with a Type of FailureReason and a Value
containing a human readable explanation of the Business validation failure.
Unlike the Success response, there will not be a DataSourceCollection where no matching
entity/job was found. Following is a sample where the references supplied did not match any
entity/job in any module:
These occur when the content of the XML is not processable as sections defined as mandatory
in the XSD are missing or contain invalid data.
There is no UniversalEvent present in the Data element as the UniversalEvent part of the
response is only generated when the XML is able to be published on the Universal Data Buss.
Following is a sample where the EventType element was not included on an inbound Universal
Event message:
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Status>ERR</Status>
<ProcessingLog>
Error - Missing mandatory element [EventType] at root level.
</ProcessingLog>
<Data />
</UniversalResponse>
This functionality is proposed future functionality. Content here is the current design
specification for this functionality published to give an indication of what we have planned.
This content is updated weekly; functionality may change before final delivery.
This component provides the same functionality available via the eAdaptor SOAP Inbound web
service, but as a RESTful web service without the need to use SOAP. This means you can use this
to queue the content of a Universal Interchange in the EDI Interchange and EDI Message modules
for processing using the UMI and NMI service tasks.
This is intended for use with any interface where you do not need the processing result back
immediately and would rather that your client application be able to continue on processing
items instead of waiting for the full import to proceed.
To use this component, you can send in either Universal or Native XML wrapped in
UniversalInterchange XML. The fact that your Universal or Native XML payload is wrapped in a
UniversalInterchange tells our application that you would like to have this processed via the
asynchronous channel. The UniversalInterchange XML will be stored in an EDI Interchange, and
assuming the content of the interchange is recognized it will be immediately split out into EDI
Messages.
Once the EDI Messages have been created, a UniversalResponse will be returned with a success
status. If the content is syntactically correct XML but the message content is not present,
recognized, or parseable, a Universal Response will be returned with a failure status and a
message indicating what the cause of the failure was. All other forms of malformed request will
return an HTTP ‘400-Bad Request’ response with nothing in the body.
All messages are processed through the eAdaptor HTTP+XML web service. The HTTP protocol is
used to POST an XML based ‘Request’ message, and an XML based ‘Response’ message is
returned as the result.
This development is an extension to existing web services used to create and extract accounting
transaction batches and integrates the accounting web services functionality into the new
eAdaptor HTTP+XML web service.
This integration usually involves middleware software that prompts CargoWise to batch
transactions that have not yet been batched and retrieve transactions for a given batch number.
It includes all accounting transactions posted in CargoWise and all general ledger effects caused
by those transactions.
2.5.7.1 UniversalTransactionBatchRequest
The UniversalTransactionBatchRequest message format is used to request the creation of
accounting batches, the export of accounting batches, and a composite message type that both
creates and exports an accounting batch.
All three types of requests contain a DataContext to establish the context in which your request
is being made, and an ActionType element describing the action being requested. The
ActionType contains a single Code element, following are the accepted values:
• CRE – Create Batch – This action will create accounting batch database records. The
response to this message type will contain an empty TransactionCollection node.
• EXP - Export Batch– This action will generate the accounting transaction batch XML and
include it in the Data node of the response. The response to the Export message will
contain the TransactionCollection node populated with the transactions in the requested
batch.
• CEX – Create And Export Batch – This action combines the Create and Export actions into
a single request. When the system receives a ‘CreateAndExport’ message, it will create the
accounting batch database records and generate the accounting transaction batch XML.
The response to the CreateAndExport message will contain the TransactionCollection node
populated with the transactions in the newly created batch.
To identify the target Company, you must include the EnterpriseID, ServerID, and Company.Code
elements as part of the DataContext. These three elements are mandatory for all
UniversalTransactionBatchRequests. You will need to make sure that the EnterpriseID, ServerID
and Company Code you provide match the registered values for a registered Company in the
target CargoWise system or your request will be rejected.
For more information on how to target entities using Universal XML, please see Section 5.1.5
DataContext when Importing XML
When you are using the EXP (Export Batch) ActionType Code, in addition to the Company
identification elements, you will also need to identify the batch number you are requesting. You
do this by including the DataTargetCollection with one DataTarget element. The DataTarget must
contain a Type of BatchNumber and include the batch number being requested in the Key
element as shown in sample following.
<UniversalTransactionBatchRequest xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<TransactionBatchRequest>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>BatchNumber</Type>
<Key>3</Key>
</DataTarget>
</DataTargetCollection>
<Company>
<Code>ABC</Code>
</Company>
<EnterpriseID>CW</EnterpriseID>
<ServerID>ENT</ServerID>
</DataContext>
<ActionType>
<Code>EXP</Code>
</ActionType>
</TransactionBatchRequest>
</UniversalTransactionBatchRequest>
For the other ActionType Codes, the DataTargetCollection is not required. Following is a sample
CRE (Create Batch) request.
2.5.7.2 UniversalResponse
Each ‘well formed’ UniversalTransactionBatchRequest sent with opening and closing tags
matching/present and no mandatory elements missing will get a UniversalResponse XML back in
the body of the HTTP POST response with a 200 status. The UniversalResponse contains:
ProcessingLog - Contains Errors and Warnings that were detected during processing of the sent
query. Even for Processed Ok there may be warnings regarding processing the content of the
incoming query XML (e.g., Over length element values being truncated on import)
Data - When Status is Processed Ok, contains the resulting UniversalTransactionBatch XML. Will
be empty if you get an Error status.
If there is a serious error attempting to interpret malformed or invalid XML to the eAdaptor
HTTP+XML web service, you may get a 500 status returned with an error message in the body of
the response.
This will contain a UniversalResponse with a single UniversalTransactionBatch element in the Data
element with the elements required to identify the new Batch, but no Transactions as follows.
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<Status>PRS</Status>
<Data>
<UniversalTransactionBatch xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<TransactionBatch>
<BatchType>
<Code>CRE</Code>
<Description>Transaction Batch Created</Description>
</BatchType>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>BatchNumber</Type>
<Key>2</Key>
</DataSource>
</DataSourceCollection>
<Company>
<Code>ABC</Code>
<Country>
<Code>ES</Code>
<Name>Spain</Name>
</Country>
<Name>ABC COMPANY</Name>
</Company>
<DataProvider>CWENTABC</DataProvider>
<EnterpriseID>CW</EnterpriseID>
<ServerID>ENT</ServerID>
</DataContext>
<TransactionCollection>
</TransactionCollection>
</TransactionBatch>
</UniversalTransactionBatch>
</Data>
<ProcessingLog>
New batch 2 is created
</ProcessingLog>
</UniversalResponse>
This will contain the same information as the response to the CRE (Create Batch) request but will
also include the transactions on the TransactionCollection within the UniversalTransactionBatch.
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<Status>PRS</Status>
<Data>
<UniversalTransactionBatch xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<TransactionBatch>
<BatchType>
<Code>CEX</Code>
<Description>Transaction Batch Created and Exported</Description>
</BatchType>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>BatchNumber</Type>
<Key>3</Key>
</DataSource>
</DataSourceCollection>
<Company>
<Code>ABC</Code>
<Country>
<Code>ES</Code>
<Name>Spain</Name>
</Country>
<Name>ABC COMPANY</Name>
</Company>
<DataProvider>CWENTABC</DataProvider>
<EnterpriseID>CW</EnterpriseID>
<ServerID>ENT</ServerID>
</DataContext>
<TransactionCollection>
<Transaction>
<Branch>
<Code>SPA</Code>
<Name>SPAIN BRANCH</Name>
</Branch>
<!--Content Removed for Brevity-->
<PostingAmount>847.4600</PostingAmount>
<PostingCurrency>
<Code>EUR</Code>
<Description>Euro</Description>
</PostingCurrency>
<PostingDate>2017-05-24T00:00:00</PostingDate>
</Transaction>
</TransactionCollection>
</TransactionBatch>
</UniversalTransactionBatch>
</Data>
<ProcessingLog>
New batch 3 is created and exported
</ProcessingLog>
</UniversalResponse>
This will contain the same information as the CEX (Create and Export Batch).
https://{EnterpriseCode}{ServerCode}accounting.wisegrid.net/AccountingTransationExportServi
ce.asmx
That web service provides two methods – ‘CreateBatch’ and ‘ExportBatch’. Those two web
service methods are directly replaced by the new message explained in this Update Note, using
the ‘Create’ and ‘Export’ action types.
The new action type of ‘CreateAndExport’ can be used instead of making two separate web
service calls.
We recommend that you test this process in your test system before performing this in your
production system so that you are both familiar and comfortable with the process. Steps are as
follows:
1. Check that you can still access the legacy batch export via Manage > General Ledger >
Export Transactions. Raise a CR9 eRequest to temporarily re-enable this if necessary.
2. Negotiate a changeover time with your users and integration team. This is when you will stop
using the legacy batch export and start using the universal batch export. It is recommended
that you stop users from posting accounting transactions for a short period of time while your
complete steps 3-6.
3. When you’re ready to change over, ask users to stop using the CargoWise accounting system,
Billing and Job Costing menus. This will make the reconciliation process easier and is highly
recommended, but not mandatory.
4. Create your final legacy batch export manually or using the service task. This will be the last
legacy batch export that you will create and will include all transactions up to this point. You
should import these transactions into your external accounting system.
If you receive a message that there are no transactions to batch, this means that nobody has
posted any transactions since step 3. You will not need to do anything further to handle
duplicate transactions in your external accounting system.
If you see a message that batch 1 was created successfully, this means that users have
created transactions after step 3, and you will need to manually remove any transactions that
appear in both the last legacy batch file and the second universal batch file. You can use
Transactions Export Batching Report to see which transactions were included in each batch.
You should export this batch and import it into your accounting system.
6. The process is complete. Let your users know that they can start using the accounting system
again at this point.
Once you start using Universal Transaction Batch Export, you should no longer go back to
Legacy Batch Export, in order to avoid duplication. It is important to note that Universal
Transaction Batch Export excludes transactions, which were previously exported using
Legacy Batch Export. However, subsequent Legacy Batch Exports will include transactions
previously exported by Universal Batch Export.
To use this component, you send a UniversalInterchangeRequeueRequest XML message into the
eAdaptor HTTP+XML web service interface, and you will get a UniversalResponse XML message in
return. Upon successful completion, the UniversalResponse will contain a single Universal Event
indicating success including a count of the Interchanges that were re-queued.
Each ‘well formed’ requeue request sent (opening and closing tags matching/present and no
mandatory elements missing) will receive a UniversalResponse XML back. A malformed request
will return an HTTP ‘400-Bad Request’ response with nothing in the body.
This functionality can only be used to requeue EDI Interchanges that were sent out using
eAdaptor SOAP. EDI Interchanges sent via xHub are generally requeued at the xHub end after
consultation with WiseTech Global representatives.
An important note when building Filter elements is that they must include a ‘CreateDateUTC’
range, and the range specified must not span more than a 24-hour period. If there is no create
data range specified, the request will fail. This places a limit on the amount of data that can be
updated in a call to this service which limits the amount of work that will be done in the one
transaction.
It should be rare that you need to resubmit more than one day’s worth of interchanges. If this is
the case, you can call the method multiple times.
When Interchanges are successfully re-queued for sending, a UniversalResponse will be returned
with a status of PRS (Processed OK) and a single Universal Event in the Data element. The number
of Interchanges re-queued will be included in an InterchangeRequeueCount typed Context
element in the ContextCollection of the Universal Event. Following is a sample of a
UniversalResponse returned from a successful requeue request.
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Status>PRS</Status>
<ProcessingLog />
<Data>
<UniversalEvent xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Event>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>EDIInterchange</Type>
</DataSource>
</DataSourceCollection>
<Company>
<Code>CWI</Code>
</Company>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>SYD</ServerID>
</DataContext>
<EventTime>2017-03-20T05:47:12</EventTime>
<EventType>EDT</EventType>
<EventReference>Changed status: ->AQU</EventReference>
<IsEstimate>false</IsEstimate>
<ContextCollection>
<Context>
<Type>InterchangeRequeueCount</Type>
<Value>1203</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
</Data>
</UniversalResponse>
A malformed request will return an HTTP ‘400-Bad Request’ response with nothing in the body.
This component functions in the same manner as the XNDT Web Service Retrieve Method
described in section 2.6.2 Using the Retrieve Method. This component is a replacement for that
service implementing HTTP Basic Authentication, HTTPS, and GZIP compression for better
security, performance and scalability.
To use the Native Query component, you send a Native XML message, and expect a
UniversalResponse XML message in return. The UniversalResponse will either contain the
requested Native XML, or a failure status and a reason why the requested Native XML could not
be returned.
Each ’well formed‘ Native Query sent (opening and closing tags matching/present and no
mandatory elements missing) will get a UniversalResponse XML back.
The Native Request has a single Body element which then contains a single child element
representing the Native Dataset that is being queried. In this case the Native UNLOCO Dataset is
being queried.
The Dataset element will contain a list of CriteriaGroup elements with Criteria elements
contained within. These Criteria are used to filter the data when loading the Dataset requested.
More information on the proper use of Criteria and CriteriaGroups can be found in section 2.6.2
Using the Retrieve Method.
2.5.9.2 UniversalResponse
Each “well formed” Native Request sent with opening and closing tags matching/present and no
mandatory elements missing will get a UniversalResponse XML back. The UniversalResponse
contains:
Where the Native Request is malformed (not valid XML with matching opening and closing tags)
an HTTP ’400-Bad Request‘ response with nothing in the body.
If the Native Request is well formed, but the elements within are not used correctly (eg:
CriteriaGroup used with no Criteria contained) a Universal Response will be returned with an ’ERR‘
Status. A human readable error message describing the reason for rejection will be included in
the ProcessingLog element as per the sample following.
Where matching data is found, the result is then serialized into Native XML and returned within a
Universal Response as per the sample following.
<UniversalResponse xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<Status>PRS</Status>
<Data>
<Native xmlns="http://www.cargowise.com/Schemas/Native/2011/11">
<Body>
<UNLOCO>
<RefUNLOCO>
<PK>ad87872e-96b8-4c9a-bc0b-6a4088247a64</PK>
<PortName>Sydney</PortName>
<CoOrdinates>3351S 15112E</CoOrdinates>
<!-- Content Removed for Brevity -->
<IATA>SYD</IATA>
<Code>AUSYD</Code>
<CountryCode TableName="RefCountry">
<Code>AU</Code>
<PK>e4eb6e97-aa78-4c46-bf86-35b7fbb5fb0e</PK>
</CountryCode>
</RefUNLOCO>
</UNLOCO>
</Body>
</Native>
</Data>
<ProcessingLog>Information - 1 match found.</ProcessingLog>
</UniversalResponse>
Where multiple rows match the Criteria specified in the NativeRequest, there will be one Native
element generated under the Data element for each matching row.
Where the query is well formed, but no matching data is found, a UniversalResponse with a Status
of ’PRS‘ (Processed OK) and no Data content will be returned. The ProcessingLog will indicate that
no matches were found as per the sample following.
<UniversalResponse version="2.0" xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" >
<Status>PRS</Status>
<Data>
</Data>
<ProcessingLog>Information - 0 matches found.</ProcessingLog>
</UniversalResponse>
To get a better understanding of the Native XML content that will be returned within the
UniversalResponse Data element, please read section 4 Native XML.
This component functions in the same manner as the XNDT Web Service Update Method
described in section 2.6.3 Using the Update Method. This component is a replacement for that
service implementing HTTP Basic Authentication, HTTPS, and GZIP compression for better
security, performance and scalability.
To use the Native Inbound Synchronous component, you send a properly formed Native XML
message, and expect a UniversalResponse XML message in return. The UniversalResponse will
either contain a success status and a human readable note describing what was updated, or a
failure status and a reason why the inbound Native XML could not be processed.
For more information on building Native XML, please refer to section 4 Native XML.
2.5.10.2UniversalResponse
Where the Native XML sent is malformed (not valid XML with matching opening and closing tags)
an HTTP ’400-Bad Request‘ response with nothing in the body.
If the Native XML sent is well formed, but the data could not be processed or imported for any
reason, a Universal Response will be returned with an ’ERR‘ Status. A human readable error
message describing the reason for rejection will be included in the ProcessingLog element as per
the sample following.
<UniversalResponse version="2.0" xmlns="http://www.cargowise.com/Schemas/Universal/2011/11">
<Status>ERR</Status>
<Data>
</Data>
<ProcessingLog> Error - There is no UNLOCO with the following values: [Code:XXZZ_][PortName:Sydney
(My Town)].</ProcessingLog>
</UniversalResponse>
Where the update is successful, a Universal Response is returned with a PRS (Processed OK)
status and a human readable description of the scope of the update in the ProcessingLog
element.
<UniversalResponse version="2.0" xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" >
<Status>PRS</Status>
<Data>
</Data>
<ProcessingLog>Information - RefUNLOCO - 0 inserts, 1 updates, 0 deletes</ProcessingLog>
</UniversalResponse>
The Universal Response message from CargoWise will include the collection as seen in the below
sample:
The Native Response Message from CargoWise will include the collection as seen in the below
sample:
The below Types are used withing the Message Number Collection:
There are two blue underlined links that will bring up the WSDL describing the form of XML used
when connecting via this interface. The WSDL describes five web service methods; two of those
are used for current functionality.
Retrieve – Used to query reference tables returning a Native XML representation of any
matching data found.
Update – Used to update reference tables using Native XML. Updates occur while the HTTP
connection is held open, and the processing result is returned in the response.
Each method takes a single Native XML message parameter containing the Native XML that
constitutes the message, and returns a Response XML message containing:
Status – ‘Accepted’ when the Native XML message was able to be processed, ‘Rejected’ when
there was an error processing the Native XML message.
Information – A series of plain text Item segments giving either a description of the error causing
rejection, or a description of what was done in response to an accepted message.
Data – when calling RetrieveData, if the requested entity is found, it will be returned inside the
Data element in the format specified in the Native XML Schema for that entity type.
Both of these web methods can be called using the XNDT Sample Client described in following
sections to demonstrate the functionality available. The demonstrations describe the
functionality available using these two web methods in more detail.
There are three other web service methods, RetrieveData, UpdateData and Service that were
added to provide the same features provided by Retrieve and Update for some legacy
middleware. These have been deprecated for some time and are not required for any current
implementation.
Each CriteriaGroup can contain multiple Criteria, and can either be Unique Key based, or Partial
Match based as described below.
This message requires that the Code property on the table OrgHeader is a candidate key to work.
If you specify a FieldName that is not a candidate key, a Rejection status will be returned with an
appropriate error message.
When using unique key based retrieval, only a single key can be specified. There will only be one
Criteria element, as multiple criteria with different unique keys would never return a result. This is
because you could never find an organization with a code of ABC and XYZ.
<Native xmlns="http://www.cargowise.com/Schemas/Native">
<Body>
<Organization>
<CriteriaGroup Type="Key">
<Criteria Entity="OrgHeader" FieldName="Code">
ABCDEF
</Criteria>
</CriteriaGroup>
</Organization>
</Body>
</Native>
All items within a criteria group assume an ‘And’ operation, whilst an ‘Or’ operation is performed
between each criteria group.
The following example will retrieve all Organizations where the Code element begins with A and
the Organization has the IsBroker element set to true, or all Organizations where the FullName
element begins with BA.
<Native xmlns="http://www.cargowise.com/Schemas/Native">
<Body>
<Organization>
<CriteriaGroup Type="Partial">
<Criteria Entity="OrgHeader" FieldName="Code">
A%
</Criteria>
<Criteria Entity="OrgHeader" FieldName="IsBroker">
True
</Criteria>
</CriteriaGroup>
<CriteriaGroup Type="Partial">
<Criteria Entity="OrgHeader" FieldName="FullName">
BA%
</Criteria>
</CriteriaGroup>
</Organization>
</Body>
</Native>
The value of the Table property can be any table within the entity set specified. As an example,
the below request retrieves Organizations where a custom code exists of type DUN for country
US with a value starting with 1234.
<Native xmlns="http://www.cargowise.com/Schemas/Native">
<Body>
<Organization>
<CriteriaGroup Type="Partial">
<Criteria Entity="OrgHeader.OrgCusCode" FieldName ="CodeType">DUN</Criteria>
<Criteria Entity="OrgHeader.OrgCusCode" FieldName="CustomsReg.No">1234%</Criteria>
<Criteria Entity="OrgHeader.OrgCusCode.CodeCountry" FieldName="Code">US</Criteria>
</CriteriaGroup>
</Organization>
</Body>
</Native>
In the above example, the Data element is returning two DataItems. Each data item will contain
the data of the relevant data item requested.
• Accepted
• Accepted with Notifications
• Rejected
Zero or more information items can be included in the Information element. For successful
requests, an information element will specify how many data items are being returned.
It is also important to note that every item within the hierarchy of that entity set contains an
Action attribute. This attribute defines what operation to perform on that single data item only.
Actions allowed are:
• INSERT – Add a new row to the database. (must be no rows with a matching key)
• UPDATE – Update existing row using matching key.
• MERGE – Update existing row using matching key, otherwise add new row.
• DELETE – Delete existing row using matching key.
Insert will cause a failure if a row already exists with a matching key. Update and Delete will
cause a failure if no row exists with a matching key.
Action attributes are not inherited – meaning that to delete an item, all children must also have
the Delete attribute applied.
If a table has children that are not defined in the entity set, the system will reject the entity
deletion.
The lack of an action attribute implies that that data item will not cause any update during the
update process. Values in an element without an Action will be used to match to a row so that
any child elements can then match using the matched row as a parent.
Every item that has an action of either Delete or Update must contain an element that is a valid
candidate key for that data item. A candidate key could contain multiple columns according to
the definition of a given table.
If an update is successful, the Information element will include a list of table names affected, with
the number of inserts, updates and deletes specified per table.
This is available as part of the eAdaptor Sample Interfaces pack available from our WiseTech
Academy in Integration Options – eAdaptor Guides
If you download the eAdaptor Sample Interfaces pack and unzip it, you will see a folder XNDT.C#.
If you have .NET C# experience and a copy of Microsoft Visual Studio installed, you can use the
source code provided to gain a better understanding of the XNDT Web Service by opening the
WTG.XNDT.SampleClient.sln Solution file.
If all you want to do is test or demonstrate the XNDT Web Service Interface, you can run the
XNDTSampleClient.exe file that is provided already built using the source code provided.
For Native and Universal XML, the schema set that matches the version of CargoWise you are
running is available from within your own CargoWise system. We add to our schemas over time,
and although we don’t make breaking changes (remove or rename elements) it is better to use
the set of schemas that match your current version of CargoWise when beginning new mappings.
The module where both Universal and Native XML messages are most visible is the EDI Messages
module under Maintain, EDI Messaging, and then EDI Message. This is where you have the option
for saving your own copy of our schemas.
Figure 39 Menu path Maintain > EDI Messaging > EDI Message
You will then be asked to select a folder to write the Schemas to:
It’s a good idea to create a new folder if you don’t already have one, multiple files will be
created in the folder you select.
When completing a mapping into or out of CargoWise, these are used in conjunction with Sample
XML that you can generate yourself by exporting XML from your own CargoWise system or one
of our test systems.
If you don’t have access to a test CargoWise system, please contact your WiseTech Global
representative for more information on available options for test systems. Testing is a key
part of any Electronic Data Interchange implementation.
Our schemas are designed to be used as a set using both references from the Native Common
schema to the Universal Namespace and the ‘include’ element between Universal entities and the
Universal Common schema. Please make sure your middleware supports these facilities before
trying to use these schemas.
If your middleware does not support these facilities, this problem can be worked around by
merging the schemas manually. As this process varies between different middleware
depending on what is and is not supported, it’s not something we can provide specific advice
on. In some cases, this can be fixed by updating to the current version of your middleware.
• Airline
• CommodityCode
• Container
• CurrencyExchangeRate
• DangerousGood
• Organization
• ServiceLevel
• Vessel
• Company
• Staff
• Country
• UNLOCO
• Product
• Rate
• CusStatement
• AcceptabilityBand
• BMSystem
• Tag
• TagRule
• WorkflowTemplate
• Native (common)
• Activity
• Common
• Event
• Interchange
• Schedule
• Shipment
Any new Universal schemas released will be added to this functionality as they become available.
There are two kinds of restrictions, those imposed by what can be stored by SQL in various
column types, and those imposed by limitations of the XML standard itself.
You will find that this covers all printable characters used in all languages. The values excluded
from XML are control characters that are often non-printable and therefore redundant for
documentary purposes. For more information on what constitutes valid characters in XML, please
see https://en.wikipedia.org/wiki/XML#Valid_characters.
Where characters are used that are not within the acceptable ranges as per the XML 1.0
specification, the entire XML stream will be rejected.
A good example of this is Origin and Destination UNLOCO columns or any column containing an
ISO Country Code where the characters used are A-Z and in some cases for the UNLOCOs, 0-9.
Numbers are represented using European Digits, and weight, volume, and units of quantity use
units that are also represented using the Latin character set.
To best meet the business requirement for those fields, varchar columns are used. These limit
the character set that can be stored, but use half the storage space, and have increased
performance when indexed as the indexes are smaller too. Each character takes one byte in the
database. In CargoWise, we use code page 1252 for varchar columns. This includes the complete
Latin character set which meets the documentary requirements for international trade.
For fields where full multi-lingual support is required like Marks and Numbers (a box may have
identifying marks in any language), CargoWise uses nvarchar columns in the SQL schema which
allows the full Unicode character set. This allows both Latin characters (also known as Western
European language characters) and Extended Characters. These are recorded in the database
using an encoding which uses either two or four bytes to store each character but can store any
character from any language.
In the GUI you can tell which fields support Extended Character Sets by trying to type or paste in
text in a language using non-Latin characters. For fields that are limited to code page 1252, you
will see an error telling you that only western European languages are supported in that field.
Where a field supports the full Unicode character set, there will be no error.
If you try and import Universal XML containing Extended Characters into fields that do not
support them, you will not get any errors or warnings when processing. The characters will come
in as question marks indicating a character that was present in the data source but could not be
stored.
If you try and import "Boxed Hats (盒装帽子)" in both Marks and Numbers and Goods Description
using the XML shown below:
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S00001000</Key>
</DataTarget>
</DataTargetCollection>
</DataContext>
<NoteCollection Content="Partial">
<Note>
<Description>Marks & Numbers</Description>
<IsCustomDescription>false</IsCustomDescription>
<NoteText>Boxed Hats (盒装帽子)</NoteText>
</Note>
</NoteCollection>
</Shipment>
</UniversalShipment>
You will then see question marks (?) in place of each unsupported character where extended
characters are not supported. Where extended characters are supported, they will be imported
as they are shown in the XML.
When mapping XML into CargoWise, watch for unexpected question marks. This tells you that
there were characters in the inbound XML that were not supported in this location.
If there is a value in your XML containing Extended Characters that you need to have recorded
and there is no field that will accept it in CargoWise, you can import that value as a Note or a
Customized Field. Notes support Extended Characters in all modules, as do Customized Fields.
An example of where you could use this is where you have a partner sending you Universal
Shipments containing Consols they want you to process. When they send you their XML
messages, the Organizations they send would have their Organization Codes in them. They may
be completely different to the codes you use for the same Organizations in your own system.
If you have entered Code Mappings from their codes to your codes before the file is imported,
the correct Organizations will be saved in your CargoWise system even though the XML provided
had their codes in it.
Each Company in a CargoWise system will want the ability to determine their own set of Data
have their own set of EDI Trading partners. For this reason, there are actually two stages of code
mapping that occur. The first mapping is completed using the Target Company to map from the
supplied Data Source Code to the Data Provider Organization, then all other codes are mapped
using the mappings defined on the Data Provider Organization established in the previous step.
These steps are covered in more detail in the following sections. The process for entering Code
Mappings against an Organization is the same for Steps Three and Four, so it is only described
once using examples suitable for Step Four.
Native XML allows users to import directly from file using options in the Action button for all
modules supporting Native XML. Universal XML allows System Administrators to queue Universal
XML for processing in the EDI Messages module using an option under the Action button there.
(Intended for debugging purposes only)
For both forms of XML, the Target Company will be the Company the user is logged into when
importing from file.
xHub and eAdaptor SOAP
When XML messages are sent into CargoWise via xHub or eAdaptor SOAP, the interface requires
a Company to be specified. The first active Branch found against the Company specified is
recorded against any resulting EDI Message. This can be seen in the EDI Messages module in the
Branch column.
Neither of these channels have an implicit Company context. If you are using these channels, you
must include the Target Company context in the XML message content as described in the
following section. If you don’t specify a Target Company, a random Company will be used for the
initial stage of Code Mapping.
For Universal XML, the DataContext is included in the first top level element as follows.
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>AsycudaManifest</Type>
<Key>MAN0000066</Key>
</DataSource>
</DataSourceCollection>
<Company>
<Code>DAU</Code>
</Company>
<EnterpriseID>HYE</EnterpriseID>
<ServerID>CMT</ServerID>
<DataProvider>HYECMTDAU</DataProvider>
</DataContext>
• OwnerCode – Identifies the Owner or Provider of the data, becomes the Data Provider
Foreign Code for Code Mapping
• EnableCodeMapping – Boolean value that must be included with a value of ‘true’ for Code
Mapping to work.
You can see both of these elements in the sample XML provided on the previous page.
• DataProvider - Contains the Data Provider Foreign Code for Code Mapping
• CodesMappedToTarget – Optional Boolean element that can be used to disable Code
Mapping in Universal XML. If ‘true’, no code mapping will occur.
You can see the DataProvider element in the sample XML provided on the previous page.
CodesMappedToTarget is included at the same level as the DataProvider element where
required.
You can see in the screen shot above that if the Data Provider for Imported XML was the
Organization AUSBEAMEL, the Organization codes ABC, DEF and GHI would be translated to
A1CHEMSYD, DE50IMHAM, and GAAEMEMEL as the XML was imported. There are many different
types of coded lists that can be translated upon import using CargoWise. To see a full list of
mapping types available, click on the drop-down menu in the Relationship column.
You can see that the Data Provider Organization used for code mapping is identified, and all
codes mapped are shown as well.
There are two reasons for this, the first is performance. Validating incoming data costs
processing effort and hence time. Data being sent in via XML has generally already been
validated by the Middleware that has mapped the data in from the source format. Validating
already validated data is a waste of processing resources reducing the maximum possible speed
attainable. This is doubly redundant when you consider that validation will also occur in the User
Interface.
The second is expediency, or the quality of being convenient and practical despite possibly
being improper. In production, operators would not want a 10,000-line Commercial Invoice
Import to be stopped because the Currency was missing when it can easily be added by a user
before it is used on a job. Even if there was a problem with a value on every line, users can use
the Bulk Update functionality to correct the data in bulk once it’s in the system.
Not being able to get correctable data imported can cost many hours of manual data entry when
nobody technical is available to fix the source data. Operators are very good at fixing this kind of
data, so it’s best to let them do it without having to obtain assistance. There is a requirement to
validate, but that only needs to be done before the data is used in an operational module.
In all modules, when a user tries to edit an entity created by an import that has missing or
incorrect data, validation will tell them what is wrong and make them correct it before they can
save. Users can either make an informed decision on how to fix appropriately or leave the entity
unsaved and escalate to their team leads for fixing.
This happens naturally in operational modules as users try and process jobs within those
modules. For reference modules, operational modules consuming the data will validate their own
specific requirements when the data is selected for use. This will force users to fix and update
these as the reference data is consumed.
When an element is included with a value, it will replace whatever is in the target field for that
element. When an element is included with no value (i.e., blank or empty value), then the target
field will be overwritten to blank. When an element is not included in the XML, the corresponding
target field will be left alone. The value will not be changed or affected.
We call this an Authoritative Update process. The incoming XML is accepted as the most current
authority for the target being updated. This does not necessarily mean it has ALL the information
that the target may contain, but all elements included in incoming messages are treated as the
authority on what the current target will become.
The below UniversalShipment will update Forwarding Shipment S00001000 to match the
information it contains:
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S00001000</Key>
</DataTarget>
</DataTargetCollection>
</DataContext>
<GoodsDescription></GoodsDescription>
<GoodsValue>0.00</GoodsValue>
<IsCancelled>false</IsCancelled>
<Currency>
<Code>AUD</Code>
<Description>Australian Dollars</Description>
</Currency>
</Shipment>
</UniversalShipment>
Provided that Forwarding Shipment S00001000 exists, every element of this message will be
used to update it. Regardless of what they were prior, the Goods Description will be changed to
be blank, the goods value will become 0.00, the shipment will be marked as not cancelled and
the currency will become AUD.
The content in this section is no longer being updated and will be deleted as we move
towards the Native XML Guide. For more current information on Native XMLs please refer to
the Native XML Guide in WiseTech Academy.
4.1 Concepts
Native XML schemas are generated from the SQL DB schema used by CargoWise. When data is
read from and written to the DB, it is done using native SQL (no business layer). That’s why this
form of XML is called Native XML.
Why go Native?
1. As fields are added to the CargoWise schema, they are automatically included in the Native
XML Schemas.
2. Going direct to the DB bypasses business process and validation enabling a:
a. Higher level of performance due to less overhead.
b. Get the data in and allow the user to fix approach.
This does mean that as we change our SQL DB Schemas you will need to test your interfaces as
you update your software. Make sure you have an adequate test and release pattern as
described in previous chapters.
There are a number of common design patterns used in the Native XML schemas. These are
explained below.
4.1.1 Namespace
The namespace of all schemas defined by the Native XML architecture is:
http://www.cargowise.com/Schemas/Native/2011/11
As described in previous chapters, this does not change unless we make a major breaking
change to our schemas. An example of a breaking change would be moving or removing sections
of our XML. Adding new elements is not a breaking change and can happen any time you choose
to upgrade your CargoWise system.
The common schema includes definitions of the common types and attributes, which are
discussed later in this document. Currently this schema includes:
• Native<Description>.xsd
This means that you can always obtain a full set of XSD schema files that exactly match the
version of CargoWise you are running.
You will then be prompted to select a destination folder, and the schemas will then be generated
and saved in the selected folder.
</xs:complexType>
If the candidate key involves a field on a related object, the field name will be prefixed with that
table/data item name as shown here:
<!-- Candidate Key: Buyer.Code + OwnersReference -->
The values that make up these candidate keys are included as for any other data element in the
schema.
CargoWise will identify the foreign key relation by external entity type and provide enough
information to allow identification of the related item.
Depending on the definition of the external entity, CargoWise may provide only the candidate
key or the whole external entity.
An example is shown below with a ClosestPort as an External Entity to the OrgHeader entity.
<OrgHeader>
...
<Code>BRAPHI</Code>
<ClosestPort name="ClosestPort" table="RefUNLOCO">
<Code>AUMEL</Code>
</ClosestPort>
...
</OrgHeader>
Elements from a parent with no Action attribute will only be used to obtain a candidate key to
identify an existing record at that level. In the case of an Organization this means that it would
use the Code to identify an existing Organization but would not then update the Name.
It is important to note that every item within the hierarchy of that entity set contains an Action
attribute. This attribute defines what operation to perform on that single data item only. Actions
are:
• Insert
• Update
• Merge
• Delete
Action attributes are not inherited, meaning that to delete an item all children must also have the
Delete attribute applied.
If a table has children that are not defined in the entity set, the system might reject the entity
deletion.
Every item that has an action of either ’Delete‘ or ‘Update‘ must contain an element that is a valid
candidate key for that data item. A candidate key could contain multiple columns according to
the definition of a given table. If there is more than one candidate key in the item, the system will
randomly choose a valid candidate key to find the item. There are very few tables with more than
one candidate key. Following is a simple example of updating an item with candidate key:
<Native xmlns="http://www.cargowise.com/Schemas/Universal/Native/2011/11">
<Body>
<Organization>
<OrgHeader Action='Update'>
<Code>ZAYZUBBNE</Code>
<FullName>Zayden Zubin</FullName>
</OrgHeader>
</Organization>
</Body>
</Native>
The two XNDT Web Service options are covered in the 2.6 XNDT Web Service Interface section
earlier in this guide.
This Interchange envelope is removed when the Interchange is processed and split up into EDI
Messages. Like an ordinary envelope, one interchange can contain multiple XML messages, upon
processing each contained message will become one EDI Message.
There is an XSD schema for the Universal Interchange included when you export the schemas as
described earlier ion this guide. The Universal Interchange XML in its most basic form looks like
this:
<?xml version="1.0" encoding="utf-8"?>
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.0">
<Header>
<SenderID>ABCDEFGHI</SenderID>
<RecipientID>CARGOWSYD</RecipientID>
</Header>
<Body>
<!-- Insert Payload Here -->
</Body>
</UniversalInterchange>
You can generate your own sample XML to see how this works by exporting Native XML from one
of the modules supporting Native XML. Many of the modules under Maintain > Reference Files in
CargoWise support Native XML, for this example we will use the Containers module. Open a
Container and Export as Native XML as shown in section 4.3.1 Manually Exporting Native XML .
The Code element will be used for matching to the existing Container row, and the Description
element will update the description on that row. You can see for the example above the word
‘purpose’ has been replaced with ‘porpoise’ so you can see a change made when the update
occurs.
Now you need to wrap the Native XML in a Universal Interchange so that it can be sent in via the
eAdaptor SOAP interface. Take the Universal Interchange sample and insert the Native XML in
place of the “<!-- Insert Payload Here -->” element.
<?xml version="1.0" encoding="utf-8"?>
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.0">
<Header>
<SenderID>ABCDEFGHI</SenderID>
<RecipientID>CARGOWSYD</RecipientID>
</Header>
<Body>
<Native xmlns="http://www.cargowise.com/Schemas/Native/2011/11" version="2.0">
<Header>
<OwnerCode>CARGOWSYD</OwnerCode>
<EnableCodeMapping>true</EnableCodeMapping>
</Header>
<Body>
<Container version="2.0">
<RefContainer Action="MERGE">
<Code>20GP</Code>
<Description>Twenty foot general porpoise</Description>
</RefContainer>
</Container>
</Body>
</Native>
</Body>
</UniversalInterchange>
You now have Native XML wrapped in a Universal Interchange envelope ready to send in via
eAdaptor SOAP.
You can see the incoming EDI Interchanges and EDI Messages in their respective modules in
CargoWise under Maintain>System as shown below.
Refer to our learning unit 1COR193: How do I check data imports through EDI Messages?
In order to have Native XML messages imported in a timely manner, ensure you have the NMI -
Native Messaging Inbound service task active and running.
As messages are processed, the status on each message will change to one of the following:
Status Description
WAR – Processed with Warnings Message was processed with minor non-fatal issues. The
message was able to be imported into the target module.
ERR – Processed with Errors Message was process with data loss that should be
checked/reviewed. The message was able to be imported
into the target module but with some data loss.
DCD – Discarded – No Match Message was well formed but there was no matching job,
Found module or entity to import against. The message was not
able to be imported into a module.
Double click on a message in the module grid. You will see the detail of the message including the
XML itself and the processing result as a status code.
You can see that the Interchange wrapper has been removed when the XML transitioned from
the EDI Interchanges module to the EDI Message module.
In the above example, a Container was updated with the contents of the imported XML file.
You can also see when an update was made on the Container that was updated. If you open the
Container Type with a local code of 20GP in the Maintain > Reference Files > Containers
module, you will see a DIM Event on the Logs tab showing when Container data was imported.
The error above says, “The value violates the MaxLength limit of the column”. This was because in
this example, the container name in the XML was extended to well beyond the maximum
allowable number of characters. There are many different reasons for message rejection, but
there should always be a message indicating what the problem is.
• A Workflow Trigger configured on that entity that responds to that type of Event
• A Trigger Action on that Trigger that sends Native XML to a Recipient Organization
• An EDI Communications Mode on the Recipient Organization that says how to send the
XML (eAdaptor or xHub web service interface)
• An Event logged against the entity you want to send. Adding the Event starts the process
• The LWK (Log Walker) Service Task running to process the Workflow Trigger and Action.
(generates and queues the XML as EDI Messages/Interchanges for sending)
• The EAM (eAdaptor Outbound Messages) or EHO (xHub Outbound Messages) service task
running. (sends the queued XML from CargoWise via the nominated web service interface)
With all of these things in place, Native XML data can flow automatically in response to Events
raised in CargoWise through eAdaptor SOAP or xHub.
Workflow responds to Events by firing Triggers and closing Milestones which can both have
Trigger Actions on them. Trigger Actions cause automated functions to occur, one of them being
sending Native XML. All of these entities are pre-configurable on Workflow Templates so that
when a new entity or job is created, the Workflow Automation Configuration is populated from
those Templates.
Normally you would configure Workflow Triggers and Trigger Actions using Templates as those
will populate to all new entities automatically. For this example, we will create the Workflow
Configuration on a single Organization to demonstrate how Events, Triggers and Trigger Actions
work together with EDI Communications Modes to send Native XML.
Go to the Maintain > Reference Files > Organization module and open an Organization that you
would like to send. Select the Workflow & Tracking > Triggers tab and add a Trigger in the top
grid, and a Trigger Action in the bottom grid.
Figure 55 Workflow & Tracking > Trigger tab Completion Trigger Actions
Trigger > Description: (Action Authorized) Identified the sending Trigger, is included in the
outgoing XML in the TriggerDescription element of the DataContext.
Trigger > Event Code: (ATH) Identifies the type of Event the Trigger will respond to.
Trigger Action > Recipient: (ORP) The Organization Type to send the XML to. In this case it is set
to Organization Proxy which is the Organization associated with your registered Company in
CargoWise.
With the above configuration, when an ATH Event is logged against this Organization, Native XML
will be sent to the Organization Proxy.
Record the Company code showing on the Trigger created. This will be used to find the right
Company Org Proxy.
Refer to our learning unit 1PRO008: How do I create an XML file Trigger Actions in a workflow
template?
EDI Communications modes are the EDI equivalent of a list of Contacts with Phone Numbers on
an Organization. When you want to call a company, you look for a Contact that has a matching
Title depending on the purpose of your call. Then you take the phone number for that contact
and call them.
When you choose to send XML, CargoWise looks for an EDI Communications Mode on the
recipient Organization with a matching Sending Module, Data Type, and Purpose Code. Where a
match is found, the XML is sent using the Communications Mode (eAdaptor or xHub) and
Recipient ID (Address) from the matching Communications Mode.
You will see the Organization Proxy as shown above on the Company form. Click on the field to
select it, then press the F3 key to edit the Organization. This will be the Recipient Organization
when the Workflow Trigger Action is executed.
Module: (ORG) Matched to the source module for the data. Organizations.
File Format: (XML) Matched to the form of data we will send. XML or ALL match with Native XML.
Message Purpose: (blank) Matched to the purpose of the data being sent. (Blank means ‘Any’)
Comm. Transport: (EDP) Specifies the transport layer used to send. (eAdaptor/xHub)
Recipient ID: (My3rdPartySystem) Used for Recipient Addresses, is included in the Universal
Interchange in the RecipientID element. Also included in the ClientID attribute on the SOAP
Message element.
Email Subject: Value included in the EmailSubject attribute on the SOAP Message element.
File Name: Value included in the FileName attribute on the SOAP Message element.
Once you have this setup as shown, click the Save & Close button, and go back to the
Organization that you are trying to send.
Refer to our learning unit: 1PRO012 - How are Events automatically logged?
In this example, we will add an Event manually to demonstrate the process. Ideally, your
production system should be configured to use events that are already automatically logged in
the entity you are sending from.
Go to the Workflow & Tracking > Events tab of the Organization you are sending, right-click on
the Events grid and select Add New Event.
Figure 58 Workflow & Tracking > Events tab > Add New Event
Enter ATH as the Event Code, then click the Add Event button.
Save your changes. Now that you have an Action on a Trigger that has been triggered by an
Event, Workflow Automation will send a Native XML message via eAdaptor.
To check if the event has been exported, double-click on the LWK service task in the Maintain >
System > Service Tasks module, then click on the Log Files tab. You will be able to see these two
logs when your Event has been processed:
You may see other events depending on what level of logging you have configured on your
service tasks, but the two logs mentioned above mean that your event was successfully picked
up and processed. If your Trigger Action and EDI Communications Modes are configured
correctly, you will then see an EDI Message and an EDI Interchange ready for the EAM service task
to send out.
After selecting appropriate filters and clicking the Find button, you will see any Native XML that
have been exported but not sent with a status of AQU – eAdaptor Queued. This means they are
now waiting to be picked up and processed by eAdaptor.
In this example, the service tasks were running, so the message had already been picked up
and sent.
Double click on the EDI Interchange to see the content of the Interchange. Within the View
Interchange window, click on the Save Body to Disk button to save a copy of the Interchange
sent.
In the example above, you can see the start of the Universal Interchange wrapping the Native
XML (highlighted in blue).
Refer to our learning unit 1COR193: How do I check data imports through EDI Messages?
If there is a problem, you may see an error or exception. If you click on the row with the error or
warning showing, you will see more information on the cause of the problem at the bottom of the
form.
If you see an exception reported like this, it will generally be an exception thrown by your
eAdaptor SOAP Service Implementation, not by the service task itself. External exceptions
are logged here as an aid to development, but that does not mean the problem showing is
caused by the eAdaptor Service Task itself.
After selecting the Export as Native XML option, you will see a save file dialog where you can
change the file name and select the location to save the Native XML file.
Click on the Save button after setting the file name and file path. A dialog will display the status
of the export process. A system prompt will display when the export is complete; click on the OK
button to continue.
Click on the Import button to select the XML file you want to import. You will be prompted to
select a file to import.
During the import, if the XML file contains multiple entities, for example multiple organizations or
multiple airlines etcetera, each entity is saved to the database separately. This means that if an
error occurs in a single job the other jobs will still be saved to the database.
You can enter these code mappings against any Organization in CargoWise through the
Organization module as shown below. From within the Edit Organization window, go to Details >
Config > EDI Code Mapping, then create an EDI Code Mapping for the Organization:
In example above, we have added a mapping for Port Codes so that where ABC is provided, it will
be mapped to ZAAAM. This mapping will come into effect when the OwnerCode supplied maps
to the Organization the mapping is entered against. In this case, it would be the Organization with
a code of YOUUNICHI.
After the above Code Mapping is created, the foreign code can be used when updating the entity
via Native XML.
For Code Mapping to take place, you must include the OwnerCode element in the header along
with the EnableCodeMapping element so CargoWise knows it should perform Code Mapping, and
which Organization it should get the Code Mapping configurations from. Below is an example to
update using the ’ABC‘ code we mapped above:
In the above example, the Native XML importer will translate ABC to ZAAAM and update the
corresponding record.
If EnableCodeMapping is true, the Local code used in CargoWise will be shown in the response
message where applicable:
<Native xmlns="http://www.cargowise.com/Schemas/Native/2011/11"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Status>Accepted</Status>
<EntityInfo>
<Name>UNLOCO</Name>
<LocalCode>ZAAAM</LocalCode>
<ExternalCode>ABC</ExternalCode>
</EntityInfo>
<Information>
<Item>Information - UNLOCO - 0 inserts, 1 updates, 0 deletes </Item>
</Information>
</Native>
Code Mapping also works on the OwnerCode itself. This allows you to map OwnerCodes supplied
by external systems to Organizations within CargoWise. Mappings at this level are entered on the
Company level Organization Proxy for the Company you are logged into and are applied before
trying to find the Organization that contains the EDI Code mappings for the rest of the elements.
Refer to our learning unit 1COR224 - How do I setup EDI Code Mapping?
If an Organization Code is supplied in the incoming XML, it is treated as an external code, not the
code to be used in CargoWise. A Code is generated and used for the import. Then if the import is
successful, a Code Mapping record is created linking the external code to the generated code on
the Organization itself. This mapping can then be found on the EDI Code Mapping sub tab
described above on the Organization found using the OwnerCode.
If you do not want the Organization Code to be generated and mapped as described above, you
must include the EnableCodeMapping element with a value of ‘false’ as shown below:
This will disable Code Mapping, which also turns off Organization Code Generation. Without Code
Mapping there would be no way to keep track of the link between externally supplied codes and
their internally maintained equivalents.
If you want to specify your own Organization codes when creating Organizations using Native
XML, you should disable Code Mapping as described above.
To assist with development, a list of all fields that use code lists is shown below. A number of lists
are hard-coded, in which case the exact values are provided, while a number come from the
system registry which can be accessed through the CargoWise application.
The development of a web service to retrieve the values of a registry or database defined
code/reference data list will be considered in Phase Two of the Native Data Transfer project.
This field name will map to a field name within the entity set generated Xsd/Xml. As mentioned
previously, the only difference is that prefixes have been removed.
An example is shown below:The field OH_FullName will exist in the entity set schema as
FullName.
Go to Maintain > System > Registry then open up the sub-tree System > Custom Defined Note
Types.
When a Note is imported via Native XML, the Note Type Description from the <Description>
element is used to try and find a Note Type in the registry for the target module. If the Note Type
is found in the Custom Defined Note Types registry item for the target module, or it matches a
pre-existing System Defined Note Type, and the Text Only flag is set for that Note Type, then that
is imported as a Text Only note.
For all other cases including notes with a Custom Description, the note will be treated as a Rich
Text Note. The registry item above affects Native XML and the GUI in different ways, but they
both have different behaviors for Plain Text and Rich Text notes.
When that is selected, you will see that above the text box where you type your note, it says the
note is Text Only. This is the simplest way to tell which Note Types/Descriptions are Text Only.
You will see that there is no formatting available, and all you can enter is plain text.
When you select the Internal Work Notes note, the text entry section at the bottom of the form
changes to allow you to select fonts, colours, styles, and insert pictures.
When you turn on the Custom flag on a note, you are allowed to enter any Description/Note Type
you like as long as it doesn’t match a system defined note type. All Custom Notes are
automatically Rich Text notes.
The NoteData element is not used in this case and will be empty.
The NoteText element is not used for Rich Text Notes. The base64 encoded rich text in the
NoteData element shown above looks like this after it is base64 decoded.
\pard\f0\fs20\lang3081 You can really stack these 6 high. Space with a pallet for
shipping.\f1\lang1033\par
When importing Notes, make sure you put the data in the right element for the Note Type
Description you are using with the right encoding. If in doubt, create a note of the type you want
to Import in the module you want to target, and export the XML to get a sample of how the
import file should look.
As Native XML was designed for working with internal Reference File datasets, you will find most
of the associated modules under the ’Maintain‘ module tab within CargoWise. The schemas
themselves are obtained from your own copy of CargoWise following the instructions found in
section 3.1 Obtaining Current XML Schemas.
The Airline Dataset is related to the Airlines Master File which contains a list of all of the Airlines
used in the International Forwarding, Customs and Rating modules. There is no single unique
natural key for this table as none of the codes representing airlines are both mandatory and
unique.
4.7.1.2 CommodityCode
Schema File – NativeCommodityCode.xsd
The CommodityCode Dataset represents user defined categories of goods used across the
majority of modules in CargoWise. The natural key for this table is [Code], this is guaranteed
unique in the database.
4.7.1.3 Container
Schema File – NativeContainer.xsd
The Container Dataset represents user defined types or categories of Containers. This is used for
all types of Containers including ULDs. The natural key for this table is [Code], this is guaranteed
unique in the database.
Currencies are very rarely read or updated without referring to the associated exchange rates.
For this reason, Currency and Exchange Rate are all part of the one dataset. The dataset consists
of a list of Exchange Rates with a related Currency for each, along with the Company that the
exchange rate is related to. Both the Currency and Company are required values and are
identified using Code element from each.
4.7.1.5 DangerousGood
Schema File – NativeDangerousGood.xsd
The Dangerous Goods Dataset contains a set of standardized UNDG information that is used
across most modules within CargoWise.
There are two separate natural keys for this table, [Code] and [UNNO + Variant]. The two keys are
actually equal to each other, if you add UNNO and Variant, you get the value present in the Code
and vice versa. If you are sending in updates you will need to make sure you follow this pattern
and update both keys with the same value for the system to work properly.
Most interfaces only use this dataset as a lookup, when reading you can query by either key
without worrying about the other one. Both keys will of course be present in the resulting data.
4.7.1.6 Organization
Schema File – NativeOrganization.xsd
The Organization dataset contains everything that a user can configure against an Organization in
CargoWise. This is quite a large dataset and has a few aspects that you will need to understand
to work with it effectively.
• Org. Code Generation – When you change the detail on an Organization in the CargoWise
user interface, by default the ’Code‘ used to identify the Organization is re-generated using
the first three letters of the first word of the company name, followed by the first three
letters of the second word of the company name, followed by the last three letters of the
UNLOCO for that Organization. This same functionality works when importing Organization
data using Native XML. As a side effect, this makes the Company Name and Closest Port
elements mandatory when creating a new Organization. Without these values, the code
cannot be generated, and the import will fail
• Keys and Code Mapping – The natural key for this Dataset is the Code, but if Code
Mapping is enabled using the OwnerCode and EnableCodeMapping elements in the Native
If you open any Organization in the GUI that has either the ’Receivables‘ or ’Payables‘ flag set on
the main tab and select Actions > Export as Native XML from the menu, you will see the patterns
described above so you can better understand how they work.
4.7.1.7 ServiceLevel
Schema File – NativeServiceLevel.xsd
The Service Level Dataset represents Service Levels/Agreements used across the majority of
modules in CargoWise usually in conjunction with Rating. The natural key for this table is [Code],
this is guaranteed unique in the database.
4.7.1.8 Vessel
Schema File – NativeVessel.xsd
The Vessel Dataset is related to the Vessel Master File which contains a list of all of the Ocean
and Seafreight Vessels used in the International Forwarding, Customs and Rating modules. The
natural key for this table is [Code], this is guaranteed unique in the database.
The Country Dataset is related to the Country Master File which contains a list of Countries
identified by their two character ISO codes. The natural key for this table is [Code], this is
guaranteed unique in the database.
4.7.2.2 UNLOCO
Schema File – NativeUNLOCO.xsd
The UNLOCO Dataset is related to the UNLOCO Master File which contains a list of Locations
identified by a five character UNLOCO. The natural key for this table is [Code], this is guaranteed
unique in the database.
4.7.3.1 AcceptabilityBand
Schema File – NativeAcceptabilityBand.xsd
The Acceptability Band Dataset is related to the Acceptability Band Master File used for
configuring Acceptability Bands for use on Buffer Boards. The natural key for this table is [Name],
this is guaranteed unique in the database.
4.7.3.2 BMSystem
Schema Filename – NativeBMSystem.xsd
CargoWise Module – Maintain > Performance Management > Buffer Management Systems
The natural key for this table is [Name], this is guaranteed unique in the database.
The natural key for this table is [Code], this is guaranteed unique in the database.
4.7.3.4 TagRule
Schema Filename – NativeTagRule.xsd
The natural key for this table is [Name], this is guaranteed unique in the database.
This dataset contains Workflow Template configuration data, which is used to setup default
workflow automation setups in new jobs and entities across CargoWise. The natural key for this
table is [Name], this is guaranteed unique in the database.
This dataset contains information about Companies licensed to used CargoWise that is present
in that Company’s CargoWise instance. The natural key for this table is [Code], this is guaranteed
unique in the database.
CargoWise Module – Maintain > User Admin > Staff and Resources
This dataset contains basic information from the Staff module within CargoWise. Please note that
this does not include the user security tree controlling what a user has access to, but it does
include the groups they belong to (recommended way to control security). The natural key for
this table is [LoginName], this is guaranteed unique in the database.
4.7.6 Other
4.7.6.1 Product
Schema Filename – NativeProduct.xsd
CargoWise Module – Maintain > Customs > Customs Files > Products
This dataset contains Product information that is used by the Customs modules for classification
information, and Warehouse modules for identifying and tracking inventory. Matching to existing
Products is done using a combination of the PartNum and Organizations identified in the
OrgPartRelationCollection.
4.7.6.2 Rates
Schema Filename – NativeRate.xsd
CargoWise Modules –
As you can see from the list of modules above, the Rate Dataset covers most of the modules in
the Tariffs & Rates product area. That is possible as all of these modules share a common table
structure, and the Native XML engine works from table structures, not the coded business
objects the modules themselves use.
The RateType and RecipientRole elements contained within incoming Native Rate XML determine
which module will be targeted when the dataset is imported.
Refer to the following update notes for more information regarding Native Rate XML.
3 Feb 2015 - Rates Automated Native XML
4 May 2016 - Rates Automated Native XML – Base Company Tariff
Some Countries Customs Authorities choose to send periodic statements for deferred and client
settlement accounts which are managed in the modules listed above. These can be exported
using the Native CusStatement dataset where clients want to make this data available in a
secondary system.
The content in this section is no longer being updated and will be deleted as we move
towards the Universal XML Guide. For more current information on Universal XMLs please
refer to the Universal XML Guide in WiseTech Academy.
5.1 Concepts
5.1.1 Overview
Universal XML schemas are CargoWise schemas that apply across multiple areas or modules in
CargoWise. Unlike the Native XML schemas, which contain every piece of data available from that
reference module only, Universal XML schemas contain information from multiple areas in
CargoWise represented in a more generic and universal data structure.
The advantage of the ‘Universal’ approach we used defining our Universal XML schemas is that by
mapping your data into one common schema, you can import into and export from many
different areas or modules within CargoWise.
Universal XML schemas include all possible fields from all modules that have been mapped, so
the schemas are quite comprehensive. At first glance, the schemas seem quite large, but we do
not duplicate the same fields twice on any element, and we only include elements mapped to or
used in a particular module when exporting data. Although the schemas are broad to cover all
modules, the datasets are smaller than the schemas tend to indicate.
Universal Event - These are used to record and publish events that occur in the life of a given
job or entity. They contain an Event Type, the date the event occurred, or in the case of an
estimated event, the date the event is estimated to occur on. They also contain a list of ‘Context’
values that identify what the event applies to and provide supplementary information about the
event.
Universal Activity – Represents the operational entities from the PAVE modules including the
Customer Service Ticket, Project, and Work Item modules.
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>ForwardingShipment</Type>
<Key>S00001006</Key>
</DataSource>
</DataSourceCollection>
<ActionPurpose>
<Code>APP</Code>
<Description>As Per Payload</Description>
</ActionPurpose>
<Company>
<Code>SAM</Code>
<Name>Sample Company Inc.</Name>
</Company>
<EnterpriseID>CGW</EnterpriseID>
<EventType>
<Code>AED</Code>
<Description>All Export Documents Received</Description>
</EventType>
<ServerID>SYD</ServerID>
<TriggerCount>1</TriggerCount>
<TriggerDate>2011-06-07T09:46:17.433</TriggerDate>
<TriggerDescription>EXPORT DOCS RECEIVED</TriggerDescription>
<TriggerType>Trigger</TriggerType>
</DataContext>
The elements shown above are broken into functional groups as described in the following
sections.
The combination of these elements can be used to globally identify the source of any Universal
XML. The Enterprise ID and Server ID uniquely identify a particular system, and the Company
Code plus DataSource identify the source entity within that system
If there is only one DataSource in the collection, then the Universal Shipment contains data from
that data source in CargoWise including all child and related Universal Shipments. A good
example of this would be a Forwarding Consolidation with a collection of all its child Forwarding
Shipments in the SubShipmentCollection.
Additional DataSource elements can be added on the Top Level DataContext element. (i.e., not in
DataContexts on Universal Shipments in the SubShipmentCollection) When this happens, it
means that a subset of data has been exported from CargoWise, not a complete set. The
additional DataSource elements identify the DataSource (or DataSources) of SubShipments that
contain complete data within the set.
An example of where this is used is for Forwarding Shipments where there is a parent
Consolidation. When a Forwarding Shipment is exported, the Top Level Universal Shipment will be
created using data from the Consolidation. The Forwarding Shipment itself will be included as a
Universal Shipment in the SubShipmentCollection. Any other Forwarding Shipments on the
Consolidation will not be included in the SubShipmentCollection.
In this case, the DataSourceCollection on the Top Level Universal Shipment contain a reference
to the Consolidation and the Forwarding Shipment, and the DataSourceCollection on the
Universal Shipment in the SubShipmentCollection will contain a reference to the Forwarding
Shipment. This setup allows you to tell which Shipments, Sub-Shipments, or even Sub-Sub-
Shipments contain complete data including all children.
The advantage of working this way is that when processing the incoming data, you know that you
always have all parent information. It doesn't matter if you export from a Consolidation, a
Shipment, or a Sub-Shipment, you always work with the same top down structure starting at the
top and including everything relevant to the level you are exporting. In the words of our Architect,
“It's Shipments all the way down”.
• <ActionPurpose> - This is taken from the Purpose field on the Trigger Action. This element
includes sub elements containing the Purpose Code and its associated description. New
Purpose Codes can be defined under Maintain > EDI Messaging > Purpose Code and allow
you to include an Intended Use or Purpose for the data you are sending
• <EventType> - On the Milestone, Trigger, or Exception, there is an Event field where you
can enter an Event Code. This element includes sub elements containing the Event Code
and its associated description
• <EventUser> - The user who added the Event that tripped the Trigger or Milestone. Allows
you to know who performed the action that resulted in the Universal XML being sent
• <TriggerCount> - Contains the number of times the Milestone, Trigger, or Exception has
been fired so far. The count starts at ‘1’ and increments for every export so you have a Send
Count or Data Version Number in the receiving system
• <TriggerDate> - Event time of the Triggering Event.
• <TriggerDescription> - The Description field from the associated Milestone, Trigger, or
Exception
• <TriggerType> - Contains either Milestone, Trigger, or Exception depending on the type of
Workflow entity the Trigger Action is defined against. TriggerType will be “Manual” when the
XML get generated by a user action using “Send Universal XML” option in CW.
• <Company> - Is the Company from the Trigger or Milestone that caused the Universal XML
to be sent. Each Trigger or Milestone in CargoWise has a Company Code against it in the
grid. For more information on Triggers and Milestones
Refer to our Workflow learning units for more information on the Workflow entities mentioned
above.
The combination of EnterpriseID + ServerID + Company.Code provides a globally unique code for
a particular Company within the target CargoWise installation. The Company Code is ignored
unless all three values are provided, and they match to a valid Company registered within the
target system.
Options 1 through 3 are useful when sending Universal Shipments from middleware applications
to CargoWise.
Option 5 is the fallback where none of the first four options are able to be applied.
The Branch selected will affect things like Job Number generation where the system is
configured to use the creating branch as part of a Job Number.
If you include the target Branch Code in the Universal Shipment XML, and the Company Code,
Server ID and Enterprise Code from the DataContext element match the target system, and the
branch code matches an active Branch, then that is the Branch that will be used when importing
that XML.
When importing the Universal Shipment, CargoWise attempts to match the ’Recipient‘
OrganizationAddress to an organization within the target system. If a match is found via Code
Mapping or Address Matching, and the matched organization is configured on a branch as that
branch’s Org Proxy, that branch will be used when importing the Universal Shipment.
Where no Branch is found using the Branch element or by using the ’Recipient‘
OrganizationAddress, then a Branch will be calculated using a combination of Recipient Role
elements from the data context collection, and the Ports present in the Universal XML.
This import will only match to branches on the target company when performing this kind of
match. If the branch does not exist against that company, then the system will move to the
next fallback.
Sending Agent (SAG), Export Broker (BRE) Port of Loading then Port of Origin
Receiving Agent (RAG), Import Broker (BRI) Port of Discharge then Port of
Destination
Arrival CFS (ACF), Arrival Carrier (ACR), Arrival CTO Port of Discharge
(ACT), Arrival Container Yard (ACY)
The last resort for Branch Defaulting is to pick a random active branch from the Company the
message was sent to. This functionality only exists as we need some sort of default for the
circumstance where none of the above matching options were successful. The only other option
would be to reject the message outright, which we do not consider a viable alternative as there is
then no way to get the data into your system.
The DataTarget in the DataTargetCollection is not used when sending data from CargoWise, but
is used when importing Universal Data into CargoWise.
DataTargets allow you to specify which module or modules should be updated by the incoming
data. Each DataTarget has a mandatory Type, which, like elements in the DataSourceCollection,
relates to a Module within CargoWise.
You can optionally include a Key in a DataTarget, but that is not required unless you want to
match to existing entities in that module by entity reference (e.g., job number).
More information on the matching process follows below in ‘Context Key Matching on Import’.
There are more forms of matching that can be used when updating existing data, information on
which keys are used in which module is detailed in the Module Mapping Guides.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found under in WiseTech Academy under Integration
Options – Mapping Guides
First, Code Mapping looks up the Company Org Proxy for the Company selected as described in
Targeting a Company above. If the DataProvider element is present, and the value is present in
the code mapping against the Company Org Proxy pointing towards an Organization, then that
Organization is used as a Code Mapping configuration source. If no Organization is found, then
the Company Org Proxy itself is used as a Code Mapping configuration source.
The CodesMappedToTarget element is used to indicate that Code Mapping is not required as the
codes provided already match those used in the receiving Company’s system.
More information on Code Mapping is available in section 4.4.1 EDI Code Mapping of this
document.
XML does not intrinsically describe cross relations between child elements. For this reason,
where relations between branches in the tree are required, we have used our own standard built
around integer based Link elements across Universal XML.
Cross relations utilize a Link element on the parent element with an integer value used to identify
that parent element uniquely within the file. These are not added to every element type, just to
those where there are other elements relating to these.
The child element in the relationship will have an element on it with the name made up of the
parent type being related to plus the suffix Link. Where the same integer value is present in a
parent's Link element, and a child's [ParentType]Link element, a relationship is implied.
Parent: OrderLine.Link
Child: CommercialInvoiceLine.OrderLineLink
The relationship implied may be one-to-one, it may be many to many. There is no change in
notation for either of these cases. The values used in Link elements are not persisted between
sends, but they are guaranteed unique per Parent Type within each serialized Universal XML
message.
Parent Children
OrderLine.Link CommercialInvoiceLine.OrderLineLink
PackedItem.OrderLineLink
AdditionalBill.Link InBondMoveDetail.AdditionalBillLink
Container.Link InstructionContainerLink.ContainerLink
PackingLine.ContainerLink
ContainerLink.Link * see Note 1 below
CommercialInvoiceLine.Link PackedItem.CommercialInvoiceLineLink
EntryInstruction.Link CommercialInvoiceLine.EntryInstructionLink
EntryHeader.EntryInstructionLink
PackingLine.Link InstructionPackingLineLink.PackingLineLink
Note 1: This particular case does not include the Parent Type as part of the Link element
name as this is a many to many relationship where the parent type itself is already named
ContainerLink. In usage, the ContainerLink.Link element is used in a collection on the
InBondMoveDetail describing the many to many relationship that exists between these two
entities.
Note 2: This was an early use of the Link functionality which was implemented before the
standard naming convention was settled on. The only kind of ‘Leg’ in the schema is the
TransportLeg, so it was deemed better to accept this exception to the rule rather than break
existing interfaces relying on the current state of affairs.
There is one notable exception to this default behavior which is the SubShipmentCollection. The
Shipments in this collection are only ever used to add or update existing rows, never remove
them. Partial SubShipment information is commonly provided in a Universal Shipment. For that
reason, this collection defaults to a ‘partial’ replacement where rows not included in the XML are
left as is.
Although all collections have a default behavior (either complete or partial update), some
collections allow you to specify on import whether the data you are providing is a complete
representation of the collection, or only a partial representation of the collection. This is done
using the CollectionContent attribute, which can have a value of either Complete or Partial.
By stating that the collection contains partial information, you are saying there may be other data
in this collection that you have not included, so rows you don’t include in the XML will be left
alone. If you define it as a collection with complete information, any rows present in the database
that are not included in the collection will be deleted.
The CollectionContent attribute is defined in the XSD on all collections that allow its use.
Where there is a natural key, elements supplied are matched to existing rows. Rows are updated
when a match is found, added when not found. Where rows exist with no match in the elements
from the collection, they are deleted.
Where there is no natural key, there is no way to match to existing data, so any existing rows are
deleted, then the elements in the collection are used to build new rows in their place.
Both of these complete replacement methods bring the data in CargoWise in line with the data
provided in the XML.
Where there is a natural key, elements supplied are matched to existing rows. Rows are updated
when a match is found, added when not found. Where rows exist with no match in the elements
from the collection, they are left as is.
Where there is no natural key, there is no way to match to existing data. As there is no way to
match to existing rows to update, and unmatched rows will not be deleted, in this case all
elements in the collection are used to create new rows. This is not an option to be used lightly, as
multiple sends with the same data will cause the same rows to be added multiple times.
Shipment.ContainerCollection ContainerNumber
Shipment.Order.OrderLineCollection LineNumber
For more specific descriptions of the natural keys used for collections, please refer to the Module
Mapping Guide for that module. These can be found on our myaccount web portal in the
CargoWise Technical Reference Guides section along with this document.
In the case of Packing Lines, there is no default behaviour. The Forwarding Shipment module
implements some very specific matching behavior which is described in the Update Note:
Updating multiple pack lines through Universal Shipment XML.
1. Using the Custom Fields tab on the Workflow Template configuration form (All modules at
the Shipment level).
2. For an Organization by defining a Customized Label configured from the Custom >
Customization tab. (Specific modules at various levels)
3. From the Custom Attribute settings in the Registry (Specific modules at various levels).
For more information on how to configure Custom Fields, Customized Labels, or Custom
Attributes, please see the relevant guides from WiseTech Academy.
All three types of Customized Fields are represented the same way in Universal XML. These are
represented as collections of CustomizedField elements, each containing a Field Name (Key) with
the Value and DataType elements to describe the content contained within.
• Shipment
• Container
• PackingLine
• TransportLeg
• OrderLine
• CommercialInvoiceHeader
• CommercialInvoiceLine
• Instruction
Importing follows the same logical sequence no matter which mechanisms are used. For each
Key and Value provided as part of a CustomizedField element, the steps below are followed:
1. Where Custom Attributes are available and there is an Attribute defined with the Name
matching the Key provided, the Value is imported as a Custom Attribute and nothing else.
2. Where Customized Labels are available and there is a Customized Label defined with the
Label matching the Key provided, the Value is imported as a Customized Label and nothing
else.
3. If Workflow Custom Fields are available, the Value is imported as a Custom Field regardless
of whether there is a Custom Field defined with the Name matching the Key provided or
not.
Workflow Custom Fields allow for values that are note configured to be stored, displayed, and
edited. For this reason, where Workflow Custom Fields are available, non-configured Customized
Field values can be imported. When values are removed in the GUI from non-configured
Customized Fields, the fields will no longer appear after the parent entity is saved.
This may seem strange considering CargoWise is a globally scaled logistics package with a
comprehensive International Freight Forwarding module built in. This was a design decision made
to facilitate interoperability with global data feeds and messaging systems.
The Universal XML interface is consistent with the application. This means that datetime
elements in Universal XML do not include a time zone offset on export. Any time zone offset
included within a datetime element in Universal XML being imported is ignored as there is no
place to store it.
In the airfreight domain, many types of FSU status messages do not have the time zone. Airline
departure and arrival schedules are published in the local time of each airport, or “port time” as
are Seafreight, Road and Rail schedules. Cutoff times, Availability times and Slot dates are all
published with no time zone as they are all tied to a port which infers the time zone.
If we required a time zone for all date and time based fields in CargoWise, we would not have
been able to integrate as many data feeds as we do. The question then arises, “How do we deal
with time zones for transit time calculations?”
In all International modules within CargoWise, for each date/time entered, there is a
corresponding location that is provided. The location relating to each date/time field infers the
time zone for that field. This means that the Time of Departure is entered assuming the time zone
of the Port of Departure, and Time of Delivery is entered assuming the time zone of the Port of
Delivery.
We use UNLOCOs to describe locations within CargoWise. If you need a UTC time, or a time
including the time zone, you can use the associated UNLOCO to calculate the time zone offset.
This offset can then be appended to the datetime to give a datetime with time zone offset or
subtracted from the datetime value to give a UTC time.
As an example, if the Port of Arrival was AUSYD (Sydney, Australia), the time zone offset would be
+10 and would be applied as follows.
Rather than continuing using transmission methods that by their nature introduce delays and
provide no guarantee of delivery or knowing when a delivery has failed, Universal XML is sent from
CargoWise using our eAdaptor web service interface.
eAdaptor provides an easy connection to our eHub Gateway. Previously we provided customized
data mappings for CargoWise systems by writing code which was then deployed as an upgrade.
This meant that an upgrade had to be run every time we added or changed a mapping. Now
those changes can be handled via xHub and updated without clients having to run an upgrade on
their CargoWise systems allowing us to respond more quickly to client's needs.
You can also configure eAdaptor to point to your own internal web service. Using the eAdaptor
SOAP web service interface, you can send Universal XML to a Local Web Service running
middleware technology like Microsoft BizTalk. This gives you complete control over routing and
mapping of data to meet your own or your client’s requirements, but you are then responsible for
creating and maintaining the mappings over time.
First, go to the Organizations module within CargoWise and open the Organization you want to
send Universal XML to. Make sure the Details tab is selected, then the Config sub tab, then the
EDI Communications sub tab.
In the EDI Communication Modes grid, you need to define for each Module and Universal Data
Type where the data is going (xHub or Local Web Service), and the Recipient Code that the
target Web Service can use to route your message if required. You enter this information in the
following fields as described below:
• Module – Must contain the Module Code the data is being sent.
• Comms. Direction – Always contains TRX for Transmit.
• File Format – This is where you enter the Universal Data Type. Commonly used options
here are:
• XUE – XML Universal Event
• XUS – XML Universal Shipment
The options change depending on which Module you have selected to indicate the
functionality available in that module; all Universal Data options have a description
containing ‘XML Universal’ and the data type.
• Message Purpose – This is an optional field, used when you want finer control over the
destination of data than Module and Data Type give. You can specify a Purpose Code on a
Workflow Trigger Action. When a Trigger Action is configured to send Universal Data,
CargoWise first looks for a match on Module + Data Type + Purpose Code, then falls back
to a row with matching Module and Data Type, but no Purpose Code.
• Comm. Transport – The two options you can select here are HUB - eHub Gateway and
EDP – eAdaptor Interface. If you try and select any other options, an error is displayed
indicating you can only send Universal Data via eAdaptor to xHub or a Web Service
implementing the eAdaptor Interface.
• Destination Address – When sending via the eAdaptor Interface or to xHub, you must
specify a Destination Address. This can be anything you like when sending to your own
eAdaptor Interface, but when sending via xHub must match the Destination Address Code
supplied by our internal eServices team so that xHub can process your data appropriately.
Rather than having to remember when to manually export operational data, using Workflow allows
you to pre-configure what conditions have to be met, or what event has to occur before
Universal Data will automatically be generated and sent. As timelines shorten, having operational
data pushed to all concerned parties as soon as possible is a major concern.
Workflow driven data exports remove the operator delay and error from the process. For this
reason, we recommend using Workflow wherever you can when sending Universal XML.
To test this, start by creating a Shipment as you normally would, then select the Workflow &
Tracking tab, then the Triggers sub tab. Add a Trigger in the Triggers grid at the top of the tab
with a Description and an Event code.
Refer to our learning unit 1COR172 - How can I send Universal XML for Testing Purposes?
Add an Action to your Trigger in the Completion Trigger Actions grid at the bottom of the tab. Set
the Action code to XUE (Send XML Universal Event), the Recipient to ORP (Org Proxy) and the
Purpose code to what you set the Message Purpose as in the Company Org Proxy Form.
Refer to our learning unit 1PRO008 - How do I create an XML file Trigger Action in a workflow
template?
Next, go to the Events sub tab and create a new Event by right clicking within the grid and select
the Add New Event option.
Figure 83 Workflow & Tracking > Events tab > Add New Event
Click on the Find button and you will see the event you just created. Click on the Save & Close
button to save the event.
You can export other forms of Universal XML from modules that support them by using different
Trigger Action Codes.
As long as your Service Tasks are running, the Event Log Walker Service Task (LWK) will process
the event and export it.
Refer to our learning unit 1PRO012 - How are Events automatically logged and can I create
them manually?
To check if your Service Tasks are running, go to Maintain > System > Service Tasks.
Use filters to search for the LWK Service Task and then click on the Find button. As you can see
below, the Event Log Walker Service Task is running, but currently idle.
To find the resulting EDI Message, go to Maintain > System > EDI Message. Use the filters, you
can see any events that have been exported with a status of AQU (eAdaptor Queued), which
means they are now waiting to be picked up and processed by eAdaptor.
When you use a Trigger Action with Action Code XUS, the LWK Service Task will pick up the
Universal Shipment and export it using the same process as with the Universal Event. It will show
the same log types on the Service Task similar to the Universal Event.
If you do this, then add another Event, then go back to the EDI Messages module, you will see a
Universal Shipment with a status of AQU waiting to be picked up and sent by eAdaptor.
Refer to our learning unit 1COR193: How do I check data imports through EDI Messages?
When you select this, the following window will appear. Manually enter the information
required to send Universal Data that would normally send from the Workflow module.
Click on the Send & Close button. Provided that EDI Communication Modes are setup correctly
under the Recipient Organization, the following prompt will display indicating the XML has been
successfully.
Refer to our learning unit 1COR143 - How can I manually send Universal XML files?
The Universal Interchange also allows you to optionally request processing result responses so
that you can monitor processing results in your middleware or send them back to external
systems. When requesting processing responses, you can specify the circumstances under
which you want a response (success/failure/both) and the channel/recipient you want the
response to be sent to.
Processing result responses are optional as there are a number of other ways you can monitor
message processing within CargoWise itself. These are described later in the following sections
covering Message Processing Logs and Notification Emails.
The Universal Interchange is required if you are using eAdaptor SOAP, but not required if you
are using eAdaptor HTTP+XML to send in Universal XML.
<EventTime>2016-11-30T13:52:03.153</EventTime>
<EventType>CMI</EventType>
<CreatedTime>2016-11-30T02:52:14.963</CreatedTime>
<IsEstimate>false</IsEstimate>
<ContextCollection>
<Context>
<Type>MBOLNumber</Type>
<Value>HBL85161TRN</Value>
</Context>
<Context>
<Type>HBOLNumber</Type>
<Value>423908</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
Taking the XML file, you would like to wrap, delete the “<?xml version="1.0" encoding="utf-8"?>” tag
at the beginning of the file (where present) then copy the remaining file using CTRL+A to select
all, then CTRL C to copy the content.
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.0">
<Header>
<SenderID>ABCDEFGHI</SenderID>
<RecipientID>HYEBENBEN</RecipientID>
</Header>
<Body>
<!-- Insert Payload Here -->
</Body>
</UniversalInterchange>
<EventTime>2016-11-30T13:52:03.153</EventTime>
<EventType>CMI</EventType>
<CreatedTime>2016-11-30T02:52:14.963</CreatedTime>
<IsEstimate>false</IsEstimate>
<ContextCollection>
<Context>
<Type>MBOLNumber</Type>
<Value>HBL85161TRN</Value>
</Context>
<Context>
<Type>HBOLNumber</Type>
<Value>423908</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
</Body>
</UniversalInterchange>
This allows you to create your own automated monitoring and alert system via your middleware
rather than monitoring XML processing using the EDI Message module in CargoWise.
The parameters specified in the Acknowledgement request element will be used when
processing each Universal XML message contained within that Universal Interchange. The
Acknowledgement element contains the following sub elements:
• SenderID – The EnterpriseID, ServerID and Company Code from the processing CargoWise
system
If the sample Universal Interchange XML shown previously was used to send a Universal Event
successfully, the Acknowledgement XML sent back would look like this.
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Header>
<SenderID>HYEDDEBEN</SenderID>
<RecipientID>MIDDLEWARE_RCV</RecipientID>
</Header>
<Body>
<UniversalEvent xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Event>
<DataContext>
<Company>
<Code>DDE</Code>
</Company>
<DataProvider>HYEBENDDE</DataProvider>
<EnterpriseID>HYE</EnterpriseID>
<ServerID>BEN</ServerID>
</DataContext>
<EventTime>2017-03-02T07:26:28.36</EventTime>
<EventType>DIM</EventType>
<ContextCollection>
<Context>
<Type>MyJobReference</Type>
<Value>BAT0000455347</Value>
</Context>
<Context>
<Type>DataImportLog</Type>
<Value>Linked Event to Shipment S00001000 (House Bill='FRED235478923').</Value>
</Context>
<Context>
<Type>ProcessingResultStatus</Type>
<Value>PRS</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
</Body>
</UniversalInterchange>
This is not a facility that is intended for use in your Production system.
Start by creating your Universal XML file with valid Universal XML content.
Click on the Actions drop down menu, select Add Inbound Universal XML Message.
When you select a valid sample file and click the Open button, you will see a system prompt
confirming the successful creation of your Universal XML EDI Message:
Then click on the Find button on the EDI Messages module search screen with the appropriate
filters you will see the EDI Message you have just created with a Status of QUE - Queued for
Processing.
Each Universal XML Message contained within the Body element will then be extracted out into
the EDI Messages module found under Maintain > System > EDI Messages. If the content type
(determined by the root element type) is recognized, there will be a Message Sub Type code on
each EDI Message row identifying the type of Universal XML contained in the message as shown
below.
Refer to our learning unit 1COR193: How do I check data imports through EDI Messages?
As messages are processed, the status on each processed message will change to one of the
following:
• PRS – Processed OK – The message was processed without issue and the data was applied.
• WAR – Processed with Warnings – The message imported and was processed with minor
non-fatal issues. Examples include over length data provided for elements and out of range
individual values.
• ERR – Processed with Errors – The message was processed and imported with data loss that
should be reviewed. Examples include not being able to import Job Costing data as part of a
Shipment and excluding chunks of data due to missing mandatory elements.
• DCD – Discarded – No Match Found – Message passed validation and is valid for import but
there was no matching job, module or entity that this data could be imported against or into.
Examples include not having a job that the supplied references match to, or not having a
DataTarget/Recipient Role included that indicates a module to be targeted.
• REJ – Rejected – The message was rejected without being processed. The message either
failed validation or was not valid for the CargoWise receiving system. Examples include
mandatory elements at the core of the XML provided were either missing, critical values being
invalid preventing the system from searching for a match, or there is a serious structural
problem with the xml provided that stopped our systems from being able to process the data
provided.
You can see from the above example that Forwarding Shipment S00043996 was updated with
the contents of the imported XML File.
If the XML was missing mandatory segments, or unable to be imported for any reason, any error
messages generated will show in this log so that you can see what is wrong with the incoming
message.
If you then open the related Business Object the data was applied to, and go to the Workflow &
Tracking tab, then the Events sub tab, you will see the Event that was logged as a result of the
data import.
Whenever you select an event that was created from a Universal XML import or export, you will
see all Context Information sent with the dataset showing at the bottom of the tab
For imported Universal Events, the Event Code on the Event will be the Event Code from the
incoming XML and the Context Information includes all items from the ContextCollection in the
XML. This is so that when Universal Events are generated from external sources, additional data
can be included with the Universal Event to help inform the users exactly what the event relates
to.
For all other types of imported Universal XML including Universal Shipments, Activities, and
Transactions, the Event Code will be DIM (Data Import), and the Context Information will contain
basic information about the data taken from the DataContext element and its contents.
For all Universal XML exported, there will be a DEX (Data Export) event with the same Context
Information showing at the bottom of the tab.
For all Events related to incoming and outgoing Universal XML, there is an area to the right of the
Context Information that gives basic information about the EDI Message that contains the data
that was imported, and a View button.
Refer to our learning unit 1COR193: How do I check data imports through EDI Messages?
If you specify a DataTarget Type, the module described by the DataTarget Type will always try
and import the data. For Universal Events this is not always possible as you must be able to find
an existing job or entity to apply an Event against. For other Universal XML types like the Universal
Shipment, Activity, or Transaction, if a matching job or entity is not found, a new one will be
created using the content of the incoming Universal Data.
Even where you specify a DataTarget pointing towards a module or modules, another unrelated
module may decide to use the data as well. It might decide to update a job or entity where data
relevant to that module is found in the incoming data that it doesn’t already have. An example of
this is Container Events where a single Universal Event with a Container Number and Master Bill
on it can match to jobs in the International Forwarding, Customs and Domestic Transport
modules.
There are three levels of fallback when trying to match to existing jobs or entities. The last level of
fallback will use one of two different matching methods depending on a registry setting and what
the target module supports. The first two types of matching are Job Number match, then Module
Specific Match (where implemented). The last type of matching used will either be Combination
Key matching, or Reference and Party ID matching.
Combination Key matching was found to give many false positive matches in Forwarding and
Customs modules due to the way references are used in those modules. For this reason, we
implemented Reference and Party ID matching. This matching algorithm yields far less false
positives as it requires a match on both a reference and its issuing party/organization.
It is recommended that you turn on Reference and Party ID matching in the registry,
especially if you are engaging in E2E Messaging with other CargoWise systems.
As an alternative to providing the EnterpriseID and ServerID in the DataContext element, you can
force job number matching by supplying the CodesMappedToTarget element with a value of
‘true’. This has the same effect as providing a matching EnterpriseID and ServerID in the incoming
data. Job numbers, entity codes, and other system specific codes will then be used for matching
even though the EnterpriseID and ServerID have not been supplied.
If the above criteria have been met, the DataTarget Type from each element in the
DataTargetCollection is used to decide which module to look in, and the Key from the DataTarget
provides the Job Number to search with. This means that a DataTarget with a Type of
ForwardingShipment and a Key of S00002847 would be matched to a Forwarding Shipment with
a Shipment Number of S00002847.
A good example of this is Master Bill + House Bill matching across the Forwarding Consolidation
and Shipment modules. These matches occur regardless of the value of the EnterpriseID,
ServerID and CodesMappedToTarget elements.
Where a process returns no matches, it is skipped, and the next process is engaged. If a process
returns multiple matches, the results are passed to the next process. The matching processes
are applied in order as follows:
• Reference Match Count – Looks for the entity with the most matching references, i.e.,
three matching references would beat two matching references. No weighting on the type
of reference is done at this point. If there are multiple entities that equal the highest match
count, those with the highest match count are passed onto the next matching process. If
there’s only one entity with the highest match count, that’s the match made. If there’s none
at this point, it means that there’s no entity in CargoWise with any matching references, so
no further matching occurs
The primary concept behind Reference and Party ID matching is that when you know who the
issuing party is for a reference, and you can match the issuing party as well as the reference to a
target entity, you have a very reliable match to that target entity. This form of matching is only
implemented for Universal Shipment XML as other forms of XML do not commonly contain the
OrganizationAddress based information used to identify issuing Parties.
As a secondary concept, where you have a reference provided in the incoming data, and that
same type of reference is present on a target entity, but the two values are different, that can be
seen as a ‘conflict’ and reduce the possibility of a match
Reference and Party ID matching is enabled using the eServices > Universal XML > Use
Combined Reference and Party ID Matching registry item. It is recommended that you turn this
option on, especially if you are engaging in E2E Messaging with other CargoWise systems.
Once enabled, in modules where Reference and Party ID matching has been implemented, the
system will try to match using Reference and Party ID pairs. Each module where this has been
implemented has its own set of References and Party ID pairs, along with scores for a Match,
BookingConfirmationReference Consignor 90 10 0
BookingConfirmationReference Consignee 90 10 0
InterimReceiptNumber Consignor 90 10 0
References from the Reference Elements that are six characters in length or longer are used to
build a list of entities where any of the references match. Scores are calculated for each
Reference and Party ID type, and they are added up for each entity. The entity with the highest
result is the match, although given the relative uniqueness of the references used, there is
generally only one entity matching by these references in a target system.
Not all modules support this method of matching. For modules that do not support Reference
and Party ID matching, Combination Key Matching will be used instead. For modules that do
support Reference and Party ID matching, you will find a Reference and Party ID scoring table as
shown above provided within the Module Mapping Guide for that module.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found under Integration Options – Mapping Guides
There is a registry item, eServices > Universal XML > Enable Verbose Logging that turns on
additional logging. Verbose Logging shows why a certain result was achieved, or how the result
was calculated, rather than logging just the result. This can be useful when trying to diagnose why
matches occur when importing Universal XML into CargoWise.
Verbose Logging registry item default behavior is set to ‘No’ as it adds a significant amount of
additional text to the Data Import Logs. This logging is only useful when you cannot work out why
a certain matching result has occurred.
The functionalities that can write Verbose Logs include the following.
• Organization Matching
• Universal Shipment Job Level Matching
• Universal Event Job Level Matching
• Branch Targeting
The Verbose Logs provide an additional insight into how these functionalities work in practice. It
is advisable to turn this on in your CargoWise test system while developing new interfaces.
The following sections in this chapter deal with generic functionality related to the Universal
Shipment dataset that is common across all modules. An example of this is that in all areas where
the Universal Shipment has been mapped, you can configure Workflow to export Universal
Shipments by configuring a trigger action of XML Universal Shipment.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found under Integration Options – Mapping Guides
The default behavior is all Published (non-Internal) Milestones are included in outgoing XML. Each
Milestone can have this set individually both on the template and on each instance of a Milestone
on each job.
If you want to send both Published and Internal Milestones to a particular recipient, there is an
option configurable for each Recipient Organization that allows you to include Internal Milestones
as well. You can set this option when configuring the EDI Communications Mode for the sending
module for the File Format of XUS (Universal Shipment).
Milestones from Universal Shipment XML are never imported. Workflow is always configured from
within a target system. This is to stop a sending system from controlling a receiving system's
Workflow configuration along with any associated automations.
If you want to send XML Messages to mark off Milestones in a target CargoWise system, you can
send Universal Events with the Event Code and Parameters matching the Milestone that has been
met.
Events give a way of sending updates in a timely manner as they are sent as soon as the event
itself is recorded in the host system. They will trigger any Trigger Actions configured within the
receiving CargoWise system so they cause Workflow to operate, but they will not interfere with
the Workflow configuration determined by the recipient.
Milestones are included so that third party systems can see a brief historical summary of the
progression of a job where they are not able to handle timely updates via Universal Events.
Events are always the preferred option for progress updates as they are a real time push based
mechanism providing timely and scalable progress updates.
In the Forwarding Consol module, there is a Consol Costing Tab instead of a Billing Tab. This
functions differently to the Billing Tab. It is used to track Consol costs, apportion costs to
attached Shipments, and also for profit sharing. The information from the Consol Costing Tab can
be included in the Universal Shipment XML under the ConsolCosts element.
The JobCosting and ConsolCosts elements (known collectively as the Costing elements) share
some common functionality. When exporting Universal Shipment XML, they are only included
when certain conditions are met. When importing Universal Shipment XML, the Charge Lines on
the Costing elements must contain ImportMetaData elements that tell the processing CargoWise
system how and when to match to existing rows.
When sending Universal XML from CargoWise, one of the Recipient Roles you can use is ORP (Org
Proxy) which is intended for use when sending Universal XML to your own in-house systems.
Because it is a common and reasonable requirement for in-house systems to have access to
costing information, the Costing elements are included when you send XML using the Recipient
Role ORP.
Each Charge Line element imported must have an ImportMetaData element included with it, or it
will be ignored upon import. The ImportMetaData element tells the target CargoWise system how
to import the row, and what data to use to match to existing rows where updates or deletes are
required. In short it tells the target system how to merge the supplied information along with any
existing charge lines.
ImportMetaData is not included when exporting from CargoWise for two reasons. Exchanging
charges information directly between CargoWise systems without a business process in
between yields undesirable effects as your costs are not generally another party’s costs. You also
don’t know how the recipient wants to match and account for costs in their system, so there has
to be some sort of business process in place to manage this kind of transfer. These are usually
added by middleware.
To import ConsolCosts and/or JobCosting data, as well as having a valid DataTarget, the
DataContext must contain a matching EnterpriseID and ServerID, and the CompanyCode must
match a valid Company in the system. In the event where any of these values are missing or
invalid, the ConsolCosts and JobCosting data elements will be ignored.
In the event where the branch specified in the JobCosting data element does not belong to the
company processing the XML import (i.e., CompanyCode), the EDIMessage will be rejected.
5.4.3.3.1 Instructions
When importing Charge Lines, CargoWise needs instructions on how to import each line,
depending on the instruction, matching criteria to be used when trying to find an existing line to
update or delete.
There are four possible instructions that can be specified in the Instruction element within the
ImportMetaData element.
Unless you are using the INSERT instruction, you must also supply matching criteria.
MatchingCriteria elements are included in the MatchingCriteriaColleciton element on the
ImportMetaData elements as shown following.
<ImportMetaData>
<Instruction>UpdateAndInsertIfNotFound</Instruction>
<MatchingCriteriaCollection>
<MatchingCriteria>
<FieldName>ChargeCode</FieldName>
<Value>FSC</Value>
</MatchingCriteria>
</MatchingCriteriaCollection>
</ImportMetaData>
Each MatchingCriteria element contains a single FieldName and Value that must match to an
existing row for it to be considered a match. Where there are multiple MatchingCriteria elements
provided, all criteria must be met to obtain a match to a target row.
• ChargeCode
• Creditor
• CostAPInvoiceNumber
• SupplierReference
• CostOSCurrency
• CostOSAmount
• CostLocalAmount
• CostInvoiceDate
• CostDueDate
• CostExchangeRate
• ApportionmentMethod *
• PrepaidCollectFilter *
When using the Update Instruction, it’s important to include a set of criteria that will uniquely
identify the row you want to update. Where multiple matches exist for Update Instructions
provided, an error will result looking like "Error - whilst importing ... multiple charges found when
updating charge line. No changes were made due to the above errors. Please fix the errors and try
again." For Delete Instructions, all rows matching will be considered a match.
For this reason, sometimes it’s best to include separate Delete and Insert instructions. A common
case is where all charge lines containing costs from a particular supplier are Deleted, then Insert
Instructions are used to add replacement lines from that supplier. Be aware that in this case, any
other changes made to the rows being deleted between updates will be lost as you are throwing
away the rows when you replace them.
The Insert instruction can be used to insert a new charge line/consol cost. It does not require any
MatchingCriteria as no matching is performed.
<ImportMetaData>
<Instruction>Insert</Instruction>
</ImportMetaData>
The Update instruction can be used to update an existing matching charge line/consol cost.
In this case, one or more matching criteria can be specified for the system to locate the charge
line consol cost to be updated.
<ImportMetaData>
<Instruction>Update</Instruction>
<MatchingCriteriaCollection>
<MatchingCriteria>
<FieldName>ChargeCode</FieldName>
<Value>FRT</Value>
</MatchingCriteria>
<MatchingCriteria>
<FieldName>CostOSCurrency</FieldName>
<Value>AUD</Value>
</MatchingCriteria>
</MatchingCriteriaCollection>
</ImportMetaData>
In the above example, the first line with a Charge Code of FRT and a Cost OS Currency of AUD
would be updated. If no matching line was found, the message would be rejected as the update
could not be made.
In this case, one or more matching criteria can be specified for the system to locate the charge
line/consol cost to be updated.
<ImportMetaData>
<Instruction>UpdateAndInsertIfNotFound</Instruction>
<MatchingCriteriaCollection>
<MatchingCriteria>
<FieldName>ChargeCode</FieldName>
<Value>FRT</Value>
</MatchingCriteria>
<MatchingCriteria>
<FieldName>Creditor</FieldName>
<Value>FREAIRCMH</Value>
</MatchingCriteria>
</MatchingCriteriaCollection>
</ImportMetaData>
In the above example, the first line with a Charge Code of FRT and a Creditor Code of FREAIRCMH
would be updated. If no matching line was found, a new charge line would be added.
The Delete instruction can be used to delete an existing matching charge line/consol cost.
In this case, one or more matching criteria can be specified for the system to locate the charge
line/consol cost to be updated.
<ImportMetaData>
<MatchingCriteriaCollection>
<Instruction>Delete</Instruction>
<MatchingCriteria>
<FieldName>Creditor</FieldName>
<Value>FREAIRCMH</Value>
</MatchingCriteria>
</MatchingCriteriaCollection>
</ImportMetaData>
In the above example, any lines with a Creditor Code of FREAIRCMH would be deleted. If no
matching lines were found, an error will be logged in the Data Import Log for the message as
shown below, and the message will be discarded.
With the above matching criteria, the system will locate existing charge line with Charge code =
FSC and update it if found, add a new charge if not found.
With the above matching criteria, the system will locate existing charge line with Creditor =
QANCARSYD Invoice number = MET1101 and Charge code = FSC. If the charge line exists, it will
update.
If a matching charge line is not found, an error will be logged in the Data Import Log for the
message, and the message will be discarded. For this reason, when using Update, it’s important to
know what the current state of the data is.
The previous samples demonstrate the use of the ImportMetaData element only. Following is a
complete and more complicated sample including the Universal Shipment and multiple charge
lines at both the Consol and Shipment levels.
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingConsol</Type>
<Key>C300001703</Key>
</DataTarget>
</DataTargetCollection>
<Company>
<Code>DAU</Code>
</Company>
<EnterpriseID>WTG</EnterpriseID>
<ServerID>XX1</ServerID>
</DataContext>
<ConsolCosts>
<ConsolCostLineCollection>
<ConsolCostLine>
<ImportMetaData>
<Instruction>Insert</Instruction>
</ImportMetaData>
<ApportionmentMethod>CHG</ApportionmentMethod>
<ApportionToSubShipments>false</ApportionToSubShipments>
<ChargeCode>
<Code>FRT</Code>
<Description>International Freight</Description>
</ChargeCode>
<ChargeCodeGroup>
<Code>FRT</Code>
<Description>Freight</Description>
</ChargeCodeGroup>
<CostExchangeRate>1</CostExchangeRate>
<CostLocalAmount>1555</CostLocalAmount>
<CostOSAmount>1555</CostOSAmount>
<CostOSCurrency>
<Code>AUD</Code>
<Description>Australian Dollar</Description>
</CostOSCurrency>
<Creditor>
<Type>Organization</Type>
<Key>QANCARSYD</Key>
</Creditor>
</ConsolCostLine>
</ConsolCostLineCollection>
</ConsolCosts>
<SubShipmentCollection>
<SubShipment>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S54623816</Key>
</DataTarget>
</DataTargetCollection>
</DataContext>
<JobCosting>
<ChargeLineCollection>
<ChargeLine>
<ImportMetaData>
The preceding sample will target Forwarding Consol C300001703 and Forwarding Shipment
S54623816 then:
• Insert a new “FRT” Consol Cost to Consol C30001703 and apportion to the shipments
based on CHG – Chargeable Units
• Update “FSC” Shipment S54623816 Job Charge using matching criteria: ChargeCode ‘FSC’
and Creditor ‘KELTRASYD’
• UpdateAndInsertIfNotFound “ODOC” Shipment S54623816 Job Charge using matching
criteria: ChargeCode ‘ODOC’
• Delete “OCART” Shipment S54623816 Job Charge using matching criteria: ChargeCode
‘OCART’, Creditor ‘KELTRASYD’ and SupplierReference ‘REF1101’
The sample above was imported into a system where the Forwarding Consol C300001703 had
no charges on the Consol Costs tab and Forwarding Shipment S54623816 had charges on the
Billing tab as shown below.
This information is included in the Universal Shipment XML under the JobCosting element except
for the Organizations. The Local Client Organization often shows on the main job tab (as shown
following on the Forwarding Shipment), so to keep things consistent the Local Client Organization
was included directly under the main Universal Shipment.
These Organizations are already included in the Universal Shipment XML and are used by the
receiving system to set the Local Client upon XML Import using the context of the sent Shipment
and target module/recipient role. The Sender’s Local Client is included in case it is of interest to
the receiving system but is not used to set the Local Client in the target system.
When you do this, you must make sure that you provide a Branch, or that the Branch on the
Billing tab has already been set. You must also have the Department provided, or enough
information in the incoming XML to be able to default the Department. The reason for this is that
the Branch and Department fields are mandatory and must be filled in before any fields on the
Billing tab can be set.
If there is not enough information provided to save the Billing/Job Costing information, you will
see an error in the Message Processing Log like the following.
Error - Could not save Local Client Organization - Must have an Origin, Destination and Transport Mode
to be able to calculate a Department for a Job Costing record, as the Local Client is saved on the Job
Costing record.
This means that if a Universal Shipment was sent from the Forwarding Shipment shown above in
the previous sample, the AMS Number and Customs Office Code Override would be included as
shown:
<EnterpriseID>CWE</EnterpriseID>
<ServerID>PRD</ServerID>
<Company>
<Code>CWS</Code>
<Name>WiseTech Global edi Pty Ltd</Name>
</Company>
</DataContext>
<!-- Content Removed for Brevity -->
<AdditionalReferenceCollection>
<AdditionalReference>
<Type>
<Code>AMS</Code>
<Description>AMS Number</Description>
</Type>
<ReferenceNumber>34217-812349</ReferenceNumber>
</AdditionalReference>
<AdditionalReference>
<Type>
<Code>COC</Code>
<Description>Customs Office Code Override</Description>
</Type>
<ReferenceNumber>FFG3278197</ReferenceNumber>
</AdditionalReference>
</AdditionalReferenceCollection>
<!-- Content Removed for Brevity -->
</Shipment>
</UniversalShipment>
If Additional References are sent with Type.Code values that are not present in the registry, these
are recorded in a read-only Note against the updated entity with the description, ’Unrecognised
Additional Reference Types‘. Users can then see these references and decide whether they need
to be entered in another place or can be safely ignored.
The registry item shown above is used to define the Additional Reference Types available on a
Forwarding Shipment. For more information on how to setup Additional Reference Types in a
given module you should refer to the documentation for that module. For modules where the
Registry settings are company specific, the Company from the DataContext element is used to
load the right set of Additional Reference Types from the registry.
Information on which modules implement Additional References, where they appear in those
modules and how they are used for matching is available in the Module Mapping Guides.
If the Additional Reference code provided cannot be found in the appropriate registry item, the
Context Value will not be used for Additional Reference matching.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found under Integration Options – Mapping Guides
• Partial – where the changes to matching notes are updated, changes to new notes are
added and unmatched notes are left unchanged. A sample can be seen below:
• <NoteCollection Content="Partial">
• Complete – where the changes to matching notes are updated, changes to new notes are
added and unmatched notes are deleted’. A sample can be seen below:
• <NoteCollection Content="Complete">
When importing universal XMLs the default, where not specified, is “Partial”.
When you select the Internal Work Notes note, the text entry section at the bottom of the form
changes to allow you to select fonts, colors, styles, and insert pictures.
This means that Internal Work Notes is a Rich Text note type. Both of these note types are pre-
defined system note types, the last type of notes are Custom notes.
When you turn on the Custom flag on a note, you are allowed to enter any Description/Note Type
you like as long as it doesn’t match a system defined note type. All Custom Notes are
automatically Rich Text notes.
Go to Maintain > System > Registry then open up the sub-tree System > Custom Defined Note
Types.
5.4.6.4 Importing and Exporting Plain and Rich Text Notes via
Universal XML
There are two types of notes you can have in CargoWise, Text Only and Rich Text Notes.
Universal XMLs do not support Rich Text Notes. Rich text notes cannot be imported through a
Universal XML and when exported they do not retain their original formatting.
As seen in this sample the “Bold”, “Italic” and “Underlined” characters have been reformatted into
plain text and the pre-existing formatting from the job notes is not retained.
The eHub Gateway service can be used to send Universal Events to your CargoWise installation
via the eAdaptor interface. This enables you to create your own Web Service based Service Bus
using a tool like Microsoft BizTalk to communicate directly with the eAdaptor interface.
As Universal Events come in, they trip any Milestones and Triggers configured on the Workflow
tab of the entity they are linked to and can update dates and other fields with data specified in
the Universal Event on that entity.
You can also push events out via the eAdaptor Interface using Workflow Triggers. In all areas
where the Workflow & Tracking tab appears, you can configure Workflow to export Universal
Events by configuring a trigger action with an Action Type of XUE Send XML Universal Event.
These Universal Events are sent from CargoWise via the eAdaptor interface to either our eHub
Gateway or your own internal Web Service.
Only field attached to the Business Object Schema can be updated via an XUE. Any other fields
that need to be updated (For example. Customs fields) should be done via an XUS.
• EventType (mandatory) -This is the Three-character event code. Describes what the
nature of the event. You will have seen some of these already on the Workflow & Tracking
> Events tab on various Business Entities (Shipment, Consol, Declaration etcetera.)
throughout CargoWise
• EventDescription (optional) - Human readable description of the event. May contain
supplementary information to clarify the scope of the event, but this will not affect how the
event is processed. Is imported ‘as is’ upon consumption so the user can identify the event
easily
• EventTime (mandatory) - This is the time the event occurred, or in the case of ‘Estimate’
events, the time at which the event is estimated to occur. Please note that this is taken
from the Event Time, not the Posted Time in CargoWise
• There is no time zone directly associated with the Event Time; it is seen as the Local Time
for the location at which the event occurred. For a Departure event it would be the time
zone at the original, for an Arrival event, it would be the time zone at the destination and so
on. This is how most industry systems supply event data, so this is how we work with it
ourselves
• CreatedTime (optional) - This is the time at which the event information was generated or
supplied. Only used in the case where the Event Time is different from the time the event
was generated. In most cases, the event should be generated at the same time the event
occurred so this field will not be included, but for cases like Estimate events, this would be
used so that you can tell when the estimate was made
• DataProvider (mandatory) - Describes the Communications Service Providers (CSP)
providing the event information
• IsEstimate – Set to indicate an event is an estimate for a future event
Context Values are only sent where they are required to uniquely identify the entity a given event
applies. This means that something like a Flight Number would only be included where the Event
related to that flight, or a particular Transport Leg. If the Event related to the entire
Consolidation, the Flight Number will not be included.
Another common usage of a Context Values is to specify the place the event occurred. A
Departure event might apply to the ‘first’ or ‘second leg.’ on a Consolidation where multiple legs
exist. A location based Context Value then allows us to identify which leg. has just been
embarked on.
MAWBDestinationIATAAirportCode MBOLDestinationUNLOCO
IATAAirportCode UNLOCO
FlightDate LegDepartureDate
FlightNumber LegArrivalDate
ULDIdentification ContainerNumber
HAWBNumber HBOLNumber
HAWBOriginIATAAirportCode HBOLOriginUNLOCO
HAWBDestinationIATAAirportCode HBOLDestinationUNLOCO
CarriersBookingReference
ShippersReference
OrderNumber
InterimReceipt
CFSReference
These may or may not be used in each module depending on the information available within
that module. For more information on which Context Value Types are included in each module
when exporting and importing Universal Events, refer to the Module Mapping Guides.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found in Integration Options – Mapping Guides
You can also include any additional information you like in the ContextCollection by making up
your own Context Value Type codes. Although CargoWise will only use the list above to work out
which entities the Event applies to, you can add any Context Type and Value you like using
Pascal Casing on the Type.
When you do this, CargoWise will show every Type and Value provided in a human readable form
by inserting spaces into the key where indicated by the Pascal Naming capitalizations. There is a
screenshot of how this appears in CargoWise in section 5.5.4 Events Showing in CargoWise .
Context Value Type elements can optionally include a Description attribute. This is used where
either a short code or abbreviation has been used in the Type value so that a full human readable
description can be specified. This description is used instead of the description generated from
Pascal Naming wherever it is used. One place the Description attribute is used is where modules
in CargoWise allow users to enter a list of Additional References.
When a Universal Event is sent from an entity with Additional References, the Additional
Reference Code is sent in the Type element, and the description associated with that code is
sent in the Description attribute on the Type element. The reference number itself is included in
the Value element of the Context item.
This means that if a Universal Event was sent from the Forwarding Shipment shown above in the
previous sample, the AMS Number and Customs Office Code Override would be included as
shown:
When Universal Events come back into CargoWise if the EnterpriseID and ServerID of the
incoming Universal Event match the Enterprise ID and Server ID of the CargoWise installation, any
Context Values with a three-character Type will used for matching to Additional References.
The registry item shown above is used to define the Additional Reference Types available on a
Forwarding Shipment. For more information on how to setup Additional Reference Types in a
given module you should refer to the documentation for that module. For modules where the
Registry settings are company specific, the Company from the DataContext element is used to
load the right set of Additional Reference Types from the registry.
If an appropriate set of Additional Reference Types is loaded from the registry, any Context
Values where the Type matches one of the existing Additional Reference Types will be used for
matching as part of the Combination Key Match for that module. Information on which modules
implement Additional References, where they appear in those modules and how they are used
for matching is available in the Module Mapping Guides.
If the Additional Reference code provided cannot be found in the appropriate registry item, the
Context Value will not be used for Additional Reference matching.
Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s
location in the GUI. They can be found in Integration Options – Mapping Guides
This functionality is designed for small supplementary updates of fields directly related to the
entity the Event is being applied against. It has a simple syntax, which does not allow you to
update child entities by design. If you want to update more than one or two additional fields or
any information on child entities, it is recommended that you use the Universal Shipment instead.
• Type: Identifies the Type and Field name you want to update using the value specified.
• Value: The value to store in the field identified by the Type element.
Following is an example of a Universal Event with an Event Type of DCF (Delivery Cartage
Finalised) including an Additional Field Update for the Delivery Cartage Completed Date:
<UniversalEvent xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Event>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S00006294</Key>
</DataTarget>
</DataTargetCollection>
</DataContext>
<EventTime>2016-12-05T12:12:00</EventTime>
<EventType>DCF</EventType>
<AdditionalFieldsToUpdateCollection>
<AdditionalFieldsToUpdate>
<Type>ForwardingShipment.DocsAndCartage.JP_DeliveryCartageCompleted</Type>
<Value>2016-12-05T12:12:00</Value>
</AdditionalFieldsToUpdate>
</AdditionalFieldsToUpdateCollection>
</Event>
</UniversalEvent>
You will notice that the Type on the AdditionalFieldsToUpdate element has three parts to it with a
period (.) in between each component part:
• ForwardingShipment: The first part is the Entity Type that this update will apply. Universal
Events can be consumed by many modules, and the field names are different in each
module. When linking a Universal Event to an Entity, field updates will only be attempted
when the Entity Type matches the type of Entity the Event is being linked
• DocsAndCartage: The second part in this case identifies a related entity that the field
being updated actually sits. This is optional and can only be used where there is one and
only one related entity identified by the identifier specified. You cannot use this facility to
update a value in related child entities as there is no way to know which child row should
be updated. If you want to update information on child entities, it is recommended that
you use the Universal Shipment instead. If we were updating a field directly on the
Now that you know what component parts make up the Fields Update Type, you need to know
how to work out what those values are. You can work out what these are from existing samples
where they are available, or you can use some of the developer tools available from within
CargoWise itself.
For Universal Event sample files, see the eAdaptor Sample Interfaces Pack available from
Integration Options – eAdaptor Guides
You can calculate the Field Update Type from the binding information available from the
CargoWise GUI interface. To show the binding information for a field, first navigate to that field in
the GUI. For this example, we will open a Forwarding Shipment, then go to the Delivery tab, and
select the Actual Delivery field.
The last DataSource Type and BindingMember shows the Entity Type and field binding
information that is used to obtain the FieldToUpdate Type as follows.
BindingMember: DocsAndCartage+JP_DeliveryCartageCompleted
The first part of the AdditionalFieldsToUpdate Type is obtained from the last part of the
DataSource type. In this case, that’s ForwardingShipment. The rest of it comes from the
BindingMember using a period (.) delimiter between each part. In this case that means we insert a
period between the first part and the binding member, then replace the ‘+’ from the binding
member with a period. The result is then:
ForwardingShipment.DocsAndCartage.JP_DeliveryCartageCompleted
The data you provide will be converted to the format required by the field you are trying to
update. Although the type of the Value element is a string in the XSD, you should provide the
content as though the Value element was actually defined as the XML type corresponding to the
type of the field you are updating. This means that if you are trying to update a date field, you
should use the XML Date format when formatting your content. The same applies for booleans,
integers and decimals.
When field updates are successfully made using the AdditionalFieldsToUpdate elements, this is
logged in the Data Import Log Text note on the EDI Message itself.
You will see from the message in the example above that the field update was successful. If the
first part of the AdditionalFieldsToUpdate Type matches the module being targeted but the field
does not exist, or the content in the Value element is not of the right type to be stored in the
target field, an error will be shown.
If the first part of the AdditionalFieldsToUpdate Type does NOT match the module being
updated, no error will be shown as updates are only attempted when the module being updated
matches the type.
When the update is a success, go to the Forwarding Shipments module, open the Shipment being
updated (S00006294 in this case) and click on the Delivery tab. You will see the Actual Delivery
field has been updated with the date from the Value element in the AdditionalFieldsToUpdate
element.
If a matching Business Entity is found, the Event is added to the list of Events showing on the
Events sub tab under the Workflow and Tracking tab on that Business Entity. An example of this
is shown below for an FSU/RCS message translated to a CargoWise Universal Event with a type of
RCV – Received from Shipper:
You will note that when you select an Event that was created from an external Universal Event,
the Event Context Information grid appears showing all of the Context information that came
along with the Event from the Event Provider.
For Business Entities such as Containers that always reside on a parent Business Entity like a
Consolidation or a Declaration, the Event will appear on the Events sub tab of the parent Business
Entity with the Source column identifying the container the event relates.
When you go to the Workflow & Tracking tab, Events sub tab within a Shipment linked to a
Consolidation, you would already have seen Events from the Consolidation showing up on the
Shipment. Previously these would not have tripped any Triggers or Milestones on the Shipment.
Now any events raised on the Consolidation will cascade down to trip Triggers and Milestones
defined on the Shipment so that as well as showing in the log, they can also trigger Actions and
complete Milestones on the Shipment.
This means that when a DEP - Departed event is raised on the Consolidation, each Shipment
linked to the Consolidation is checked for Triggers and Milestones, and if any of those are
configured to respond to the Departed event, they will be tripped and completed as is
appropriate. If there are events that you do not want to Cascade, you can apply a filter for that
Event Type as described above.
At this point Event Cascading only works with Consolidation Events cascading down to Shipment
level Workflow, and Shipment Events cascading down to Sub-Shipments, but this will be
implemented in other areas of CargoWise over time. Where applicable, Events will continue to
cascade down wherever there are more related child objects that have Workflow on them to
respond to cascaded events.
This is like the Event Cascading described above, but instead of the Events cascading down, they
are propagating up. The main difference is that when propagating up, Milestones and Triggers and
only tripped when ALL Child Business Entities on the Parent have raised that same event.
This means that if an Unpacked Event was raised on a Shipment, the Shipment will notify the
Consolidation to say that it has had the Unpacked event raised. The Consolidation will then check
all of the other Shipments linked to that Consolidation and if they ALL have the Unpacked event
on them, will raise an Unpacked event against the Consolidations with a description showing:
At this point Event Propagation will only go one tier up from the place the Event is raised. This is
to stop Container level Events getting double propagated to Consolidations via the Shipments
and direct to the Consolidations as well.
Propagation will be implemented in other modules of CargoWise over time. In some of those
areas Events may propagate up multiple levels if there’s a business requirement to do so but at
this point there’s only been a need to propagate up one level.
There are also three registry items you can configure that turn on email notifications when xHub
XML events arrive in CargoWise. These would generally only be used for debugging purposes
while configuring your own Service Bus.
CargoWise determines who the Operator is by looking at the Business Entity to see if there’s an
explicit Operator field (e.g., Declaration has ‘Broker’) then falling back to the last person to edit
the Business Entity where nothing more explicit is available.
• The Business Entity Types and Reference Numbers that the event was linked (e.g., “Consol
C00003427” or “Container CRXU9378472”)
• A URL Link to any Business Entities showing the event on the Workflow & Tracking tab
Events sub tab. For Containers this would be the parent Consol or Declaration
• Information from the XML Event itself including all Fields, Keys, and Contexts
• Allows you to specify a Group, used when Group is one of the options selected in the
registry item above. The default setting is PMG - Post Masters
• Will trigger an email to the Group specified by this registry item when an Event arrives from
eHub but is not matched to any known Business Entity. The default setting is PMG - Post
Masters
• If you want to turn off this notification, simply remove the group from the registry item
An Event Not Matched email contains all information from the XML Event itself including Fields,
Keys and Contexts, but no other information as no match was found.
Refer to 1COR192 - How can I get email notifications for Inbound Universal XML failures?
• FileName – Provide the Filename of the Document. Also, using filename, details for
allocation can be included within this element.
For example: <FileName>[SHP BKC S00001493]Client Agreement.tif</FileName>
This will allocate the document in Shipment # S00001493 as Document Type “BKC”.
If the Document Allocation does not matched, the document will appear in the Allocate eDocs
module on the Unallocated eDocs tab. The Allocation Status column will contain the reason why
the document could not be allocated. Once the allocation details are provided, the document
can be allocated.
For more information on how to send and retrieve documents using UniversalEvent messages
please refer to the Universal Document Request Update Note at Universal Document
Request.
When using barcodes, the barcodes must be in the same order as they would when
allocating via the DocManager Import service task. Job Type Coversheet > Doc Type
Coversheet > document.
When using filename details for allocation, add the details within the element, for example:
[SHP LTR S00001410]Client Agreement.tif.
For more information on using barcodes or filename allocation details, please refer to the
following Update Notes:
Enhancement to the allocation of documents via email
Enhancements To eDoc Allocation via a network folder
Just like the other Universal XML schemas, one schema is used across all PAVE modules making it
possible to transfer data across modules and systems seamlessly.
This is done by having all elements for all supported transaction types present in the one
schema. Where values are common across multiple transaction types like Posted Date, Local
Total and Currency, the same elements are used. Each transaction type uses elements relevant
to that transaction type and ignores those not relevant. As an example, you might have a Check
Number on a Payment, but not on an AR Invoice.
For unposted job related costs and revenue, you should use the JobCosting element in the
Universal Shipment XML mentioned in section 5.4.3 Job Costing (Billing) and Consol Costs .
The same information (and more) can now be found in the Module Mapping Guides published for
those modules. Each module that is mapped to a Universal or Native XML dataset will have a
Module Mapping Guide that covers that module’s specific implementation details.
The Module Mapping Guides describe the keys used for matching, give an overview of how the
schema is mapped, and provide a list of element level mappings describing each field’s location
in the GUI.
They can be found along with this document on WiseTech Academy under Integration Options –
Mapping Guides
At the time of writing this section, Module Mapping Guides exist for many modules across
CargoWise, and there are more that are still in progress. If you cannot find one for a module
you are working with, please raise an incident to register your interest.