Skip to content

Define a Screening Formula

Not every record in your org needs screening. If you hold records with overseas addresses, or records you never call, you can tell PhoneTools to leave them alone by pointing it at a formula field on the object.

The formula is optional. If you do not configure one, PhoneTools screens every record that has a number in a configured and enabled phone field.

What the Formula Must Return

The formula is a Number formula field on the object you are screening, and it must return 1 or 0 for each record.

Result of the formula What PhoneTools does
1 Screens the number in the configured field
0 Skips the record, and no lookup is used

Only the value 1 means "screen this record". Any other number is treated the same way as 0, so keep the formula to those two outcomes.

Note: Make sure your formula always returns 1 or 0. Avoid a formula that can return a blank value.

A record excluded by the formula is never sent to the registers, so it costs you nothing. Its numbers are shown in the PhoneTools Lightning Component as Excluded from screening rather than as unscreened. See Phone Screening Statuses.

Deciding What to Exclude

Err on the side of screening. It is far better to screen a record you did not strictly need to screen than to skip one you should have checked, so where the answer is not clear cut, let the formula return 1.

Agree the criteria with whoever owns compliance in your organisation. Which records can safely be left out is specific to your data, and for many orgs the right answer is to screen everything and configure no formula at all.

Creating the Formula Field

The example below assumes that only records with a UK address need screening, and treats a record with no country as one that does need screening.

  1. Go to Setup and open Object Manager.
  2. Select the object whose records you want to screen, and open Fields & Relationships.
  3. Select New.
  4. Choose the data type Formula, then select Next.
  5. Enter a Field Label. Choose something you will recognise later, such as Needs Phone Screening, because you select this field by name when you configure PhoneTools.
  6. Set Formula Return Type to Number.
  7. Set Decimal Places to 0, then select Next.
  8. Enter your formula in the formula editor. On Account, a formula that screens UK and unknown addresses only looks like this:

    IF(OR(BillingCountry='United Kingdom',ISBLANK(BillingCountry)), 1, 0)
    

    On Contact, use MailingCountry in place of BillingCountry. On Lead, use Country.

  9. Select Check Syntax, correct anything it reports, then select Next.

  10. Give the field visibility to everyone who will be screening records, then select Next and Save.

Note: Salesforce accepts either single or double quotes around a text value in a formula, so 'United Kingdom' and "United Kingdom" both work.

Creating the field on its own changes nothing. PhoneTools only takes any notice of it once you bind it to a field to screen.

When the Formula Is Evaluated

The formula is evaluated every time PhoneTools looks at the record, not stored alongside the configuration, so a change to the formula takes effect immediately.

  • Bulk and scheduled screening filter the records at the point they are selected, using the formula field as part of the query. A record that returns 0 is never picked up.
  • Screening a single record, from the record page or from a Flow, evaluates the formula for that record, and any number whose field is excluded by the formula is left out of the request to the registers.

Good to Know

  • The formula field has to live on the same object as the phone field it governs. There is one formula per object, not one per phone field.
  • The Formula Field list in PhoneTools offers every Number field on the object, not just formula fields. Make sure you pick the right one.
  • Formula fields that return Text, Currency, Percent or Checkbox are not offered and are not supported. Use a Number formula with 0 decimal places.
  • How Salesforce treats blank fields makes no difference to a formula like the example above, which tests a text field with ISBLANK and always returns 1 or 0. It does matter if your formula does arithmetic on a Number field that can be empty, so leave the setting on its default of treating blanks as zeroes unless you have a reason not to.
  • The formula controls whether a number is screened. It does not control whether the field is configured. See Configure a Field to Screen.