1. Setup
Two separate records are required: one for the e-mail messages reading connexion and one for sending the confirmation and error e-mails. The configurations are:
E-mail reading connexion:
Name and Description = these are up to the user's liking;
Host = the address of the IN e-mail server;
Port = the IN connexion port;
EMail Address = the e-mail address used to read the messages that contain the order confirmations;
EMail User Password = the password for the e-mail address selected above;
SSL and Is StartTLS = depending on the security configurations of the connexion imposed by the server.
2. Functioning Description
The process can be manually launched or scheduled.
In order to have the process automatically be run on a schedule, you need to use the Scheduler window. When configuring this, it is mandatory you indicate values for all the process's running parameters.
One option is displayed in the image below:
If you want to manually launch this process, you need to follow the path: System Admin -> Data -> Data Import ->Flat Fixed Import/Export -> Import Web Site Orders
The running parameters are those in the image below:
E-mail sending connexion:
Name and Description = these are up to the user's liking;
Host = the address of the IN e-mail server;
Port = the OUT connexion port;
EMail Address = the e-mail address used to send the messages that contain the import confirmations or errors;
EMail UserPassword = the password for the e-mail address selected above;
To EMail = the e-mail address where the messages that contain the import confirmations or errors are sent to. You can enter multiple addresses;
SSL and Is StartTLS = depending on the security configurations of the connexion imposed by the server.
Organization = the organization used to generate the Sales Orders resulted from the import;
EMail Settings = reading e-mail, used to take the confirmations sent by the site;
Target Doc Type = the sales order type used for the online sales order import;
Vendor = the business partner used to determine the products based on the vendor product key;
Date Format = the format used to correctly interpret the sales order date;
Decimal Point = the character used to correctly interpret the numerical values;
To EMail = the e-mail address where the messages that contain the import confirmations or errors are sent to.
By launching the process, the following will take place:
it will connect to the "Reading e-mail" and download the messages (attachments) who correspond to:
E-mail Subject = "Order Confirmation - nnnnnnn", where nnnnnnn is the order number.
it will interpret the downloaded xml file to obtain the sales order in SocrateCloud with the following rules:
Sales Order type = "Standard Order";
Sales Order number = generated by the system based on the standard rule;
Order Description = the original number of the order confirmation on the site;
Sales Order Date = the date in the tag <DatePlaced>datetime</DatePlaced>;
Business Partner = determined from the rule below:
first, it tries to determine the business partner after the contact partner, in which case the newly-defined "WEBID” field will be used by searching after the tag <Customer> <Id>...</Id>. If the partner cannot be determined this way, the next method will be tried:
it will try to determine the business partner after the Tax ID searching after the tag <Department>...</Department>. In the search, only the numerical part of the Tax ID field will be used (so as to eliminate the "RO" bit).
In this case, the contact person linked to the determined Business Partner will be added to the database, together will all the corresponding data taken from the xml file, as such:
Name = <Name>...</Name> + <Surname>...</Surname>
Email = <Email>...</Email>
Telephone = <Telephone>...</Telephone>
WEBID = <Customer> <Id>...</Id>
If you cannot obtain a business partner this way, the following method will be tried:
enter a fixed Business Partner in the Template B.Partner field found in the Tenant Info tab of the Tenant window.
in this case, an e-mail such as the error one will be sent!
all the other data in the sales order are entered after the standard rules, by taking the data from the Customer definition, or they may be left empty so they can be manually filled in by the user, the order being imported in the Drafted status.
the content of the order:
Product = determined after the Partner Product Key in the Purchasing tab of the Product window;
Quantity = taken from the tag <Quantity>n</Quantity>;
Entered Price = taken from the tag <YouPay>pi</YouPay>;
List Price = taken from the tag <ListUnitPrice>pl</ListUnitPrice>;
BPartner Product Key = if the customer is identified, then the partner product key will automatically be entered when importing the orders from the site, by taking the information from the tag: <CustomerInternalStockNumber>. If the order is entered on the Template B.Partner, then this field will be ignored.
the Total, VAT, Discount calculations are done by SocrateCloud in a standard way. Note: if the VAT rate cannot be correctly determined, then the import will result in an error.
if the sales order import is completed successfully, then the e-mail message will be attached in img or html format to the order in SocrateCloud.
the successful import confirmation or import error message will be written in the log.
an e-mail with the error/success message will be sent to the address(es) entered in the To EMail field. If the import process has run successfully, the original e-mail will be moved into the "Processed" folder.
Examples with sent messages and actions to be taken:
“Sales Order no. 50995 was created from the Order Confirmation no 9203465.”=> you can verify and complete the Sales Order 50995 from SocrateCloud;
“The web order cannot be imported from the Order Confirmation no. 9203500. The product could not be found.”=> the original message will be checked for the product codes defined in SocrateCloud. Fix the problem and manually launch the import process;
“The web order cannot be imported from the Order Confirmation no. 9203501.The Business Partner does not exist in the system. The fixed partner from the tenant definition is used. The creation of the order line for the product with Partner Product Key = 7242018 has failed.”=> the first part of the message indicates the fact that the business partner could not be found and that the system has, therefore, used the standard one. Moreover, due to the price list incompatibility, the products could not be entered. The customer has a different price list, with a distinct currency, which does not fit with the price list corresponding to the imported order. The business partner must be determined, or the price list for the standard partner be changed to correspond with the currency on the order. The same message will be displayed if the VAT rate applicable to the line cannot be determined, however, this should not happen often, as it only occurs due to the erroneous VAT rates setting.