Articles on: Order management

Enable order confirmation email with slot date and time

Once a customer places an order, the customer needs to be informed about the date and time he/she has picked.

The order confirmation email can be updated by following steps.

A. Shortcut Via our App: Settings -> Notifications



B. Then look for: Edit order confirmation email



Or Via Shopify Admin: In your Shopify admin Go to Setting → Notifications → Order Confirmation

Notification Settings


In the body of the email template insert the following code in the given sequence.

Below code you can edit as per your store language.
{% 
  ###################################
  # Below code you can edit as per your store language
  ###################################
%}

{% assign translated_method = "Delivery,Pick Up,Shipping"  | split: "," %}
{% assign translated_days = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"  | split: "," %}

{% 
  ###################################
  # Don't change below code
  ###################################
%}
  
  {% assign keyValuePairs = nil %}
  {% assign Bird_flag = true %}
        
{% for line_item in line_items %}
  {% for property in line_item.properties %}
   {% if property.first == '_BirdChimeSlotId' and Bird_flag %}
      {% assign Bird_flag = false %}  
    {% assign keyValuePairs = property.last | split: ";" %}
      {% for pair in keyValuePairs %}
        {% assign keyAndValue = pair | split: "=" %}
        {% assign key = keyAndValue[0] %}
        {% assign value = keyAndValue[1] %}
        {% case key %}
          {% when 'M' %}
            {% if value == 'D' %}
            {% assign Bird_Method = translated_method[0] %}
            {% elsif value == 'P'%}
              {% assign Bird_Method = translated_method[1] %}
            {% elsif value == 'S'%}
              {% assign Bird_Method = translated_method[2] %}
            {% endif %}
          {% when 'D' %}
            {% assign Bird_Date = value %}
          {% when 'L' %}
            {% assign Bird_Location_Id = value %}
          {% when 'T' %}
            {% assign Bird_Time = value %}
        {% endcase %}
        {% assign bird_index = Bird_Date | date: "%w" | plus: 0 %}
        {% assign Bird_Day =  translated_days[bird_index] %}
      {% endfor %}
    {% endif %}
  {% endfor %}
{% endfor %}

{% if order.attributes['Delivery Method'] and keyValuePairs == nil %}
  {% if order.attributes['Delivery Method']  == 'Delivery' %}
    {% assign Bird_Method = translated_method[0] %}
  {% elsif order.attributes['Delivery Method']   == 'Pick Up'%}
    {% assign Bird_Method = translated_method[1] %}
  {% elsif order.attributes['Delivery Method']  == 'Shipping'%}
    {% assign Bird_Method = translated_method[2] %}
  {% endif %}
  {% assign Bird_Date = order.attributes['Delivery Date'] %}
  {% assign Bird_Time = order.attributes['Delivery Time'] %} 

  {% if Bird_Method == translated_method[1]  and order.attributes['Delivery Location'] %}
    {% assign BIRD_LOCATION = order.attributes['Delivery Location'] %}
  {% endif %}

  {% assign bird_index = Bird_Date | date: "%w" | plus: 0 %}
  {% assign Bird_Day =  translated_days[bird_index] %}
{% endif %}
        

{% if order.attributes['Translated Delivery Time'] %}
  {% assign Bird_Time = order.attributes['Translated Delivery Time'] %} 
{% endif %}


{% 
  ###################################
  # Below code you can edit as per your need
  ###################################
%}

{% if Bird_Method %}
  <table class="container">
    <br/>
    <tr>
      <td>
        <h4>Delivery Method</h4>
        {{ Bird_Method }}<br>
        {{ BIRD_LOCATION }}
        {% if Bird_Date %}
          <h4>Date & Time</h4>
          {{ Bird_Date | date: "%d.%m.%Y" }}
          {% if Bird_Time %}
            {{ Bird_Time }}
          {% endif %}
          {% if Bird_Date %}
            ({{ Bird_Day }})
          {% endif %}
        {% endif %}
        <br/>
      </td>
    </tr>
  </table>
{% endif %}


We recommend to paste the code above the Order Summary table as shown below. You have the rights to paste the code at any place.


Below is a sample image of the order confirmation email with above template code

Confirmation email with date &amp; time
Change date format
You can use one of following options to format date in your desired format in the order confirmation email.
{{ Bird_Date | date: "%d-%m-%Y" }}


{{ Bird_Date | date: "%m-%d-%Y" }}


{{ Bird_Date | date: "%Y-%m-%d" }}


{{ Bird_Date | date: "%d.%m.%Y" }}


In case of Store Pickup you should make the following change as well



Open the Order Confirmation Email Code:

Locate {% case delivery_method %} in the email code somewhere around line 20-24.
Insert the Following Code:

{% if order.attributes['Delivery Method'] != 'Pick Up' %}
          We're getting your order ready to be shipped. We will notify you when it has been sent.
{% else %}
          Your pickup order has been received.
{% endif %}




Below is a sample image of the "Pickup order has been received email" with above template code




Need Help?



If you are facing issues with the setup like the slot picker not appearing or the slots not working as per your requirement. We provide setup assistance for free. Please ping us via in-app chat bubble or mail us at support@birdchime.com for setup assistance.

Updated on: 05/01/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!