Add Customer Statement Link to Email Template

PayPack supports adding a Customer Statement Link to NetSuite's Advance PDF/HTML template. This type of template is found under Customization > Forms > Advance PDF/HTML Templates.

To add the Customer Statement Link Field to this form:

  1. Open the form you would like to add the customer statement link 
  2. Toggle Source Code to edit the html

If you would like to add a Customer Statement Link to a button, you will need to add the field ID, record.entity.custentity_pp_customer_statement_link, to the source code of your document:

Add Customer Statement Link to NetSuite PDF.png

PDF Template Preview

Preview PDF - Click for Statement Link.png

Sample HTML Snippets

Invoice Template

To display a Click for Statement Link on the NetSuite Invoice template, use the sample syntax.

<#-- PayPack Customer Statement Link -->
<#if record.entity.custentity_pp_customer_statement_link?has_content>
  <#assign rawStmtLink=record.entity.custentity_pp_customer_statement_link>
  <#assign statementLink=rawStmtLink?replace('.*href="([^" ]+)".*', '$1' , 'r' )>
  <table style="width: 100%; margin-top: 10px;">
    <tr>
      <td align="right" style="text-align:right;">
        <a href="${statementLink}" style="text-decoration: underline; color: #635BFF; font-size: 10pt; font-weight: bold;">Click for Statement Link</a>
      </td>
    </tr>
  </table>
</#if>

Statement Template

When adding a Pay Now on the NetSuite Statement template, use this sample syntax.

<#-- PayPack Customer Statement Link -->
 <#assign rawLink = "">
 <#if (customer.custentity_pp_customer_statement_link)?has_content>
 <#assign rawLink = customer.custentity_pp_customer_statement_link>
 </#if>
 <#if rawLink?has_content>
 <#assign paymentLink = rawLink?replace('.*href="([^"]+)".*', '$1', 'r')>
 <table style="width: 100%; margin-top: 10px; margin-bottom: 20px;">
    <tr>
       <td style="text-align: center;" align="left">
          <div style="margin-left: 0px; padding: 0px 20px; display: inline-block; background-color: #635bff; color: white; font-weight: bold; border-radius: 5px !important; font-size: 18px;">
             <a style="text-decoration: none; color: #ffffff;" href="${paymentLink}">Pay Now</a>
          </div>
       </td>
    </tr>
 </table>
 </#if>
Was this article helpful?
0 out of 0 found this helpful

More resources