Riva CRM Integration - Documentation and Knowledge Base

Salesforce: Customize the IsClosed Detection

Article ID: 886
Last updated: 09 Mar, 2020

For Riva Cloud and Riva On-Premise, it is often important to determine if a module item is considered closed and should be considered an inactive item.

Examples:

  • A new status was added to the Opportunity module to track opportunities that are delayed but not closed. Such opportunities are to be processed by Riva as closed items: they are to be removed from the email system AssignTo folder structure.
  • A new IsInactive checkbox custom field was added to the Contact module to track contacts that are no longer active. When the contacts become inactive, they are to be processed by Riva as closed items, so as to be removed from the address book.

Implementation for Riva Cloud

Implementation for Riva On-Premise

To determine if a module item is considered closed and should be considered an inactive item:

  • Apply the following advanced options to the sync policy or Salesforce connection:

    Sync.Crm.[Field to Examine]Field.[Module] = [Result], where [Field to Examine] and [Module] are set as per the following table and [Result] is the Salesforce field that tracks the item.

    Sync.Crm.[Field to Examine]Regex.[Module] = [Regular expression of the list of values that mean that the field being examined is closed.]

    In the table, the Example column stores a regular expression to match the value returned from the CRM.

    [Module] [Field to Examine] Example of a Regular Expression
    Contact IsClosed true
    Opportunity IsClosed true
    Quote Status Approved|Rejected|Denied
    Task IsClosed true

Example to override IsClosed for an opportunity:

Situation: A new status was added to the Salesforce Opportunity module to track opportunities that are delayed but not closed. Such opportunities are to be synced as closed items: they are to be removed from the email system AssignTo folder structure.

  • Apply the following advanced options to the sync policy or Salesforce connection:

    Sync.Crm.IsClosedField.Opportunity = StageName

    Sync.Crm.IsClosedRegex.Opportunity = ^Closed.*|^Active - Delayed

    • When used together, the above two advanced options query Salesforce to find out which opportunities that have changed since the last sync are now closed or delayed. The results are stored in the StageName field.

    Crm.DeleteClosedItem.Opportunity = True (The opportunities that have been closed or delayed in Salesforce since the last sync will be deleted from the email system.)

    Crm.SyncClosedItem.Opportunity = False (The deletions in the email system are not synced back to Salesforce. A closed opportunity in Salesforce will not be synced again to the email system, but if a delayed opportunity is reactivated in Salesforce, it will be synced to the email system again.)

Example to set the IsClosed for Contact using a custom field:

Situation: A new IsInactive checkbox custom field was added to the Contact module to track Contacts that are no longer active. When the contacts become inactive, they are to be synced by Riva as closed items, so that they are removed from the email system address book.

  • Apply the following advanced options to the sync policy or Salesforce connection:

    Sync.Crm.IsClosedField.Contact = IsInactive__c

    Sync.Crm.IsClosedRegEx.Contact = True

    • When used together, the above two advanced options query Salesforce to find out which contacts that have changed since the last sync are now no longer active. The results are stored in the IsInactive__c field.

    Crm.DeleteClosedItem.Contact = True (The contacts that have become inactive in Salesforce since the last sync will be deleted from the email system.)

    Crm.SyncClosedItem.Contact = False (The deletion in the email system is not synced back to Salesforce, and the inactive contact in Salesforce will not be synced again to the email system address book.)

This article was:   Helpful | Not helpful
Report an issue
Article ID: 886
Last updated: 09 Mar, 2020
Revision: 6
Views: 4926
Comments: 0
Also read

Also listed in