MYOB Greentree

HideShow

  • Contents
  • Index
  • Search
 
Display results with all search words

 

XML Orders


Webstore uses this form to look into a local folder every few minutes and check for XML documents. Webstore reads this XML order text using its own schema. If all items and quantities are valid in the file, an order is generated and the file is moved into the Correctly processed XML files folder.

If the XML order text file does not have valid values, it is put into the Failed validation XML files folder which must be cleared. An email may be sent when a XML order fails so an administrator can fix the error or contact the company trying to place the failed order.

Options Reference

Each option and field on the form is described below. Mandatory options and fields are highlighted in red.

Allow XML orders

Select this option to enable XML orders.

XML file folder settings

These are three file folder paths relative to the computer running Webstore.

New XML files

This folder is checked every X minutes (defined below) for XML files. The file can have any name but to be parsed will need to contain properly formatted XML text that conforms to the schema. The file can be moved into this folder by any available means, and the responsibility for doing this lies with the person who is setting up Webstore.

There are many applications that can be downloaded from the Internet that facilitate transferring a file to a computer. For example:

  • FTP - make this folder a mapping on an FTP server form such as the FTP server built into IIS. Give customers the login and password and open it up to the Internet so they can upload their XML files either or ideally automatically. You can upload a file to a specified FTP location.
  • Email - some email client forms save attachments into a folder on the computer checking email or to a file share mapping on a network. Set up the mail client to check emails every X minutes and place attachments into this folder. Any emails with attachments that are not XML is moved into the Failed validation XML files folder.
  • Third party web page - if another web page is written in a dynamic scripting language such as PHP, ASP, ASP.Net or ColdFusion, these scripting languages can generate XML files and transfer the files into this folder for processing into Webstore.

Ensure that a file with the same name does not already exist waiting to be processed. Whatever option is used to place a file into this folder should never be set to overwrite other same-named files. A good idea would be to have each customer have their files named custname1234.xml if custname is the customers unique code, and 1234 is the unique order number from the customer.

Correctly processed XML files

Files are moved into this folder if they process successfully. If a file with the same name already exists, it is named filename_X.ext if X is a incrementing number, ext is the original extension of the file name and filename is whatever the filename was before being moved.

Failed validation XML files

Files are moved into this folder if they have an error. If the option to Email XML errors is selected, an email failure notification is sent to the nominated address. An email is also sent to the customer if the option is selected.

Check every X minutes

A check of the New XML files folder (for XML files awaiting processing) must be done at least every three minutes. A check is made when first starting Webstore, and from then on every X minutes as defined here.

Email XML errors

An administrators email address can be defined to have errors sent to it. Emails are sent using the email sender. The template used for this is named xmlconfirm.ect and is found in the Webstore templates under the confirm folder.

XML customer email confirmations:

Email the customer any XML order rejection messages

Select this option if you want a failed order notification to be sent to the customer (this uses the xmlconfirm.ect template). The email address is determined from the one specified as the web user's email address on the AR Customer Maintenance form. If no address is specified there, the Web address specified for the customer is used. The xmlconfirm.ect is the template used for this email.

The subject for the email defaults to: Your XML order has had problems. This can be overwritten using the xmlconfirm:shortrejecttext:1 webtext segment.

When a document fails validation, and an email is successfully sent to a customer, an entry is put in the Webstore log saying: Emailed the customer at cust@customer.com - XML order has failed - subject: Your XML order has had problems.

If the above is not selected, a note is sent to the Webstore log saying: NB: The customer was not sent any email notification about the XML order failing, defined in the Webstore Module Control form.

If the email cannot be sent, an error is sent to the Webstore log saying: Error: Failed to email the customer at cust@customer.com - XML order has failed - subject: Your XML order had problems and was rejected.

Email the customer an XML order confirmation

If this is selected, the template defined below this controls the formatting of the email. The sale_email.ect template requires special configuration requirements and because this is an email template and not a web page, all navigation links have been stripped out of it.

The email address used is the web users email address, if the web user is found from validating a login and password sent in the XML document. If there is no email address defined for the web user, the email address is found from the web users customer. If there is no email address for either, a message is put in the Webstore log saying: An XML order is placed, but there was no email address for the web user: 'Webuser Name', or its customer: 'Customer Name'..

If an error occurs when sending an email, a message is put in the Webstore log saying: When emailing cust@customer.com to confirm an order placed through XML, an error occurred: error_here.

When the email is sent successfully, a message is put in the Webstore log saying: Emailed the customer at cust@customer.com - XML order 1234 is placed.

The subject used when sending the email is the same as the subject used on normal email confirmations defined on the Webstore Module Control form.