Auto Tagging Orders with Delivery Dates #️⃣

Tagging orders with Delivery Dates entered by your customer on your storefront requires the use of the Auto Tagging tool.

To set this up, new rules must be created within the Auto-tagging tool. Go to Giftship –> Auto Tagging. Depending on how you are taking Delivery Dates on your storefront (product pages or cart page), the rule creation will be specific to that.

If taking Delivery Dates on your Product Pages…

Go to Giftship –> Auto Tagging –> Manage Auto Tagging.

Select New Auto Tagging Rule, and enter in the title that you would like to apply to the new rule (this is only for internal purposes and will not be seen by your customers).

In the Auto Tag Event Section, select Run this auto tagging rule when an Order is Created.

In the Conditions section, select the Condition Line items properties name. This is where in the order the data is initially passed through to.

Then select Is Equal To = Delivery Date

In the Tag section, you can then add whatever tag you would like to apply to this order. In this case, we will want to pass through the attribute value, which is the date (a dynamic value).

Here is the code to enter in this section:

Whatever you have named your datepicker, please replace the DATEPICKER_NAME text below, with whatever you have named your datepicker in Giftship’s settings. By default, this is Delivery Date

{% for line_item in order.line_items %}{% for property in line_item.properties %}{% if property.first != "DATEPICKER_NAME" %}{% continue %}{% endif %}{{ property.last }}{% endfor %}{% endfor %}

So if the line item property is named “Delivery Date”, this is what you would enter:

{% for line_item in order.line_items %}{% for property in line_item.properties %}{% if property.first != "Delivery Date" %}{% continue %}{% endif %}{{ property.last }}{% endfor %}{% endfor %}




In the Tag Behaviour section, select Kept as they are, with new tag appended.

Save the Tag, and make sure to Enable it.

You will now see this tag applied to any order in which a date is entered:

If taking Delivery Dates on your Cart Page…

Go to Giftship –> Auto Tagging –> Manage Auto Tagging.

Select New Auto Tagging Rule, and enter in the title that you would like to apply to the new rule (this is only for internal purposes and will not be seen by your customers).

In the Auto Tag Event Section, select Run this auto tagging rule when an Order is Created.

In the Conditions section, select the Condition Note Attribute Name (Additional Details). This is where in the order the data is initially passed through to.

Then select Is Equal To = Delivery Date

In the Tag section, you can then add whatever tag you would like to apply to this order. In this case, we will want to pass through the attribute value, which is the date (a dynamic value). And we will also pass through a static value, just the terms ‘delivery-date’.

Here is the code to enter in this section:

{% for attribute in order.note_attributes %}{% if attribute.name == "Delivery Date" %}delivery-date-{{ attribute.value }}{% endif %}{% endfor %}

In the Tag Behaviour section, select Kept as they are, with new tag appended.

Save the Tag, and make sure to Enable it.

You will now see this tag applied to any order in which a date is entered:

Can't find the answer in our documentation?
Contact Support