Adding Data for MyInsights Pages

Users can add and filter data for MyInsights pages using data elements.

After adding and previewing the data, users can define the page layout. See Defining MyInsights Page Layouts for more information.

The following data elements are available:

Get Data

Calculate Data

  • Calculate Fields for List - add custom calculated fields for records in existing data elements
  • Calculate Value(s) - calculate one or more custom field values using data from existing data elements
  • Filter List - filter a list of records from an existing data element
  • Merge Lists - combines different data type selections in a single display element, for example a chart or table
  • Sort List - sort a list of records from an existing data element by a calculated field
  • Sublist - get a subset of a list of records from an existing data element

Adding Data Elements

There are limitations for loading CRM sales data in order for it to be accessible from MyInsights. See Adding Data for MyInsights Pages for more information on querying sales data using MyInsights Studio.

To add a data element to a page:

  1. Select the page name or select Edit from the Actions menu for the page you want to add a data element to. The Data Palette page displays.
  2. Select Add Data Element.
  3. Select the Element Type.

  4. Select Next.

  5. Populate the Name field.
  6. Enter the appropriate information for the data element.

  7. Select OK.
  8. Select the Refresh button in the Preview section to view the resulting data. Preview the data often to ensure the results are reasonable.
  9. Select Save once all of the desired data elements are added. If there are no errors, a deployable version of the page is created.

Defining Where Clauses for Query Data Elements

When defining Where clauses for a query data element to filter the data results, users must include a field on the queried object, an operator, and an expression. The expression can use data from other data elements. The operators available for selection in a Where clause depend on the data type of the selected field.

Field Data Type

Compatible Operators

Any (String, Number, Date, Bool)

  • Equals
  • Not equal to

Comparable (String, Number, Date)

  • Greater than
  • Greater or equal
  • Less than
  • Less or equal

String

In

Salesforce Field Types

The following Salesforce field types are supported:

Salesforce Field Type MyInsights Studio Field Type
Auto Number String
Formula Field type of the result of the formula
Lookup String
Master-Detail String
External Lookup String
Checkbox Boolean
Date Date
Email String
Number

Float

Percent Float
Phone String

Picklist

When querying picklist fields, both the API name and the translation values are available in the data element preview and can be used within the data elements and page layout.

String
Picklist (Multi-Select) String
Text String
Text Area String
Text Area (Long) String
URL String
Currency (supported for query data elements)

Number

Currency symbols do not display in data previews.

Date/Time (supported for query data elements) Datetime

Using the Get Field Value Based on CRM Context Data Element

Users can query a field value from the org based on the current user using the Context Query data element. The objects available depend on the selected page type.

Page Type

Objects

  • Account_Reports_vod
  • Account_Profile_Override_vod
  • KOL_Profile_vod
  • Account
  • User
Account_Plan_vod
  • Account
  • Account_Plan_vod
  • User

EM_Speaker_vod

User

Inventory_Monitoring_vod
  • Account
  • Inventory_Monitoring_vod
  • User
Orders_vod
  • Account
  • Order_vod
  • User
  • Territory_Insights_vod
  • Territory_Insights_Default_vod
User

Territory_Feedback_vod

User

Users can populate the following information when creating a query:

  • Object – A CRM object available for the selected page type for which the user has at least Read access
  • Field – A field on the object to display. Only fields for which the user has at least FLS read permission are available.

A context query returns a single record with a single field as output.

Using the Get Aligned Territories Data Element

Users can view a list of aligned territories for the current user. Content creators can select to include the child territories for each aligned territory.

Content creators must have access to the MyInsightsTerritoryController Apex class to work with this data element in MyInsights Studio.

Using the Get CRM Data Element

Users can query data records from the org using the CRM Query data element. Users can populate the following information when creating a query:

  • Object – Any CRM object for which the user has at least Read access
  • Fields – Fields on the object to display. Only fields for which the user has at least FLS read permission are available. Multiple fields can be selected.
  • Limit (optional) – Number of records to display.

    The Preview fetches and displays a maximum of 200 records regardless of the limit.

  • Sort (optional) – Display order of the records based on field values
  • Where Clause (optional) – List of individual or grouped WHERE clauses joined by AND or OR. See Defining Where Clauses for more information.

    Strings defined in the where clause are case sensitive in pages deployed to iPad.

A CRM query can return a single record or a list of records as output, depending on the limit defined by the user. Each record can contain one or more fields.

Using the Get Nitro Data Element

Users can query data from Nitro based on the current user using the Nitro Query data element. See Nitro Help for more information about Nitro.

To configure users for Nitro access, navigate to Setup > Custom Settings > VDS Settings and enter the appropriate profile in the VDS Profile setting.

Users must populate the following information when creating a query:

  • Table – Any Nitro table for which the user has at least Read access
  • Fields – Fields on the object to display. Multiple fields can be selected.
  • Limit (optional) – Number of records to display.

    The Preview fetches and displays a maximum of 200 records regardless of the limit.

  • Sort (optional) – Display order of the records based on field values
  • Where Clause (optional) – List of individual or grouped WHERE clauses joined by AND or OR. See Defining Where Clauses for more information.

A Nitro query can return a single record or a list of records as output, depending on the limit defined by the user. Each record can contain one or more fields.

Using the Get Sales Data Element

Users can query sales data from the org using the Sales Data Query data element to display and analyze the data in custom MyInsights pages. The sales data must already be loaded into the org. See Loading Sales Data into Veeva CRM for more information.

Users must populate the following information when creating a query:

  • Scale – Dropdown menu with options to define the queried sales data as weekly or monthly
  • Data Type – Type of sales data queried (e.g. TRx, NRx)
  • Account IDs – Account(s) for which to query the sales data
  • Start Date (optional) – Earliest date of sales data to query
  • End Date (optional) – Latest date of sales data to query
  • Sort – An ordered list of sort keys, where each sort key is composed of a sales data field (see table) and a direction (Ascending or Descending). Can be empty.

    Sales Data Field

    Data Type

    Account_Id_vod__c

    String

    ID_vod__c

    String

    Market_vod__c

    String

    Market_Id_vod__c

    String

    Product_Group_vod__c

    String

    Product_Group_Id_vod__c

    String

    Sales_Date_vod__c

    Date

    Sales_Data_vod__c

    Number

  • Limit – Empty by default. Defines the number of records to display.

    The Preview fetches and displays a maximum of 200 records regardless of the limit.

A sales data query can return a single record or a list of records as output, depending on the limit defined by the user. Each record can contain all of the sales data fields (see table).

Using the Calculate Fields for List Data Element

Users can add custom calculated fields for records in existing data elements using the One for One data element. Users must populate the following fields when defining the calculated fields:

  • Data Source – An existing data element. Only data elements with a list of records as output are available.
  • Fields – List of fields to display, including fields from the data source and additional calculated fields. After selecting the data source, all of the output fields for the data source display, but can be removed. Select Add to define a calculation for a new field. For each calculated field, users must define the field name and specify the type of calculation using expressions and a list of records from any existing data element.

A one for one calculation returns a list of records. Each record can contain one or more fields.

Using the Calculate Values(s) Data Element

Users can calculate one or more custom field values using data from existing data elements using the Summarize data element.

For each calculated field, users must define the field name and specify the type of calculation using expressions and a list of records from an existing data element. Select Add to add a field.

A summarize calculation returns a single record with one or more fields as output.

Using the Get Current Date Data Element

Users can get the current date as a single record with a single value using the Today element. Users do not need to populate any additional information to retrieve this value.

Using the Get Current Date and Time Data Element

Users can get the current date and time as a single record with a single value using the Now element. Users do not need to populate any additional information to retrieve this value.

Using the Get Translated Object Names Data Element

Users can get the singular and plural translations of an object name using the Object Translation element. These values can be used as labels and values in data and display elements. When the MyInsights page is deployed to users in a multi-country org, the labels are automatically translated in the correct language for each user. Users can select any CRM object for which they have at least Read access.

Using the Get Translated Field Names Data Element

Users can get the singular and plural translations of object field names using the Field Translation element. These values can be used as labels and values in data and display elements. When the MyInsights page is deployed to users in a multi-country org, the labels are automatically translated in the correct language for each user. Users must populate the following information:

  • Object – Any CRM object for which the user has at least Read access
  • Fields – Any fields for which the user has at least FLS read permission. Multiple fields can be selected.

Using the Get Veeva Messages Data Element

Users can query Veeva Messages from Veeva CRM using the Veeva Messages element. This element queries existing Veeva Messages, so users must create any custom Veeva Messages in their orgs before they can be used in MyInsights Studio. Users can use custom Veeva Messages as translations for custom text, for example, using a field calculated by a One for One element as a label. When the MyInsights page is deployed to users in a multi-country org, the Veeva Message in the correct language displays for each user.

Users can select Add to query multiple Veeva Messages at once. Users must populate the following information for each Veeva Message:

  • Category – Category of the Veeva Message
  • Name – Name of the Veeva Message

Using the Sort List Data Element

Users can sort a list of records from an existing data element by a calculated field using the Sort List element. A calculated field refers to any field created as a result of a data element, for example, the One for One element. Users must populate the following information:

  • Data Source – An existing data element. Only data elements with a list of records as output are available.
  • Sort By – A calculated field selected from the Data Source or a data calculation entered directly. Users can select Add to add fields, which are used to sort records in case of ties. Users can select the sort order for each field.

Using the Filter List Data Element

Users can filter a list of records from an existing data element using the Filter List element. Users must populate the following information:

  • Data Source – An existing data element. Only data elements with a list of records as output are available.
  • Filter by – A boolean expression. The results only contain records for which this boolean expression is true.

Using the Sublist Data Element

Users can get a subset of a list of records from an existing data element using the Sublist element. Users must populate the following information:

  • Data Source – An existing data element. Only data elements with a list of records as output are available. The order of the output records is maintained.
  • Skip this many – Number of records to skip, starting from the first record in the list.
  • Keep this many – Number of records to keep, starting from the record immediately following the last skipped record.

Using the Merge Lists Data Element

Content creators can use the Merge List data element to easily combine different types of data in a single display element, for example a chart or table, by merging multiple data elements. The content creator can choose which fields in the input elements are mapped to which fields in the output. Each input maps to exactly one output field.

For example, users can see sales data and interaction data on the same trend chart, or recent Medical Inquiries and Medical Insights in the same table.

When using Deep Linking in a combined table, each table line contains a deep link to the correct object.

When configuring a View Record navigation action, MyInsights Studio automatically detects the correct object to link to based on where the ID field came from.

Using the Get from CRM Data Engine Data Element

Users can view large data sets from the CRM Data Engine. Content creators do not need to populate any additional information to retrieve this value.

Using the Get Attendee Info for Call Data Element

Content developers can query call attendee information using the getAttendeesForCurrentCall method. The data retrieved includes both data committed to the local database and data in memory (changes made before a user saves or submits the call report).

The getAttendeesForCurrentCall method returns Account IDs listed in the Attendees section of the Call Report. The Account ID of the parent call is not included.

Using the Get Territory Feedback Data Element

The following queries are available:

  • Overview - query data about the territory and cycle
  • Channel Goals - query data about the channel goals in the user's territory feedback
  • Product Goals - query data about the product goals in the user's territory feedback
  • Account Data - query data about the account list in the user's territory feedback
  • Account Channel Goals - query data about the account list in the user's territory feedback
  • Account Product Goals - query data about the product goals in the user's territory feedback
  • Account Product Metrics - query data about the product metrics in the user's territory feedback