Email Notification Configuration and Automation

Videos and Files
Video walks through the process of setting up mail shots and despatch notification emails in linnworks.
Email Notifications
Video walks through the process of setting up mail shots and despatch notification emails in linnworks.



Overview

Linnworks Order Management and Stock Control system is capable of generating and sending automated HTML emails when an order is despatched, returned, exchanged or resent. In addition Linnworks can attach invoice and return form as PDF to the email generated. This documentation describes how to set this functionality up.

Setup

  • To access the email notification configuration go to Settings > Email Notification;
  • Click Enable Email Notification;
  • You will need to specify your email SMTP server. This information is readily available from your email provider or ISP;

Configuration

  • Send Instantly (no queuing in Outbox) – instructs Linnworks to send the email instantly, immediately after it has been generated. (for example, when an order is processed - right when you click Process button on the Process Order Screen or do a Batch Process)
  • There are several template types available in the list of Templates. Each template type is wired to a specific event in Linnworks (i.e. Order Processing, Return Booking etc)
    • Dispatch Notification Email – triggers email generation when an order is Processed
    • Return Receipt – triggers when an order item is being returned
    • Order Items Resend notification – triggers when you create an order item is Resent
    • Order Item Exchange notification – triggers when you create and an order item exchange
    • Return booking – triggers when you Book an Order Item for return
    • Order item exchange Booking – triggers when you book an Order Item for exchange
    • Late shipping communication (manual mailshot) – this template allows you to generate mailshots for Open Orders screen by right clicking on the multiple orders. This template uses order information to populate its internal variables.
    • Custom mailshot to open orders (manual mailshot) – the template allows you to specify any text in the mail template and generate a manual mailshot from open order book, much like Late shipping communication but this template does not require order data and therefore works a lot quicker than late shipping.
  • To Enable the template double click on the red/green dot. Red- disabled, Green – enabled
  • To Edit the Template double click on the template name in the grid.

Editing templates

Things to know about the email template

  • Email template can be a plain text or HTML formatted (meaning that you can create HTML e-mails);
  • Email template has data tags encapsulated in [{ }]. The data tag is a variable which is replaced with a value from the order the email is generated for. For example [{ORDER.CFULLNAME}] will output the customer name;
  • There is a evaluation engine which enables you to programmatically define the output. For example, the following expression
EVAL<N2[1+2]>

will output 3 when the email is generated.

  • You can evaluate a data tag inside the evaluation expression and output a conditional text. For example, the following expression
EVAL<IIF["[{ORDER.SOURCE}]"="EBAY","Order is from eBay","Order is not from eBay"]>

will output Order is from eBay if the order source equals EBAY, otherwise will output Order is not from eBay.

  • You can have iteration for order all items, for example
FOREACH(OrderItems){BEGIN}
[{ORDERITEMS.ITEMNUMBER}] - [{ORDERITEMS.ITEMTITLE}] x [{ORDERITEMS.NQTY}]
{END}

will output the list of all order items as OrderItemNumber – Order Item Title x Quantity.

You can have multiple templates for a single template type. Each additional template will be conditional. You can specify conditions as direct logical function, for example

Source='EBAY' or Source='AMAZON'

will apply this template only if this order is from Amazon or eBay.

  • The conditions are not the same as evaluation expressions and their usage syntax is a little different (see remark for examples and list of available fields);
  • Each template type must have Default template. The default template cannot have conditions and will be used if none of the conditional templates qualify to the condition specified when the email is generated;
  • You can disable and enable the templates. If you disable the default template and none of the conditional templates qualify – the email will not be generated at all;
  • You can set the system to prompt you to View and Edit the email before it is generated;
  • Each email template can have PDF invoice attachment (see PDF Invoice Attachment section);

Editing

Double click on the template type you want to edit in the Templates grid.

Use menu bar to access the data tags and iterations.

menu_bar.png

foreach_button.jpg - Iterations. Inserts FOREACH()<>
Note: when using inside HTML formatted email edit the FOREACH to look like.

FOREACH(OrderItems){BEGIN}
{END}

data_tag_button.jpg - Inserts a data tag. Each data tag refers to a data value in the order you are generating the email for. The data tags are arranged by tables they belong to.

EVAL_button.jpg - Inserts evaluation tag EVAL<>
Note: When using inside HTML formatted email, change the tag to.

EVAL{BEGIN}
{END}

Example of the Despatch Notification email template

Dear, [{ORDER.CFULLNAME}].

Thank you for your purchase with us through [{ORDER.SOURCE}] order reference [{ORDER.REFERENCENUM}], our system order number [{ORDER.NORDERID}] on [{ORDER.DRECEIEVEDDATE}].

I am glad to inform you that the order has been despatched with [{ADD-IN.SHIPPINGMETHOD}] on [{ORDER.DPROCESSEDON}]

You order details:

[{ORDER.CSHIPPINGADDRESS}]

Products:

FOREACH(OrderItems)<

[{ORDERITEMS.ITEMNUMBER}] - [{ORDERITEMS.ITEMTITLE}] x [{ORDERITEMS.NQTY}] [{ORDERITEMS.FPRICEPERUNIT}] [{ORDER.CCURRENCY}] each

>

SubTotal: EVAL<N2[[{ORDER.FTOTALCHARGE}]-[{ORDER.FPOSTAGECOST}]-[{ORDER.FTAX}]]> [{ORDER.CCURRENCY}]

P&P Cost: [{ORDER.FPOSTAGECOST}] [{ORDER.CCURRENCY}]

Tax: [{ORDER.FTAX}] [{ORDER.CCURRENCY}]

Total: [{ORDER.FTOTALCHARGE}] [{ORDER.CCURRENCY}]

Calculated TAX (15% inclusive) : EVAL<N2[[{ORDER.FTOTALCHARGE}] * 15 / 115]> [{ORDER.CCURRENCY}]

EVAL<IIF["[{ORDER.POSTALTRACKINGNUMBER}]"="","",concat["Postage Tracking number: ","[{ORDER.POSTALTRACKINGNUMBER}]"]]>

EVAL<IIF["[{ORDER.SOURCE}]"="EBAY","Thank you for buying from our excellent eBay shop, please leave feedback.",""]>

EVAL<IIF["[{ORDER.SOURCE}]"="AMAZON","Thank you for buying from our excellent Amazon shop, please leave feedback.",""]>

EVAL<IIF["[{ORDER.SOURCE}]"="WEBSITE","Thank you for buying from our excellent shop www.myshop.com. Visit us again.",""]>

EVAL<IIF["[{ORDER.SOURCE}]"="DUMMY","Source related text will go here",""]>


Best Wishes

The Data tags are highlighted in bold.
Foreach iteration highlighted in blue.
The evaluation expression is highlighted in orange.
Expression function is highlighted in red.

Creating multiple conditional email templates for the same type

  • To create conditional email template click Add New.
  • Specify a condition under which the email will be generated.
  • The new template condition will be added to the drop down list. Switch to the conditional template by selecting it from the list.

Conditional fields available:

cEmailAddress, cShippingAddress, cPostCode, dReceievedDate, dDispatchBy, fPostageCost, fTotalCharge, fTax, cCurrency, nOrderId, nStatus, Source, ReferenceNum, ExternalReference, cCountry, PostalTrackingNumber, cFullName, CreatedBy, bProcessed, dProcessedOn, Address1, Address2, Address3, Town, Region, BuyerPhoneNumber, Company, SubSource, Subtotal, PostageCostExTax, CountryTaxRate

Examples of the conditions:

Source='EBAY' or Source='AMAZON'

when source of the order is EBAY or AMAZON

Source='EBAY' AND SubSource='EBAY0'

when source of the order is EBAY and the order came from the primary ebay account, i.e. subsource is EBAY0

(cCountry='France' AND Source<>'EBAY') or (cCountry='France' AND SubSource='My French Amazon account)

when country is France and order is not from eBay or when order is from France and subsource is specific amazon account with the name My French Amazon Account.

Preview template while editing

To preview the template click Preview Dummy. On the email template edit screen – this will produce the email body as per dummy order.

  • If you set Attach PDF Invoice option. The preview will also generate an attachment and you can view it by double clicking on the attachment file in the list.
  • Alternatively you can view what the email will look like for a specific open order (Only Open orders will be viewed, processed orders will generate Order Not Found error).
  • Click on the Preview for Order and enter Linnworks Order Id.

Sending emails

  • Emails are generated and sent (if you set Send Instantly option) whenever the event for which the template designated to is triggered. For example Despatch notification email is generated whenever you process an order.
  • If you haven't set the Send Instantly option for email templates, all emails will be queued in the Email Outbox screen.
  • You can view the queue by going into Synchronization > Email Outbox.
  • From Email Outbox you can also view the content of the email, change it and send the emails.