Send automatically the invoice on the e-mail

Modified on Mon, 7 Jul at 2:46 PM


You have two options to send automatically the invoice on the e-mail:



1. Through the Shopify service: 


a. Send the invoice download link when you create the shipping label

b. Send the invoice download link when you mark the order as Dispatched

c. Send the invoice download link when you don't use xConnector to generate Shipping labels


2. Through the invoice service*: 

 




1. Through the Shopify service: 


When you create the shipping label in xConnector, Shopify automatically updates the order status to Fulfilled and sends the Shipping Confirmation email. This email includes the shipping label number (tracking number).

At this stage, you also have the option to add the invoice download link.

The trigger for this action is the generation of the shipping label.

If the invoice has already been created before the shipping label is generated, the Shipping Confirmation email can automatically include the invoice download link.




✅ The Shipping Confirmation email can include the invoice download link when you:

  • Create documents (a shipping label together with an invoice)

  • Create bulk documents (multiple shipping labels together with the invoices)

  • Create the invoice first, then generate the shipping label

  • Create bulk invoices first, then generate bulk shipping labels

Why?


When Shopify detects that the fulfillment has been completed, it automatically sends the Shipping confirmation email.

At this point, the invoice has already been generated, so the email can include a link to download the invoice.


❌ The Shipping Confirmation email cannot include the invoice download link when you:

  • Generate the shipping label first, then create the invoice

  • Generate bulk shipping labels first, then create bulk invoices

  • The invoice is created automatically through the Tracking module

  • The invoice is created automatically through Cash Reimbursement import



Why?


When Shopify detects that the fulfillment has been completed, it automatically sends the Shipping confirmation email.
At this point, the invoice has not yet been issued, so the email is sent but cannot include a download invoice link, since the invoice has not been created yet.




How does it work?


When you generate a shipping label, xConnector sends the fulfillment information to Shopify, automatically updating the order status from Unfulfilled to Fulfilled.

Once the order is marked as Fulfilled, Shopify automatically sends the customer an email titled Shipping confirmation. This email includes the tracking number, and—after personalizing the template—you can also add a link to download the invoice.



Example:







How to add the invoice download link in the Shipping confirmation e-mail?



1. Copy the script below that can be included in the Shipping confirmation email 



{% for attribute in order.attributes %}
{% if attribute.first == 'xconnector-invoice-short-url' %}
<p>Download your <a href="{{ attribute.last }}">invoice</a> .</p>
{% endif %}
{% endfor %}


If you cannot copy the code from here, you can find it also in the following:

xConnector > Tools > Download invoice link





2. Insert the code into the Shipping confirmation email template in Shopify.



Shopify > Settings > Notification > Shipping > Shipping confirmation > Edit code



  • Find in the code the ‘Tracking numbers’ section:</tr> - right after the second {% endif %}
  • Copy - Paste the code






When do you want to send the Shipping confirmation e-mail?


You can choose when you want to send the Shipping confirmation to the customer. 

There are two different methods:


a. Send the Shipping confirmation when you create the shipping label 

b. Send the Shipping confirmation when you mark the order as Dispatched



Here you can find how both methods work:




If you choose to send the Shipping confirmation when you create the shipping label, you must follow these steps:


  • set as default the option of sending the Shipping confirmation e-mail:
xConnector > Profile > Preferences > Default values > check Send Shopify notification 


Also, you can select/deselect this option any time you want when you generate the shipping label+invoice (tab Observations): 



  • generate a shipping label + an invoice, or generate the invoice and then the shipping label. 



If you generate only the shipping label, Shopify will send the Shipping confirmation automatically but it will not include the invoice download link because it needs to be created first. So, you just need to generate the shipping label and the invoice at the same time. 






b. Send the invoice download link when you mark the order as Dispatched


If you choose to send the Shipping confirmation when you mark the order as Dispatched, you must follow these steps:


  • make sure you uncheck the option Send Shopify notification in xConnector
   xConnector > Profile > Preferences > Default values > uncheck Send Shopify notification 


  • generate the documents (shipping label and invoice) without marking them as Dispatched -> the orders will be displayed at In Progress 


  • after you generate all the documents, you must dispatch them in xConnector (even if you already hand over your packages to your courier, or you will). 



You can mark orders as Dispatched in two ways: 

  • manually 
  • with the barcode scan. 



Mark orders as Dispatched  manually



  • xConnector
  • In-progress page
  • Select order/ orders
  • Create documents - Click on the Arrow 
  • Click on Dispatch orders
  • Check to Send Shopify notification option

            

  • Click on Dispatch order



Now the orders are moved from In Progress page into Dispatched page, and the customers receive the Shipping confirmation email, including the tracking number and invoice download link.  


Also, now your orders are organised into three categories: 

  • New Orders: newly imported orders from Shopify that don't have any documents generated
  • In progress: orders that have already documents generated but aren't ready to be Dispatched
  • Dispatched: orders which you marked as Dispatched don't need anymore to be processed 






Mark orders as Dispatched  with a barcode scan








This method helps you to have more control over the processed orders. Eliminating manual work also eliminates the errors that may appear when you process the charges and prepare them to hand over to the courier. 






c. Send the invoice download link when you don't use xConnector to generate Shipping labels


You can choose this option when you don't generate shipping labels through xConnector and yet you opt for sending the invoice download link through the Shipping confirmation e-mail.


This options works if you generate first the invoice in xConnector and after that you mark manually the order as Fulfilled in Shopify or the order is marked automatically as fulfilled by another integrated app. 

So, the trigger is the order status: when it is changed in Fulfilled - Shopify sends the Shipping confirmation email, where you can add the invoice download link. 


When the order is Fulfilled, Shopify automatically sends the customer the e-mail named Shipping confirmation. This e-mail includes tracking number information; here, you can also have the invoice download link. 




How to save the download invoice link in the customer account?



You can also add the download invoice link in the client account on your website: My account


Just edit the My account template and add the same script for Download invoice link 

(xConnector > Profile > Tools > Download invoice link)















This feature is available for the Advanced subscription plan

Feel free to contact us if you need any further information:


Chat: click on the blue chat icon (bottom-right)

E-mail: support@xconnector.app

Phone: +4 0373 747 991







2. Through the invoice service*: 


When you create the invoice in xConnector, the invoice service already integrated in xConnector automatically sends an email which includes the invoice .pdf document




How does it work?


When you create an invoice in xConnector, the invoice service's API sends it to the customer by email. This email is separate from Shopify notifications and only contains the invoice.

 

Settings:

Setting up an email server on the your invoice platform according to their documentation.


xConnector settings: 

xConnector > Profile > Preferences > Default values > Send invoice by email 
xConnector > Profile > Preferences > Default values > Invoice notification subject


Check the option to send the invoice by email, add a text for the notification subject, and then click the Save button.







This feature is available for all the subscription plans

Feel free to contact us if you need any further information:


Chat: click on the blue chat icon (bottom-right)

E-mail: support@xconnector.app

Phone: +4 0373 747 991








Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article