SES Verification

In order for the emails to be sent by our system from a different domain, that domain first has to be verified with our system to authorise the platform to send emails from this domain. This requires an Architect

After the domain is properly verified you receive 4 DNS records which will need adding to the domains DNS by the administrator of the sender’s domain, example below;

Name
Type
Value
_amazonses.domain.com
TXT
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABC._domainkey.domain.com
CNAME
ABC.dkim.amazonses.com
DEF._domainkey.domain.com
CNAME
DEF.dkim.amazonses.com
GHI._domainkey.domain.com
CNAME
GHI.dkim.amazonses.com

Also the administrator of the sender’s domain needs to include _spf.custom-gateway.net within their domain’s SPF record. For example:

            "v=spf1 include:_spf.custom-gateway.net"
      

Email Templates & Placeholder Values

The content of the Email is specified in the HTML and plain text input boxes, both of which should be filled where possible.

These templates support the use of certain placeholder variables a list of which can be located at the end of this post.

Any attribute available on the order or the item can be added to the template as can the name, description and URL of any of the print jobs assets these are added in the following way (where x equals the attribute name):

            {{ order.x }}
            {% for item in order.items  %}
            {{ item.x }}
            {% for personalisation in item.personalisation %}
                Name: {{ personalisation.name }}
                Value: {{ personalisation.value }}
                Allow Input: {{ personalisation.allow_input }}
            {% endfor %}
            {% endfor %}

As you can see from the above example the item must be contained within a loop which goes over every item in the orders items attribute the same has to be done for the personalisation but this loop must be contained within the items loop as each item has its own set of personalisations.

Lastly if you want to display parts of the email only if a certain attribute exists are is set to a specific value then a if must be used as follows:

            {% order.shipping_method == "RM1" %}
            Order is First Class
            {% endif %}
            {% if order.shipping_tracking %}
            Order tracking ID: {{ order.shipping_tracking }}.
            {% endif %}

The first if will display the contents if the shipping method of the order is RM1 exactly whereas the second if will display its contents as long as the shipping tracking is set no matter the values

Variable reference

         
            order.id  
            order.company_ref_id  
            order.secondary_company_ref_id  
            order.ref  
            order.status  
            order.shipping_company  
            order.shipping_address_1  
            order.shipping_address_2  
            order.shipping_address_3  
            order.shipping_address_4  
            order.shipping_address_5  
            order.shipping_postcode  
            order.shipping_country  
            order.shipping_country_code  
            order.billing_company  
            order.billing_address_1  
            order.billing_address_2  
            order.billing_address_3  
            order.billing_address_4  
            order.billing_address_5  
            order.billing_postcode  
            order.billing_country  
            order.customer_name  
            order.customer_telephone  
            order.customer_telephone_mobile  
            order.sale_datetime  
            order.external_ref  
            order.has_been_completed  
            order.completion_datetime  
            order.shipping_method  
            order.customer_email  
            order.shipping_carrier  
            order.shipping_tracking  
            order.shipping_note_url  
            order.payment_trans_id  
            order.payment_type  
            order.creation_datetime  
            order.additional_info  
            order.has_error  
            order.error_message  
            order.required_dispatch_date  
            order.consolidate  
            order.has_been_invoiced  
            order.billing_customer_name  
            order.billing_customer_email  
            order.billing_customer_telephone  
            order.shipping_price  
            order.shipping_price_inc_tax  
            order.shipping_tax_rate  
            order.is_urgent  
            order.tag  
            order.coupon_code  
            order.currency_code  
            order.is_free_of_charge  
            order.status_name    

Must be contained within

            item.id  
            item.sale_vat_rate  
            item.external_ref  
            item.ref  
            item.order_id  
            item.sku  
            item.mapped_sku  
            item.description  
            item.colour  
            item.size  
            item.quantity  
            item.type  
            item.print_job_id  
            item.print_job_promise_ref  
            item.external_url  
            item.external_thumbnail_url  
            item.status  
            item.print_on_demand_ref  
            item.plain_stock_item_ref  
            item.license  
            item.license_percentage  
            item.unit_sale_price  
            item.unit_sale_price_inc_tax  
            item.unit_cost_price  
            item.shipping_price  
            item.shipping_price_inc_tax  
            item.bundle_ref  
            item.textual_product_id  
            item.product_variant_id  
            item.quantity_batched  
            item.quantity_dispatched  
            item.stock_request_id  
            item.artwork_barcode  
            item.status_name          
Must be contained within  which itself must be contained in
            personalisation.name  
            personalisation.value  
            personalisation.allow_input