Best Practices for RQC List Filtering

Case 1: Show only Quote, Agreement/Promotion or Rebate Agreement Items Created from Specific Opportunity

By default, the application configuration is set to show relevant items of the current opened Opportunity, aka filter by ‘External Reference’:

image-20220815-035253.png

For example, filter by ‘label’ equals opportunity’s ‘Name’, we will adjust the following application configuration items:

"salesforce": {
        "opportunityAssociationField": "Name",
        "quoteOpportunityReferenceField": "label",
        "contractOpportunityReferenceField": "label",
        "rebateAgreementOpportunityReferenceField": "label"
},
 "dynamics": {
        "opportunityAssociationField": "Name",
        "quoteOpportunityReferenceField": "label",
        "contractOpportunityReferenceField": "label",
        "rebateAgreementOpportunityReferenceField": "label"
},
"sugarCRM": {
        "opportunityAssociationField": "Name",
        "quoteOpportunityReferenceField": "label",
        "contractOpportunityReferenceField": "label",
        "rebateAgreementOpportunityReferenceField": "label"
},   

Then Quote, Agreement/Promotion or Rebate Agreement list will show only items that have “uniqueName' equal to the current opportunity’s ‘Name’:

image-20220815-073032.png

Case 3: Filter Quotes, Agreements/Promotions or Rebate Agreements by Status or Last Updated Date

a) We need a filter rather than ‘equals’ operator. For example, filter Quotes that have ‘Quote Status’ is one of DRAFT, SUBMITTED, or DEAL, we will adjust the following application configuration items:

"salesforce":{
  "quoteListOpportunityFilterDefinition": {
      "filterValue": ["Draft", "Offer", "Deal"],
      "fieldName": "quoteStatus",
      "operator": "inSet"
    },
  "contractListOpportunityFilterDefinition": {
    "filterValue": ["Draft", "Offer", "Deal"],
    "fieldName": "contractStatus",
    "operator": "inSet"
  },
  "rebateAgreementListOpportunityFilterDefinition": {
    "filterValue": ["Draft", "Offer", "Deal"],
    "fieldName": "rebateAgreementStatus",
    "operator": "inSet"
  },
},
"dynamics": {...},
"sugarCRM": {...}

Then Quote, Agreement/Promotion or Rebate Agreement list will show only items that have “Status” is one of DRAFT, OFFER, DEAL:

image-20220815-083047.png

b) Or you want to get Quotes where the ‘Last Updated Date' is later than the 'Close Date’ of the Opportunity, you can use this configuration:

"salesforce":{
    "quoteListOpportunityFilterDefinition": {
      "filterValueFromField": "CloseDate",
      "fieldName": "lastUpdateDate",
      "operator": "greaterThan"
    }
},
"dynamics": {...},
"sugarCRM": {...}

And you will see:

image-20220815-085142.png

Other cases: You have to write interceptor code (quoteListFilterFilterAdd, contractListFilterAdd, rebateAgreementListFilterAdd methods) to define a custom filter for each view in the following cases:

  1. If you want more complex filter, which may contain the AND, OR or NOT operator.

  2. If you want to build filter that needs some additional queries to retrieve the data from CRMs.