Add a Table to the Redwood Sales Dashboard

On the Sales Dashboard, data can be rendered in a table format. You can add a new table to the Sales Dashboard using one of the predefined tables available for use. Or, add a new table that pulls its data from a custom saved search. This topic illustrates a simple example.

What Tables Can You Add?

The below table components are already available for the Sales Dashboard. You can add these components to any custom Sales Dashboard layout, as needed.

  • Deals At Risk saved search table

  • My Open Opportunities saved search table

  • My Team's Opportunities saved search table

  • Tasks Due in the Next 30 Days saved search table

If none of these tables meet your needs, then you can also define a custom saved search and then add it as a new table to the Sales Dashboard.

Prerequisites

  1. Create the custom saved search and share it with the job roles who view the dashboard. Create Saved Searches for the Sales Organization.

  2. Capture the UUID of the saved search. You'll use the UUID when adding the table to the Sales Dashboard in Visual Builder Studio. For details see the topic How can I find the UUID for a saved search in Sales in the Redwood User Experience?

  3. Duplicate a Sales Dashboard layout so that you can modify it.

    See Configure Redwood Sales Dashboard Layouts.

Display the Custom Saved Search as a Table in the Sales Dashboard

Let's add a table to a dashboard layout for a sales representative.

Before you start, duplicate the Sales Representative - My ToDo's Content dashboard layout as described in Configure Redwood Sales Dashboard Layouts so that you have a layout that's ready to modify.

  1. On the Properties pane for the Sales Representative - My ToDo's Content (Copy) layout, click the + Add Section icon > + New Section.

    This screenshot illustrates how to add a component to a layout.

  2. In the Create Section dialog, in the Title field, enter Opportunities at Risk, and click OK.

    Note: The title is the name of the component, not how the component will appear at runtime on the dashboard. The runtime title comes from the subview component that you add to the dashboard.

    The newly added section is added to the bottom of the layout. Use the Move Up arrow to move the new section to the desired location.

    This screenshot illustrates how to reposition a component in a dashboard layout.

  3. Click the Opportunities at Risk link.

    The template editor opens.

  4. Click the Code button.

    This is a screenshot of the Code button.

    Your new Opportunities at Risk section displays with empty placeholder template tags.

    This screenshot illustrates the empty template tags.

  5. On the Components palette, in the Filter field, enter cx-subview.

  6. Drag and drop the cx-subview fragment to the template editor, between the template tags.

    This screenshot illustrates how to drag a fragment to the template editor.

  7. Add the following parameters to the fragment code so that the code looks like the below sample:

    <template id="opportunitiesAtRisk">
      <oj-vb-fragment name="oracle_cx_fragmentsUI:cx-subview" class="oj-flex oracle-cx-fragmentsUI-cx-fragment-full-height" bridge="[[ vbBridge ]]">
          <oj-vb-fragment-param name="resource" value='[[ {"name": "opportunities", "primaryKey": "OptyId", "puid": "OptyNumber", "endpoint": "cx" } ]]'></oj-vb-fragment-param>
          <oj-vb-fragment-param name="query" value='[[ [{"type": "savedSearch", "params": [{"key": "queryUuid", "value": "e7e61371-9c42-47bb-a16d-8e6c4235cf1c" }]},
                                                        {"type": "qbe", "params": [{"key": "WinProb", "operator": "lt", "value": 40 }]},
                                                        {"type": "qbe", "params": [{"key": "EffectiveDate", "operator": "gte", "value": "now/d-30d" }]},
                                                        {"type": "qbe", "params": [{"key": "EffectiveDate", "operator": "lte", "value": "now/d+90d" }]}] ]]'></oj-vb-fragment-param>
          <oj-vb-fragment-param name="sortCriteria" value='[[ [{"attribute": "WinProb","direction": "asc" },
                                                               {"attribute": "Revenue","direction": "desc" }] ]]'> </oj-vb-fragment-param>
          <oj-vb-fragment-param name="style" value="[[ 'dashboard' ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="title" value="[['Opportunities at Risk']]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="subviewLayoutId" value="[[ 'dashboardLayout' ]]"></oj-vb-fragment-param>
    </oj-vb-fragment>
    </template>
    

    In your fragment code, be sure to replace opportunities, OptyId, and OptyNumber with the appropriate values for your object name, primary key, and puid.

    Also, replace the queryUuid value with the saved search's UUID value. Review the values for the "query," "sortCriteria," and "title" parameters, and adjust as necessary.

    This table describes some of the parameters that you can provide for a table.

    Parameters for Dashboard Table

    Parameter Name

    Description

    resource

    Specify resource details for the saved search, including object name, primary key, puid, and endpoint.

    For a list of resource details for common Sales objects, see "Resource Details for Sales Objects" in Add a List to the Redwood Sales Dashboard.

    query

    Include criteria for querying the data.

    sortCriteria

    Specify how to sort the data.

    title

    Specify the title of the table. This title displays on the dashboard at runtime.

  8. Test the modified dashboard layout by previewing your application extension.

    1. Click the Preview button to see your changes in your runtime test environment.

      This is a screenshot of the Preview button in Visual Builder Studio.
    2. The resulting preview link will be:

      https://<servername>/fscmUI/redwood/cx-sales/dashboards/sales-dashboard

    3. Change the preview link as follows:

      https://<servername>/fscmUI/redwood/cx-sales/application/container/dashboards/sales-dashboard
  9. Save your work by using the Push Git command.

    Navigate to the Git tab, review your changes, and do a Git push (which does both a commit and a push to the Git repository).

    This screenshot illustrates how to use the Push Git command.

Add a Revenue Table Component

You can also add a revenue table to the Sales Dashboard.

To add a revenue table, the steps are the same as adding a table, but the fragment code is different. The fragment code includes a "child" parameter.

Add the following fragment code so that the code looks like the below sample. (The template name can be whatever you select.)

<template id="revenueTable">
<oj-vb-fragment name="oracle_cx_fragmentsUI:cx-subview" class="oj-flex oracle-cx-fragmentsUI-cx-fragment-full-height" bridge="[[ vbBridge ]]">
    <oj-vb-fragment-param name="resource" value='[[ {"name": "opportunities", "primaryKey": "OptyId", "puid": "OptyNumber", "endpoint": "cx" } ]]'></oj-vb-fragment-param>
    <oj-vb-fragment-param name="child" value='[[ {"name": "ChildRevenue", "primaryKey": "RevnId"} ]]'></oj-vb-fragment-param>
    <oj-vb-fragment-param name="query" value='[[ [{"type": "savedSearch", "params": [{"key": "queryUuid", "value": "73b21b33-db08-4327-bf30-88c3c9e0f70d" }]}] ]]'></oj-vb-fragment-param>
    <oj-vb-fragment-param name="style" value="[[ 'dashboard' ]]"></oj-vb-fragment-param>
    <oj-vb-fragment-param name="title" value="[['Revenue']]"></oj-vb-fragment-param>    
    <oj-vb-fragment-param name="subviewLayoutId" value="[[ 'dashboardLayout' ]]"></oj-vb-fragment-param>
  </oj-vb-fragment>
</template>

In your fragment code, be sure to replace the queryUuid value with the saved search's UUID value and update the "title" parameter.