Monday, June 3, 2019

Send email with PDF transaction attached when Email From Address is not a billing person, but Sales Rep who is assigned to customer

A company has only one user/employee who bills all sales orders, cash sales and invoices which come from company's sales reps. When this user perform the billing process an email with attached transaction is sent to a customer, the user/employee who bills these transactions is not the one who created these transaction. In the most of time it happens that customer replies on this email which is received by billing person, but not by sales rep who worked on this transaction before.

See the processes when the workflow is triggered and an email with PDF attachment is sent to a customer:
Bill Sales Orders - when you submit this process, an invoice is automatically created and email is sent to a customer.
Invoice - when invoice is created, an email is sent to a customer.
Cash Sale - when cash sale is created, an email is sent to a customer.

The workflow will be restricted and it will be triggered only at the time when a specific employee/user perform Bill Sales Orders, create Invoice or Cash Sale process.

  1. As the Administrator go to the Customization > Scripting > Workflow > New.
  2. In the Basic Information section:
    • Provide a Name
    • Record Type = Transaction
    • Sub Types = Cash Sale, Invoice
    • Release Status = Testing; When a workflow is in testing mode, only the workflow "owner" can initiate the workflow on a record.
    • Enable "Execute as Admin" check box.
  3. In the Initiation section enable "Event Based" radio button.
  4. In the Event Definition section enable the "On Create" check box and Trigger Type set to "After Record Submit". Event Type set to "Create".
  5. Click on the Save button.
  6. In the Diagram section > click on the New State > Click on the Save button.
  7. Click on the State 1 > Actions sublist > Click on the New Action button > select Type as "Send Email".
  8. In the Basic Information section:
    • Trigger On = After Record Submit
    • Event Type = Create
  9. In the Condition section select a user/employee who will have a permission to execute the workflow (the user/employee who performs billing for your company).
  10. In the Sender section enable the "From Field" radio button. Set the Record to "Current Record" and set the Field to "Sales Rep".
  11. In the Recipient section enable the "From Field" radio button. Set the Record to "Current Record". Set the Filed to "Customer".
  12. In the Content section use the Template you've already created for emails or use Custom message you would like to use for this process.
  13. In the Attachment section enable the Include Transaction check box and set Type to PDF. This means that email will be sent with PDF Invoice or Cash Sale attached.
  14. Click on the Save button.

Now, when you perform billing process or create Invoice or Cash Sale, an email with attached PDF transaction will be received by customer with sales rep's email from address. Please note that in the case of Cash Sale, it's necessary to disable "Email To" checkbox for a Cash Sale record as well as for an Invoice record.

No comments:

Post a Comment