CRM Selection Filters

Possible selection facilities depend on the type of the CRM item.

CRM Contacts Selection

Select Contacts: Standard contact selection criteria. One of:

  • All (default): All contacts visible to given user are synchronized.

  • My: Only those contacts assigned to given user are synchronized.

  • SyncToOutlook: Only allow contacts marked “Sync to Outlook ®” in SugarCRM:

These options are available from the “Task Options“ section of “Synchronize Contacts (CRM->E)” rule:

CRM Item Filtering

“Task Options” sections of each synchronization rule contains “SugarCRM Filter” attribute. This is a very powerful that is mapped to the “WHERE” part of the SQL query used to select items from CRM. For example, it may be used to select items belonging to given user like that:

( %Table%.assigned_user_id='%UserId%' )

Where %Table% is a placeholder resolving to DB Table name and %UserId% is ID of current CRM user.

The full list of placeholders is following:

%Table% – SQL Table name for given module (i.e. contacts, accounts, cases, etc.)

%UserId% – ID value of currently impersonated user (i.e. a8caa35e-eaf9-3989-4371-509a62efdde7)

Date placeholders:

  • %LastYear% – one year ago
  • %LastMonth% – one month ago
  • %LastWeek% – 7 days ago
  • %Yesterday% – yesterday
  • %Today% – today’s date
  • %Tomorrow% – tomorrow’s date
  • %NextWeek% – 7 days after
  • %NextMonth% – one month after
  • %NextYear% – a year after

All date resolve to date in YYYY-MM-DD format (i.e. 2012-05-21).