This topic contains 9 replies, has 0 voices, and was last updated by amccausland 7 years, 2 months ago.

  • Author
    Posts
  • #18385

    karenn

    Hello all,

    I have not worked with email templates at all but I have a request from someone to send out nightly emails to some customers if their backorder has been delayed. I am thinking about using a scheduled script to get the list and send the emails out. Is it possible to use an email template in a scheduled script. I am not seeing anything in the N/email definition in the Help Center. Hoping to avoid having to create the format in script so I can off load the email layout on someone else.

    Thanks,

    Karen
    This is a cached copy. Click here to see the original post.

  • #18386

    Dew

    I’m not familiar with scheduled scripts, but I would use a workflow to accomplish this. Search for “Welcome Email Sent to Customers Three Days After First Order Workflow” in the NetSuite Help Center to see an example.

  • #18387

    pcutler

    Yes, you can use an email template in a scheduled script – check out the N/render module.

    However, if your needs are simple enough, you might want to consider a scheduled saved search to send the email, no scripting necessary.

  • #18388

    karenn

    Unfortunately a workflow will not work because it has to be based on if an individual item on a sales order is backordered. Workflows and sublists…no go

    I will check out N/render.

    Thanks!

  • #18389

    david.smith

    Yep, N/render will do it. If you need help attaching records let me know. You can do the same in SS1.0 if you need to.

  • #18390

    karenn

    From what I see, unfortunately, an email template is not going to work as we need to list items on a sales order unless I am missing something.

    Anyone know how to include images in an email body if we want to use N/email email.send? Since this is in NetSuite, not sure how since can’t pull off server

  • #18391

    david.smith

    There are a few ways to do the images. 1) base64 them 2) make them available w/o login or 3) PDF the document and send with the email as attachment.

    The email template should be able to handle the Freemarker code to parse your line items.

  • #18392

    karenn

    If there is a way to add item lines in the email template create form I am not seeing it but until today I have never looked at NetSuite email templates

  • #18393

    pcutler

    Originally posted by karenn

    View Post

    If there is a way to add item lines in the email template create form I am not seeing it but until today I have never looked at NetSuite email templates

    Take a look at the advanced templates NetSuite created for printing sales orders and invoices for examples of how to loop through item lines with Freemarker. You will have to click the “Source Code” toggle to see the code.

    Here’s an example:

    Code:

    ${item.quantity@label} ${item.item@label} ${item.options@label} ${item.rate@label} ${item.amount@label}
    ${item.quantity} ${item.item}
    ${item.description}
    ${item.options} ${item.rate} ${item.amount}
  • #18394

    amccausland

    You can attach the Transaction to the email message as a PDF. The email.send parameters allow and control this.

You must be logged in to reply to this topic.