WebApi Custom OrderBy and CustomFilter Parameters From Insight

  • Updated

The CustomFilter and OrderBy parameters can be used to control the results of Panels within Riva Insight.

  • CRM Supported: Salesforce, others TBC
  • The support for the parameters is dependent on the QueryBy Type being used.
QueryBy Type OrderBy CustomFilter IsMinimal Fields
ForPluginKeyword Y Y Y N
ForPluginUpcoming Y N Y N
ForPluginRecent Y N Y N
ByAccountId Y N Y N
ByParentId Y N Y N
ByCustom Y Y Y N
ByEmails N N Y N
ByIds N N N Y


When selecting a mailbox item in context view, Insight displays query results controlled by the CRM connection in use. 

Before selecting Track, context view search does not have a way to specify the OrderBy parameter.

To change the sort order on a specific field for a syncing module in context view (before selecting Track):

Apply the advanced option to the Insight CRM connection: Crm.Salesforce.PollChangesLastModifiedField.[Module] = [field_name] asc, [field_name_2] desc



The OrderBy parameter can be used to change the default order of results displayed in Panels within Riva Insight.


<Parameter Name="OrderBy">
  <Value>date__c asc</Value>

<Parameter Name="OrderBy">
  <Value>Account.Name asc, date__c desc</Value>


The CustomFilter parameter can be used to add additional filters to further restrict the results in Panels within Riva Insight.


The same variables that are used for the sync connection queries/filters can be can be used within the paramater (WebApi will replace the varialbes with actual results). A couple examples include:

  1. For current user: {UserId} or {CurrentUser.Id}
  2. For predefined properties: {CurrentUser.PrimaryEmail}
  3. For fields: {CurrentUser.Fields[Contact_ID__c]}

Reach out to the customization team on what is available to be used.


<Parameter Name="CustomFilter">
  <Value>OwnerId = '{UserId}'</Value>

<Parameter Name="CustomFilter">
  <Value>AS_Person__c ='{CurrentUser.Fields[Contact_ID__c]}' AND New_Sync__c = true) OR 1=2</Value>


<Panel Id="OrganizationContactsIOwn">
  <Icon Value="far fa-address-card" />
    <Setting Module="Contact">
        <Parameter Name="AccountId">
        <Parameter Name="CustomFilter">
          <Value>OwnerId = '{UserId}'</Value>
        <Parameter Name="OrderBy">
          <Value>Account.Name asc, date__c asc</Value>
        <Parameter Name="Count">

Was this article helpful?




Article is closed for comments.