Manual
Emails: which flow writes to whom and when.
Every mail of the return shipments comes from a flow of Shopware. The plugin brings ten flows on nine triggers of its own, plus nine mail templates with subject and text in German and English. They are switched on and off in the Flow Builder; in the admin the tick “Inform the customer by mail” also decides whether the customer gets a mail. This matters once returns are also filed in the admin.
In the adminOrders › Return shipments › side menu System › Flows and Mail templates
Flows
Which ten flows does the plugin bring?
The page Flows shows every flow on the triggers of the plugin, the delivered ones and your own. Nine are active after installation; “Products checked” to the team is off, because the team completes the check itself. The names have three parts: “Return shipments”, the event and the recipient.
Flow: the name with a link into the Flow Builder. The names are created on installation in the default language of the shop, German when it is German, English otherwise.
Trigger: when the flow runs, with the name from the Flow Builder.
Recipient: “Customer”, or the fixed address for the flows to the team, here service@example.com.
Flow active: a tick or a red X. A flow that is off sends nothing.
Statuses with mail: only for the flow “Status changed”, for how many statuses “Send mail to the customer” is on, “3 of 5” in a new shop.
Mail template: the template the flow sends, with a link into the email templates of Shopware.
| Flow | Recipient | Mail template | by default |
|---|---|---|---|
| Return shipments - Return shipment created - Customer | Customer | A return shipment has been created | active |
| Return shipments - Return shipment created - Team | Team | Return shipment created (team) | active |
| Return shipments - Return shipment approved - Customer | Customer | A return shipment has been approved | active |
| Return shipments - Status changed - Customer | Customer | Status changed | active |
| Return shipments - Label created - Customer | Customer | Return label to the customer | active |
| Return shipments - Resend label - Customer | Customer | Return label to the customer | active |
| Return shipments - Message from the shop - Customer | Customer | New message of the shop to the customer | active |
| Return shipments - Message from the customer - Team | Team | New message of a customer to the team | active |
| Return shipments - Products checked - Team | Team | Products checked (team) | off |
| Return shipments - Refund - Customer | Customer | Refund | active |
In the list the names of the templates start with “Return shipments - ”. Every flow has exactly one action “Send email”.
When does which trigger run?
In the Flow Builder the nine triggers of the plugin are in the group Return shipments. There a flow also gets conditions such as sales channel or customer group, further actions or additional mails. Every mail goes out in the language of the customer of the return shipment.
| Trigger in the Flow Builder | Technical name | runs |
|---|---|---|
| Return shipment created | dvsn_return_shipment.return_shipment_created | on creating in the shop, via the store API and in the admin |
| Return shipment approved | dvsn_return_shipment.return_shipment_approved | on approving in the admin, only for return shipments that wait |
| Status changed | dvsn_return_shipment.status_changed | on every real change of status, whatever the way |
| Label created | dvsn_return_shipment.label_created | per creation, several parcels of one creation once |
| Resend label | dvsn_return_shipment.label_resend | after “Send to the customer by mail” at the label in the admin |
| Message from the shop | dvsn_return_shipment.message_from_shop | on a message of the shop; an internal note triggers nothing |
| Message from the customer | dvsn_return_shipment.message_from_customer | on every message of the customer |
| Products checked | dvsn_return_shipment.goods_receipt_booked | on every “Complete check” |
| Refund saved | dvsn_return_shipment.refund_created | on saving a refund |
Lists of Shopware give them slightly longer names, for example “Return shipment status changed” or “Return label created”.
Every mail sent then stands in the tab “History” of the return shipment, with recipient, subject and flow.
How to switch a mail off or change its flow
A flow is edited in the Flow Builder of Shopware (Settings › Automation › Flow Builder). The page “Flows” of the return shipments leads there with one click when the user has the right of Shopware to view flows. The example is the flow for the change of status.
- 1
Open System › Flows in the side menu and click the name of the flow, or Open flow in the menu of the row.
- 2
In the tab General switch off Active to stop the mail. The return shipment itself runs on unchanged.
- 3
The tab Flow holds the trigger and the action Send email with its template. Conditions and further actions are added here.
- 4
Click Save. The page “Flows” shows the change after Refresh in the sidebar.
Which address do the mails to the team go to?
The flows to the team send to the email address of the basic information of Shopware (Settings › General › Basic information), as it was on installation. Without an address there, they go to every administrator. The address then stands fixed in the flow; a later change of the basic information does not reach it.
- 1
Open the flow to the team, for example “Return shipments - Return shipment created - Team”, and in the tab Flow the action Send email. The Template is “Return shipment created (team)”.
- 2
The Recipient is set to Custom.
- 3
Change the address in the list below or add a second one, for example that of the warehouse, and save action and flow.
Mail templates
Which nine mail templates are there?
The page Mail templates shows every template whose technical name starts with dvsn_return_shipment.. Editing happens in the email templates of Shopware (Settings › Content › Email templates); a change applies at once to every flow that sends the template.
Mail template: the name of its type with a link into the email templates; the delivered ones start with “Return shipments”.
Subject: the way it is stored, with placeholders such as
{{ returnShipment.number }}; the mail shows the number there.Technical name: always
dvsn_return_shipment.at the front,.customeror.teamat the end. From it the plugin knows which attachments belong to a mail.Description: what the template is meant for, for example “To the team when products were checked”.
| Mail template | Subject | to |
|---|---|---|
| A return shipment has been created | Your return shipment 50285 | customer |
| Return shipment created (team) | New return shipment 50285 | team |
| A return shipment has been approved | Your return shipment 50285 has been approved | customer |
| Status changed | Return shipment 50285: In progress | customer |
| Products checked (team) | Products of return shipment 50285 checked | team |
| New message of the shop to the customer | New message about return shipment 50285 | customer |
| New message of a customer to the team | New message about return shipment 50285 | team |
| Return label to the customer | Return label for return shipment 50285 | customer |
| Refund | Refund for return shipment 50285 | customer |
The subject as it reads in the inbox, for the return shipment 50285. Every template comes as HTML and as plain text, in German and English.
What does a mail of the return shipments look like?
The templates are built like the mails of Shopware, without a box and without a button. Header and footer of the sales channel frame them, and the sender name is the name of the sales channel. The example is the mail “Status changed”.
The salutation with title, first and last name of the customer.
A first sentence with the number of the return shipment and of the order.
The new status in bold in its colour, with its text for the customer below. A status of your own needs no change to the template.
The products as a table like in the order confirmation of Shopware: product with number, pieces and reason.
At the end a link to the return shipment, for the customer into the shop, in the mails to the team into the admin.
When a new return shipment waits for approval, “Return shipment created” tells the customer: “We check the return shipment and get back in touch.” The next steps then come with the mail of the approval.
Which data do the templates find?
Subject and text are Twig like in every template of Shopware. Which data a template finds depends on the trigger of its flow. A template from the time before the update finds the same data as before.
| Variable | holds | in |
|---|---|---|
returnShipment | the return shipment with number, status, products with pieces and reason, and the comment of the customer | every template |
customer | the customer with salutation, first and last name and email address | every template |
order | the order with order number and currency | every template |
salesChannel, salesChannelDomain | the sales channel and its domain in the language of the mail; the link into the shop runs through the domain | every template |
returnShipmentAdminUrl | the link to the return shipment in the admin | every template, meant for the team |
status, previousStatus | the new and the previous status with name, colour and text for the customer | “Status changed” |
message, senderName | the message and the name of its sender | the messages and “Return shipment created” with a message from the admin |
labels | the labels with carrier, shipment number, link to the tracking and whether a QR code is attached | “Return label” |
refund | the refund with lines, amounts, taxes and document | “Refund” |
goodsReceiptLines, goodsReceiptComplete | the products checked with pieces, stock, compensation, condition and note, and whether all are checked now | “Products checked” |
returnShipmentAttachments | whether the return document is attached (document) and how many labels (labels) | “Return shipment created” to the customer and “Return shipment approved” |
Who decides whether the customer gets a mail?
What does the tick “Inform the customer by mail” do?
Many windows in the admin carry the tick: on creating, approving, changing the status, checking and creating labels, for messages and refunds. Without the tick the plugin only holds back the mail to the address of the customer; mails to the team and to other addresses go out.
On a change of status the tick is preselected when the new status has “Send mail to the customer” on, here “In progress”. With the tick the customer gets a mail about this change, without it none.
When the matching flow is off, “No active flow, no mail goes out.” stands below the tick, with the link To the flows. Then nothing goes out even with the tick.
Without a tick, because the customer does it himself:
- A new return shipment in the shop sends “Return shipment created” to customer and team.
- A message of the customer sends the mail to the team.
- A label the customer creates on the page of the return shipment sends the mail “Return label”.
How does the customer get a mail only for certain statuses?
One single flow covers every status. Whether the customer gets a mail about a change is set by the switch Send mail to the customer at the status under Processes › Statuses. By default it is on for “In progress”, “Completed” and “Declined”. The chapter Lists shows how a status is set.
Switch it on or off at the status and save.
For a change in the admin the switch preselects the tick, and the tick decides. For a change via the API, an integration or another plugin the switch decides alone.
Attachments
Which mail gets the return document, the label or the receipt attached?
The plugin adds the attachments itself when the flow sends a template of the matching type; a template of another type in the same flow gets none. For the first mail to the customer you choose in the configuration what is attached.
| Attachment | Rule | |
|---|---|---|
| Return shipment created, to the customer | return document retoure-50285.pdf, label | following “Attachments of the mail on creation”; the label only when the customer would get one right now, and only that of the carrier chosen. While the return shipment waits for approval, nothing is attached. Created in the admin, never with a label. |
| Return shipment approved | return document, label | the document following the same setting, the label following the tick “Attach label” in the window of the approval, preselected from the setting |
| Return label (Label created, Resend label) | the labels of this creation or the one label | label as PDF or GIF, for DHL with a QR code also the image of the QR code, for example dhl-retoure-label-50285.pdf |
| Refund | document of the refund | when there is one |
| every other one | none |
Where to find them in the configuration (Orders › Return shipments › side menu System › Settings):
Card Return document and emails › Attachments of the mail on creationWhat goes with the mail "return shipment created" to the customer; while the return shipment waits for the approval, it goes with the mail "return shipment approved" instead. Labels only when the carrier is switched on and the customer gets a label right now. When approving in the administration, the tick "Attach label" decides about the labels, preselected following this setting. Created in the administration, labels only come with their own mail.
Common questions
How do I switch off the mail on creating a return shipment?
Open the flow “Return shipments - Return shipment created - Customer” in the Flow Builder and switch off “Active”. The mail to the team has a flow of its own and keeps running.
Which address do the mails to the team go to?
To the email address of the basic information of Shopware, as it was on installation, without an address to every administrator. It is changed in the Flow Builder in the action “Send email” of the flow.
Does the customer get a mail on every change of status?
Only for statuses with “Send mail to the customer”, by default “In progress”, “Completed” and “Declined”. For a change in the admin the tick “Inform the customer by mail” decides, preselected from this switch.
How do I change the text of a mail?
In the email templates of Shopware. The page “Mail templates” of the return shipments shows all nine templates and leads there with a click on the name. The change applies at once.
Can the label be attached to the first mail?
Yes. In the configuration, card “Return document and emails”, set “Attachments of the mail on creation” to “Attach return document and label”. The label is attached when the customer chose DHL or UPS and would get a label right now.
In which language does the mail go out?
In the language of the customer of the return shipment. On installation every German language of the shop gets the German texts, every other one the English texts; translating happens in the email templates of Shopware.
Why does the team get no mail after the check?
The flow “Return shipments - Products checked - Team” is off by default, because the team completes the check itself. Whoever wants the mail switches it on in the Flow Builder.
Where do I see which mails went out?
In the tab “History” of the return shipment. Every mail stands there with recipient, subject and flow.
More chapters