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

 

OrderBy

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

Usage

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

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

CustomFilter

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

Variables

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.

Usage

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

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

Example

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

Was this article helpful?

/

Comments

0 comments

Article is closed for comments.