SAP Knowledge Base Article - Public

3538006 - Product Values Not Displaying in Email Template Placeholders

Symptom

When sending an email (e.g., from an Opportunity), the product placeholder values do not appear in the email template.

Environment

  • SAP Sales Cloud Version 2
  • SAP Sales and Service Cloud Version 2

Reproducing the Issue

  1. Open the navigation menu.
  2. Select Guided Selling view.
  3. In the Guided Selling view, locate and open the desired opportunity.
  4. Find the Activities section.
  5. Click on New and select Email.
  6. Click on Add Templates and choose a Template.
  7. Click Email Preview.
  8. Notice that the template is displayed, but the placeholders are not replaced with the expected values.

Cause

This issue occurs because placeholders for arrays, such as product attributes, require either an index to access specific items or a loop to render multiple items dynamically. Without specifying an index or loop, the template cannot retrieve and display individual product details.

Resolution

To display all entries dynamically, use a loop structure in the template.

To render multiple products, wrap {{items.productDisplayId}} in an {{#each items}} loop. This allows each product in the array to be displayed as a new row. Inside the loop, reference each field as {{this.productDisplayId}}, {{this.productDescription}}, etc., for dynamic rendering of all items.

<table class="table-container">
    <tbody>
        <!-- Table Header -->
        <tr class="tddata">
            <td>Product Code</td>
            <td>Product Description</td>
        </tr>

        <!-- Loop to Display Each Product -->
        {{#each items}}
        <tr class="tdsubdata">
            <td>{{this.productDisplayId}}</td>
            <td>{{this.productDescription}}</td>
        </tr>
        {{/each}}
    </tbody>
</table>

See Also

3434774 - Placeholder in Email Template is not populated with Desired Value

Keywords

Placeholder, Templates, Array, Email, Opportunity, Products, items, Sales Cloud Version 2, CNS , KBA , CEC-CRM-GS , Guided Selling/Opportunity for SAP Sales/Service Cloud , CEC-CRM-TMP , Templates for SAP Sales/Service Cloud , How To

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0