Check out our free Chrome Extension.

Calculated Values

Overview

Calculated Values execute an arbitrary expression to generate a custom value for inclusion in CSV exports, CRM integrations and search filters and results.

Expressions are written in Common Expression Language. CEL expressions can be tricky to write so don't hesitate to ask for help.

Note: Calculated Values are only available on the Enterprise plan.

Creating a Calculated Value

To create a Calculated Value, go to the Calculated Value page and click the Add New Calculated Value button. You'll need to provide the follow fields to define the Calculated Value and then click the Save button:

  • Name: The name of the calculated value.
  • Search Filter: Enable the checkbox to use the Calculated Value as a filter within Store Leads search.
  • Expression: The expression that is evaluated against every domain. See some example expressions below.
Define Calculated Value
Define Calculated Value.

Since expressions can be tricky to write, it helps to test the expression against a sample domain. To do so, simply click the Test Expression button.

To include Calculated Values in search results, click on the Calculated Values tab in the search result column picker. Then open the Calculated Values section and select the columns to include in search results.

Calculated Values in Search Results
Calculated Values in Search Results.

Calculated Values as Search Filters

If the Search Filter option is enabled, the Calculated Value can be used as a filter for search results. Search filters are calculated nightly so you may have to wait up to 24 hours for the filter to become available. Depending on the expression, the filter may be available in Basic Search, Advanced Search or both.

Calculated Values as Search Filter
Calculated Values as Search Filter.

Note: Using calculated values as a search filter is only available on the Enterprise plan.

Calculated Values in CSV Exports

To include Calculated Values in CSV exports, click on the Calculated Values tab in the Export dialog. Click the Add New Column button to add a one-time expression to the CSV export. Otherwise, you can address an expression in a saved Calculated Value.

Calculated Values in CSV Exports
Calculated Values in CSV Exports.

Calculated Values in CRM Integrations

Calculated Values can also be used to write custom values to CRM Integrations. For more details, refer to our documentation for your CRM:

Example Expressions

Count the number of installed technologies:

has(_domain.technologies) ? _domain.technologies.size() : 0

Count the number of installed apps:

has(_domain.apps) ? _domain.apps.size() : 0

Count the number of technologies installed in the last 14 days:

has(_domain.technology_details) ? _domain.technology_details.filter(k,
  now - _domain.technology_details[k].installed_at < duration("336h")
).size() : 0

Count the number of apps installed in the last 14 days:

has(_domain.app_details) ? _domain.app_details.filter(k,
  now - _domain.app_details[k].installed_at < duration("336h")
).size() : 0

Determine whether a specific technology is installed:

has(_domain.technologies) ? _domain.technologies.contains('Affirm') : false

Filter list of technologies to only include specific technologies of interest (output as a comma-separated string):

has(_domain.technologies) ? _domain.technologies.filter(s,
  s in ['Collabstr', 'CreatorIQ']
).join(',') : ''

Generate a list of unique apps and technologies installed on the domain.
Update: can now use the new app_and_tech_details attribute (see below).

(
  (has(_domain.technologies) ? _domain.technologies : []) +
  (has(_domain.app_details) ? _domain.app_details.map(k,
    has(_domain.app_details[k].technology) ?
      _domain.app_details[k].technology :
      _domain.app_details[k].name
  ) : [])
).unique().sort().join(',')

Generate a list of unique apps and technologies installed on the domain along with their install date.

(has(_domain.app_and_tech_details) ?
  _domain.app_and_tech_details.map(k,
    has(_domain.app_and_tech_details[k].installed_at) ?
      _domain.app_and_tech_details[k].name + "," + _domain.app_and_tech_details[k].installed_at.format("2006/01/02") :
      _domain.app_and_tech_details[k].name + ",unknown"
  ) : []
).join(',')

Retrieving the name of the most-recently installed app or technology.

has(_domain.app_and_tech_details) && _domain.app_and_tech_details.size() > 0 ?
  _domain.app_and_tech_details.sort_by_installed_at("desc")[0].name :
  ''

Available Attributes

The following attributes are available for use within expressions. Please get in touch if you need access to additional attributes within expressions.

_domain.about_us_page_url
The URL of the Domain's "About Us" page (if any).
_domain.administrative_area_level_1
The administrative_area_level_1 of the Domain (if known). This value often represents the state/province of the associated merchant's headquarters.
_domain.aliases
List of alias DNS domain names that refer to this Domain. Aliases are identified as other DNS domain names that point to the Domain through canonical links or redirects.
_domain.alternates
List of alternate DNS domain names for this Domain. Alternate domain names are localized versions of the domain for a specific locale. e.g., ca.merchant.com and uk.merchant.com. The API returns a map (also called a dictionary in some programming languages) of locale name to domain name.
_domain.avg_price
The average price of products sold on the Domain. Values in the minor unit of the Domain's currency (e.g., cents of USD). Only available for Shopify stores using the regular (non-headless) frontend.
_domain.avg_weight
The average weight of products (in grams) sold on the Domain. Only available for Shopify stores using the regular (non-headless) frontend.
_domain.app_details
A detailed list of Apps installed on the Domain. (e.g., [{ name: "Privy", platform: "shopify", installed_at: "2020-04-15T18:44:01Z" }])
_domain.brand_advocate_page_url
The URL of the Domain's "Brand Advocate" page (if any).
_domain.brands_page_url
The URL of the Domain's "Brands" page (if any).
_domain.categories
A list of the Domain's categories. (e.g., ["/Apparel/Footwear"])
_domain.city
The city of the Domain (if known). This value often represents the city of the associated merchant's headquarters.
_domain.combined_followers
The sum of followers across all social media accounts.
_domain.contact_page_url
The URL of the Domain's "Contact" page (if any).
_domain.country_code
The 2-letter ISO country code of the Domain. Note that a small percentage of Domains are not country-specific (they sell to multiple countries) and these Domains do not have a country-code.
_domain.currency_code
The 3-letter ISO currency code of the Domain.
_domain.estimated_page_views
The estimated total monthly page views for the Domain.
_domain.estimated_sales
The estimated total monthly sales for the merchant. Values in cents of USD.
_domain.estimated_visits
The estimated total monthly visits for the Domain.
_domain.faq_page_url
The URL of the Domain's "FAQ" page (if any).
_domain.features
A list of the Domain's features. (e.g., ["Contact Page", "Tracking Page"])
_domain.financing_page_url
The URL of the Domain's "Financing" page (if any).
_domain.name
The Domain name (e.g., www.fashionnova.com)
_domain.language_code
The 2-letter ISO 639-1 code for the language of content on the Domain's website. Value is blank is not known.
_domain.localization_count
The number of localizations on the Domain's website. Only known for Shopify stores using the standard frontend.
_domain.localizations
A list of the Domain's localizations, if known. (e.g., ["en-us", "en-ca", "fr-fr"]). Only known for Shopify stores using the standard frontend.
_domain.max_price
The price of the most expensive product sold on the Domain. Only available for Shopify stores using the regular (non-headless) frontend.
_domain.merchant_name
The name of the merchant that is selling on the Domain.
_domain.min_price
The price of the least expensive product sold on the Domain. Only available for Shopify stores using the regular (non-headless) frontend.
_domain.pinterest_followers
The number of followers for the Domain's Pinterest account.
_domain.plan
The name of the ecommerce platform's pricing plan that the merchant is using (if known). e.g., "Shopify Plus"
_domain.platform
The name of the ecommerce platform used by the Domain (e.g., shopifyA)
_domain.platform_rank
The rank of the Domain against all other Domains on the same ecommerce platforms. We rank ecommerce domains based on the popularity of each Domain (via traffic estimates) and the number and significance of links to each Domain.
_domain.postal_code
The postal code of the Domain (if known). This value is available for a very small subset of overall stores.
_domain.product_count
The number of products sold by the Domain. Product counts are precise for standard Shopify stores. For all other stores, product counts are an estimate.
_domain.rank
The "world-wide" rank of the Domain (across all supported ecommerce platforms). We rank all ecommerce domains based on the popularity of each Domain (via traffic estimates) and the number and significance of links to each Domain.
_domain.retailer_page_url
The URL of the Domain's "Retailer" page (if any).
_domain.returns_page_url
The URL of the Domain's "Returns" page (if any).
_domain.shopify_app_names
A list of Shopify Apps installed on the Domain, identified by App name. (e.g., ["Privy", "Yotpo: Loyalty & Rewards"])
_domain.shopify_app_tokens
A list of Shopify Apps installed on the Domain, identified by App token. (e.g., ["privy", "swell"])
_domain.state
The state of the Domain. Can be one of the following values: Active, Inactive, Password Protected or Redirect.
_domain.store_locator_page_url
The URL of the Domain's "Store Locator" page (if any).
_domain.technologies
A list of technologies installed on the Domain. (e.g., ["Affirm", "Google Analytics"])
_domain.technology_details
A detailed list of technologies installed on the Domain. (e.g., [{ name: "Affirm", installed_at: "2020-04-15T18:44:01Z" }])
_domain.tiktok_followers
The number of followers for the Domain's TikTok account.
_domain.tracking_page_url
The URL of the Domain's "Tracking" page (if any).
_domain.twitter_followers
The number of followers for the Domain's Twitter account.
_domain.warranty_page_url
The URL of the Domain's "Warranty" page (if any).
_domain.youtube_followers
The number of followers for the Domain's YouTube account.
now
The current time.
{
  "_domain": {
    "about_us_page_url": "https://goodasgoldshop.com/about",
    "administrative_area_level_1": "Wellington",
    "aliases": [
      "www.goodasgoldshop.com"
    ],
    "alternates": null,
    "app_and_tech_details": {
      "Afterpay": {
        "installed_at": "2022-01-13T05:52:09Z",
        "installed_at_sfdc": "2022-01-13T05:52:09+00:00",
        "name": "Afterpay"
      },
      "Campaign Monitor": {
        "installed_at": "2023-01-19T06:36:07Z",
        "installed_at_sfdc": "2023-01-19T06:36:07+00:00",
        "name": "Campaign Monitor"
      },
      "Cloudflare": {
        "installed_at": "2023-11-01T11:49:45Z",
        "installed_at_sfdc": "2023-11-01T11:49:45+00:00",
        "name": "Cloudflare"
      },
      "Cloudflare CDN": {
        "installed_at": "2021-06-08T15:41:32Z",
        "installed_at_sfdc": "2021-06-08T15:41:32+00:00",
        "name": "Cloudflare CDN"
      },
      "Craft CMS": {
        "installed_at": "2021-06-02T15:50:10Z",
        "installed_at_sfdc": "2021-06-02T15:50:10+00:00",
        "name": "Craft CMS"
      },
      "Facebook Pixel": {
        "installed_at": "2022-09-06T10:15:05Z",
        "installed_at_sfdc": "2022-09-06T10:15:05+00:00",
        "name": "Facebook Pixel"
      },
      "Google Analytics": {
        "installed_at": "2021-06-02T15:50:10Z",
        "installed_at_sfdc": "2021-06-02T15:50:10+00:00",
        "name": "Google Analytics"
      },
      "Klaviyo": {
        "installed_at": "2023-01-12T16:42:49Z",
        "installed_at_sfdc": "2023-01-12T16:42:49+00:00",
        "name": "Klaviyo"
      },
      "Trustpilot": {
        "installed_at": "2021-12-09T23:22:36Z",
        "installed_at_sfdc": "2021-12-09T23:22:36+00:00",
        "name": "Trustpilot"
      },
      "Vimeo": {
        "name": "Vimeo",
        "uninstalled_at": "2023-11-01T11:49:45Z",
        "uninstalled_at_sfdc": "2023-11-01T11:49:45+00:00"
      }
    },
    "avg_price": 0,
    "avg_weight": 0,
    "brand_advocate_page_url": "",
    "brands_page_url": "https://goodasgoldshop.com/brands",
    "categories": [
      "/Apparel/Footwear"
    ],
    "city": "Wellington",
    "combined_followers": 2000,
    "contact_page_url": "https://goodasgoldshop.com/contact",
    "country_code": "NZ",
    "currency_code": "",
    "estimated_page_views": 0,
    "estimated_sales": 0,
    "estimated_visits": 0,
    "faq_page_url": "",
    "features": [
      "Brands Page",
      "International Shipping",
      "Contact Page",
      "Tracking or Returns",
      "Tracking Page",
      "Has Blog",
      "Has CMS"
    ],
    "financing_page_url": "",
    "klaviyo_features": [],
    "language_code": "en",
    "localization_count": 0,
    "localizations": null,
    "max_price": 0,
    "merchant_name": "Good as Gold",
    "min_price": 0,
    "name": "goodasgoldshop.com",
    "pinterest_followers": 2000,
    "plan": "",
    "platform": "custom",
    "platform_rank": 23145,
    "postal_code": "",
    "product_count": 2798,
    "rank": 120418,
    "retailer_page_url": "",
    "returns_page_url": "",
    "shopify_app_names": [],
    "shopify_app_tokens": [],
    "state": "Active",
    "store_locator_page_url": "",
    "technologies": [
      "Afterpay",
      "Campaign Monitor",
      "Cloudflare",
      "Cloudflare CDN",
      "Craft CMS",
      "Facebook Pixel",
      "Google Analytics",
      "Klaviyo",
      "Trustpilot"
    ],
    "technology_details": {
      "Afterpay": {
        "installed_at": "2022-01-13T05:52:09Z",
        "installed_at_sfdc": "2022-01-13T05:52:09+00:00",
        "name": "Afterpay"
      },
      "Campaign Monitor": {
        "installed_at": "2023-01-19T06:36:07Z",
        "installed_at_sfdc": "2023-01-19T06:36:07+00:00",
        "name": "Campaign Monitor"
      },
      "Cloudflare": {
        "installed_at": "2023-11-01T11:49:45Z",
        "installed_at_sfdc": "2023-11-01T11:49:45+00:00",
        "name": "Cloudflare"
      },
      "Cloudflare CDN": {
        "installed_at": "2021-06-08T15:41:32Z",
        "installed_at_sfdc": "2021-06-08T15:41:32+00:00",
        "name": "Cloudflare CDN"
      },
      "Craft CMS": {
        "installed_at": "2021-06-02T15:50:10Z",
        "installed_at_sfdc": "2021-06-02T15:50:10+00:00",
        "name": "Craft CMS"
      },
      "Facebook Pixel": {
        "installed_at": "2022-09-06T10:15:05Z",
        "installed_at_sfdc": "2022-09-06T10:15:05+00:00",
        "name": "Facebook Pixel"
      },
      "Google Analytics": {
        "installed_at": "2021-06-02T15:50:10Z",
        "installed_at_sfdc": "2021-06-02T15:50:10+00:00",
        "name": "Google Analytics"
      },
      "Klaviyo": {
        "installed_at": "2023-01-12T16:42:49Z",
        "installed_at_sfdc": "2023-01-12T16:42:49+00:00",
        "name": "Klaviyo"
      },
      "Trustpilot": {
        "installed_at": "2021-12-09T23:22:36Z",
        "installed_at_sfdc": "2021-12-09T23:22:36+00:00",
        "name": "Trustpilot"
      },
      "Vimeo": {
        "name": "Vimeo",
        "uninstalled_at": "2023-11-01T11:49:45Z",
        "uninstalled_at_sfdc": "2023-11-01T11:49:45+00:00"
      }
    },
    "tiktok_followers": 0,
    "tracking_page_url": "https://goodasgoldshop.com/shipping",
    "twitter_followers": 0,
    "warranty_page_url": "",
    "youtube_followers": 0
  },
  "now": "2024-04-20T07:19:48.651009928Z"
}

CRM Attributes

If a CRM integration is enabled, attributes from the CRM can be referenced within calculated values.

With the Salesforce integration, Account fields are accessible under the _salesforce key. For instance:

_salesforce.Id
Refers to the Id field on the Account SObject in Salesforce.
_salesforce.ParentId
Refers to the ParentId field on the Account SObject in Salesforce.

With the HubSpot integration, Company properties are accessible under the _hubspot key. For instance:

_hubspot.domain
Refers to the domain property on the Company record in HubSpot.

As an example, the following expression returns true for Salesforce Accounts that have a Parent record.

has(_salesforce.ParentId)

Note: To use CRM attributes, the attributes need to be synchronized from the CRM into the Store Leads database. This process can take a few hours. As a result, it is not possible to interactively test expressions referencing CRM attributes if the CRM attribute has not yet been referenced in another expression (since the attribute has not yet been synchronized to the Store Leads database).