Highlight PDF as per the record changes

Formatting on PDF Templates as per the latest changes in the transcations.

Proposal summary

We will enable the advanced PDF templates and customize these templates to highlight the values and to add horizontal lines. Also we will include new email templates to the existing scripts.

Our Solution

Sales order

We will enable the advanced PDF templates and customize these templates to highlight the values and to add horizontal lines.

We have to create new advanced PDF templates for SO, CS, IF PO and Invoice . For that, we will use the mockup of the basic templates and gridlines will be added after each item horizontally.

Once we have created new PDFs we need to perform the following actions.

  • Once we have created a new PDF we have to set it as the preferred form
  • And we have to select this as the PDF template in the transaction forms.
  • Need to update the existing scripts for automatic email sending, to change the template Ids from basic to advanced templates.

Expected ship date templates on SO

Following comparisons will be done for the ship date field on the line level.

If old_Value == new_Value:

             Do Nothing

Else if old_Value == Null (The field was empty and is now filled)

             Send “SO – Expected Ship Date” Template (We will send an email using the SO – Estimated Ship Date email template whenever the first date value appears in any of the body lines. This email will be sent only once.
The attached PDF of SO will be highlighted with the new estimated ship date that has been added. SO the ship date value will be in BOLD)

Else if old_Value != Null (The field was already filled out but has changed)

             Send “SO – REVISED Expected Ship Date” Template (We will send an email using the “SO – REVISED Expected Ship Date”  template, if and only if any of the existing line ship date is changed in the line level.

The attached PDF of SO will be highlighted with the new estimated ship date that has been updated on the item lines. SO the ship date value will be in BOLD.
The old value will not display in the PDF)

The expected ship dates will not be updated at the time of creation. So the script will be for other contexts like edit/copy.

When users perform a copy of an existing order, the ship dates will be auto populated automatically at the time of creation. So in that case, if any of the lines existes with ship date then we will send email using the SO – Estimated Ship Date Template . In this case, there will be no highlighting the PDFS.

Est. Ship Date field will be added to the PDF.

Note: Currently for the revised SO, like when an item is added/removed/updated currently we are using “SO-confirmation” email.  As per the new update, If a new line time is added, existing line item updated with quantity/price  then we will use the “SO – REVISED Confirmation template”.
Scenario: If a new line time is added and  existing line quantity and ship date also changes ,then email will be sent using the “SO – REVISED Confirmation template”.

SO – Confirmation and CS – Confirmation emails

So we assume that this email should be sent at the time of SO or cash sale creation. Advanced PDFs will be attached to the  SO – Confirmation and CS – Confirmation email templates.

  • There will be a horizontal bar between each item’s lines.
  • No data will be highlighted on the PDF as this is sent at the SO and CS creation time.

SO – REVISED Confirmation template emails

We were using SO-Confirmation email for the SO updates. SO from now onward we will be using “SO – REVISED Confirmation template” for the updates after creation. And a PDF will also be attached along with the email that uses an advanced PDF template.

Following fields will be highlighted(BOLD in balck) on the PDF, if any of the following values have been changed.

  • Body level Shipping Address
  • Body level Shipping Method
  • Quantity change in any item line 
  • Unit Price  change in any item line
  • NEW Item has been added

Each item in the PDF will be separated by horizontal lines.

Shipping Address, Shipping Method, Order Total etc wii not be added to the email template. 

But we will add the shipping address , shipping method and order total to the PDF if it is not existing already.

Shipping Address: 1234 Test Dri

                             Test City, TS 12345

Shipping Method: Test Shipping Method

Order Total: $123.45 

We assume that the items will not be removed, if yes no email will be sent. Because, In our process, we do not remove line items, we only change the quantity to 0, so that will hopefully not cause issues with the process.

Summary for Email templates:

In all the above cases, advanced PDF will also be attached and PDF values will be highlighted based on the last changed values as mentioned above.

Item Fulfillment

Current scenario: When an Item Fulfillment is created/edit and saved, the script will send an email to the customer from the Item Fulfillment form using the “IF – Shipping Update” template. This e-mail includes the PDF attachment of the Packing Slip.

New Update: The item lines on the PDF along with the email( “IF – Shipping Update” template) will be highlighted. So on the IF- PDF, the lines that are on that specific IF form would be bolded, with the lines from the rest of the order on the PDF as well to provide a complete image. 

Current scenario: But the email  IF – Shipping Update will send , if and only if the Item fulfillment has at least one tracking number on the packages tab.
Also when sending SO – Confirmation, we will check whether tracking numbers exist. 

New Update:In both cases, we will be checking whether any of the item lines contains a tracking number in any item line instead of the packages tab.

RSP: Please notify us when the fix has been made. For now we will include the tracking numbers in the line item field and the packages tab to ensure that the e-mails are being sent.

We will also add the shipping address and shipping method to the PDF body in the following format.

Shipping Address: 1234 Test Dri

                             Test City, TS 12345

Shipping Method: Test Shipping Method

PO and invoice

PO and Invoice

  • We will create new advanced PDF templates for PO and Invoice and we will update the existing scripts to remove the basic template. 
    • There won’t be any difference on the email templates. 
    • Horizontal lines will be added between the timelines, in the attached PDF

Assumptions

  • The expected ship dates will not be updated at the time of creation either in the body/line. So the email sending script will be for other contexts like the edit/copy context.
  • We assume that users will not directly update the body level shop date in SO.
  • Maximum number of lines possible in the SO → 80%, 2.-3lines rest will have 15-30 ideally
  • We may inactivate the existing scripts from 6 pm-7am RSP time for our testing purpose.
  • The SO updated emails will be sent, whenever the dropship PO is updated also.
  • We will consider the copy context using “Make a copy” of the transactions also while development.
  • The advanced PDFs will contain the same current fields as of basic templates. Any additional fields require extra field hours. Final field mapping between the fields can be provided before starting development.
  • The alignment will be little different between the basic and advanced fields on the PDF. We can provide a sample PDF mockup after enabling the Advanced PDF feature, and we will atrt development accordingly.
  • We have to create new advanced PDF templates for SO, CS, IF PO and Invoice and we will update the existing script to remove the basic templates.

Risks 

  • The save action of SO/CS/IF can be slow, if there are many lines in the SO and since we are doing comparisons for multiple changes in the record fields to replicate in the email template.

Budget and Time

TaskTime Required
Analysis3
Field mapping between Basic and advanced template field2
Update form and Update all existing scripts with a new advanced PDF template by removing the basic template.6
Expected ship date templates on SO(Additional email templates for ship date) / PDF16
PDF on SO – Confirmation and CS – Confirmation6
SO – REVISED Confirmation template emails / PDF10
PDF on Item Fulfillment10
PO and Invoice6
Testing8
Deployment and documentation1
Total68 hours

Leave a comment

Your email address will not be published. Required fields are marked *