Email automation for the order processing.
Proposal summary
Need to implement the solution for email automation needed for the main order processing.
Requirement
When an order is created, and the PO is created, automatically send an email with the PO to the vendor. The template can be chosen based on if the order is a standard order or a dropship order, and then based on the Shipping Method (Ground, 2 Day, etc.)
Prerequisites
- Revised PO template and refund template need to be created in account.
Our Solution
Prerequisites
- RSP Supply needs to provide the email address from which the mails should be sent for each type of emails.
- RSP Supply needs to provide the details about different types of email template used for different purposes( including the attachment details if any attachment needs to be included in that email).
Description of the task
The requirement can be achieved by deploying a script on sales order, item fulfillment, cash sale, invoice and cash refund records and purchase order record and creating email templates for each type of email.
Email templates that will be used for each type of emails:
Email Automation: Send PO
The script deployed on the purchase order:
- When an order is created, and the PO is created, automatically send an email with the PO to the vendor. The template can be chosen based on if the order is a standard order or a dropship order, and then based on the Shipping Method (Ground, 2 Day, etc.)
- When a drop ship purchase order/ standard purchase order is created then an email will be sent to the vendor along with the purchase order pdf.
- Template based on shipping method when creating the purchase order:
– PO – Drop Ship 1 (Next Day / Standard Overnight)
– PO – Drop Ship 2 (2Day / 2nd Day)
– PO – Drop Ship 3 (3 Day Select / Express Saver)
– PO – Drop Ship 5 (Ground)
– PO – Standard -> will be user for standard purchase orders
Email Automation: Revised PO
- When a purchase order has the products, quantities, or prices change, send an email to the vendor with the updated PO following the “Revised PO Template”
- Updates in PO: The same needs to be done vice versa for the PO also, as the updates in the quantity of in PO are affecting the quantities in SO. So once the quantity is updated we will send the revised SO to the customer along with the revised PO email which is to the vendor. For this to be working we need to create a workflow for SO and we need an additional effort of 1 hour.
- Here we need to deploy a script, which will check whether the following changes for the PO upon the save action. If we find any changes then the revised template will be sent to the vendor.
- New products added or removed
- Quantities changed for any of the products
- Prices changed for any of the products
Note: we will not send email, if the user changes any of the values other than above.
Note: Revised PO template is not available in the account.
Email Automation: Send Updated Ship Date:
The script deployed on the sales order:
- When a sales order is edited and then saved, check to see if the Expected Ship Date has changed. If it was updated, send an email using the “Updated Ship Date” Template
- When the expected ship date is entered/changed then an email with updated ship date template will be sent to the Customer(edit context). The sales order pdf will be attached to this email.
- Update ship date template for customer
- SO – Update (Sales Order)
Email Automation: Updated Products/Quantities
The script deployed on the sales order:
- When a Sales order is edited and new products are added, or product quantities are changed, send an email to the customer using the “Confirmation” Template.
- New products added or removed
- Quantities changed for any of the products
- Prices changed for any of the products
- Confirmation template for customer
- SO – Confirmation (Sales Order)
- Updates in SO: If the user updates the quantity in an item line, in which dropship PO already exists, then the quantity will be updated in the PO automatically. But if the user changes the price or amount, then it will not be reflected in the related PO. So in that case, we need to send a revised PO email to the vendor along with a revised SO email to the customer when the user changes quantity in SO.
In that case, if the user changes multiple lines in SO, then we need to send an email for each PO in those specific lines. For this to be working we need to create a workflow for PO and we need an additional effort of 1 hour.
Email Automation: Order Shipment Update
The script deployed on the item fulfillment:
- When an order has been partially or fully shipped (creating an Item Fulfillment form), send an email to the customer using the “Order Shipment Update” Template. This email does not need the auto generated packing slip with it.
- When an item fulfillment is created for a sales order then an email will be sent to the customer with ‘order shipment update template’( there will not be any attachment along with this). The email will be sent on each time when new item fulfillment is created for a sales order.
- Order shipment template for customer
- SO – Estimated Ship Date (Sales Order)
Email Automation: Order Complete
- When new item fulfillment is created then the script will check whether the status of the sales order is changed to billed (i.e, the sales order is completely fulfilled and fully billed), then it will be considered as the order is completed and a mail will be sent to the customer with ‘order complete’ template. The sales order pdf will be attached to this email.
- Order complete template for customer
- SO – Complete (Sales Order)
Note: we are deploying the script only in the item fulfillment for the order complete, because we assume that in the current process as per the workflow, the sales order will be billed initially and then item fulfillment is created.
We hope that there won’t be any scenario like, the sale order is fulfilled initially, and then the creating the invoice for the sales order. If there is such a scenario, then order complete mail will ne be initiated.
When a new invoice/cash sale is created then the script will check whether the status of the sales order is changed to billed (i.e, the sales order is fulfilled and fully billed), then it will be considered as the order is completed and a mail will be sent to the customer with ‘order complete’ template.The sales order pdf will be attached to this email.
Email Automation: Refund
The script deployed on the refund:
- When a cash refund is created in the system, send an email to the customer using the “Refund” Template
Email Automation: Invoice
The script deployed on the invoice:
- When a invoice is created in the system, give the option under the save menu to “Save and Email” to automatically send an email to the customer using the “Invoice” Template
- Invoice template
- INV – Invoice
- Since the “Save and Email” is a standard button, email will send automatically and we cannot restrict that action. The email will be sent to the email id near to the “To be emailed” checkbox field as per the attached image. So the possible workarounds are as follows.
- Solution 1: We will check the at the time of invoice creation and see whether the terms is “Net 30” or not. If it is “Net 30”, we will send an email to the customer automatically, upon the save action using script.
Estimate: 3 hour Solution 2:Since the “Save and Email” is a standard button, email will send automatically and we cannot restrict that action. So we will add our own button in the form named “Save & Email” and we will hide the standard “Save & Email” button. So from the custom button user can initiate the script and email will be sent to the customer.Estimate: 4.5 hour
Please let us know your preferred option from the above?
Assumptions
- The purchase order pdf will only be needed to be emailed when creating the purchase order and also when any changes occurred in products, quantities, or prices. If any changes occur other than the mentioned one, then email will not be sent to the vendor.
- The email to the customer with ‘order complete’ template will be sent only when the sales order is fully billed and fulfilled.
- If the order is completed (i.e, the fully billed) when creating a new fulfillment(IF is fully shipped) for a sales order then two mails will be set to the customer, one is the email with ‘order shipment’ template and the other one is the email with ‘order complete’ template.
- The templates listed in the task description will be used in the different scenarios. But the ‘Revised PO Template’ and the ‘refund template’ were not able to be found in the email template folder in the document. It will be helpful if the RSP Supply cloud provides these details.
Risk
- There will be some performance degradation (time lag) for saving the sales order and purchase order record after editing the record as the script needs to check whether there are any changes occurred in products, quantities, or prices on each line.
- In future if you would like to do updates via CSV, then please check “ RUN SERVER SUITESCRIPT AND TRIGGER WORKFLOWS” while importing. Once it is true the script will run automatically and the email will send.
- The system email sending option should be turned off.
- We will hardcode the template name to the script. If you would like to change, please change data inside the template other than creating a new one for the same purpose.