...
Now test the Wawi workflow on a test order by first creating a test order in your store (cash payment or similar) and transferring it to the WAWI. Set the payment for the order via "Vai Pay" and a payment receipt. Make a note of the order number (e.g. 123).
Go to JTL-Workflows by choosing Aufträge > Komplett bezahlt > “Auftrag_Komplett bezahlt”
Your workflow actions should look something like this:
Start the test
Select an object by searching for order number (e.g. 123)
Open the order again. The invoice recipient has been changed:
Set up E-Mail template
As a seller, you have to send the buyer's invoice to the intermediary. In this case, a differentiation based on payment type must be set up in the e-mail template. The correct e-mail address for the transaction has already been set by the workflow. The corresponding DealNumber has been assigned in the incoming payment for the transaction. Open Admin → “Druck- / E-Mail- / Exportvorlagen“
...
Adapt subject
If you have not made any changes to your standard e-mail template, you can use the code as it is. Otherwise, adapt the code or insert your modifications in the ELSE part:
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "Vai Pay" %}
Rechnung zu VAI-Deal: #{{ Vorgang.Zahlungen.ErstesObjekt.ExterneTransaktionsID }}
{% else %}
Rechnung über "{{ Report.InvoicePosition[0].Name | Truncate: 20 }}"{% case Report.InvoicePosition.Size %}{% when 0%}{% when 1 %}{% when 2 %} und einem weiteren Artikel{% else %} und {{ Report.InvoicePosition.Size | Minus: 1 }} weiteren Artikeln{% endcase%} von {{ Report.Company.CompanyName }}
{% endif %} |
Customise Invoice PDF Name
The same applies to the naming of the PDF invoice name. Insert your modifications in the ELSE part at the end of the code line:
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "Vai Pay" %}#{{ Vorgang.Zahlungen.ErstesObjekt.ExterneTransaktionsID }}.pdf{% else %}Rechnung-{{ Vorgang.Rechnungsnummer }}.pdf{% endif %} |
On operation
Shop
The payment method is integrated in the storefront of the store like a regular JTL store payment method.
...