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 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 Elite and Enterprise plans.

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.
  • 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 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.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.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.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.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.facebook_followers
The number of followers for the Domain's Facebook account.
_domain.features
A list of the Domain's features. (e.g., ["Contact Page", "Tracking Page"])
_domain.instagram_followers
The number of followers for the Domain's Instagram account.
_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.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.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.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.twitter_followers
The number of followers for the Domain's Twitter account.
_domain.youtube_followers
The number of followers for the Domain's YouTube account.
now
The current time.

As an example, here is the full list of attributes available for a random Domain.

{
  "_domain": {
    "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"
      }
    },
    "avg_price": 0,
    "categories": [
      "/Apparel/Footwear"
    ],
    "city": "Wellington",
    "combined_followers": 54145,
    "country_code": "NZ",
    "currency_code": "",
    "estimated_page_views": 0,
    "estimated_sales": 0,
    "estimated_visits": 0,
    "facebook_followers": 22000,
    "facebookgroup_followers": 0,
    "features": [
      "Brands Page",
      "International Shipping",
      "Contact Page",
      "Tracking or Returns",
      "Tracking Page",
      "Has Blog"
    ],
    "instagram_followers": 30145,
    "klaviyo_features": [],
    "language_code": "en",
    "max_price": 0,
    "merchant_name": "Good as Gold",
    "min_price": 0,
    "name": "goodasgoldshop.com",
    "pinterest_followers": 2000,
    "plan": "",
    "platform": "custom",
    "platform_rank": 16137,
    "postal_code": "",
    "product_count": 2798,
    "rank": 63748,
    "shopify_app_names": [],
    "shopify_app_tokens": [],
    "state": "Active",
    "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"
      }
    },
    "tiktok_followers": 0,
    "twitter_followers": 0,
    "youtube_followers": 0
  },
  "now": "2023-11-28T22:58:37.08329759Z"
}