---
id: change/bcapps/10775
type: change
title: "#10775 [Shopify] Optimize unmapped cue counts"
summary: The Shopify Activities cues for unmapped customers, products and companies now count records with an empty stored Customer or Item SystemId, so SQL can run a direct COUNT instead of checking each row through lookup FlowFields. A new key led by Item SystemId supports the product count. Mappings that point to deleted records are no longer counted.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - table shpfy cue
  - table shpfy product
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:43.037Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3cf71af429b7eed4ffdaccab9eb93f91564b0de9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10775
    title: "microsoft/BCApps#10775: [Shopify] Optimize unmapped cue counts"
    date: "2026-09-02"
    commit: 3cf71af429b7eed4ffdaccab9eb93f91564b0de9
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/30100
    - object/table/30127
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10775
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10775
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-02T09:27:40Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: performance
behavior_change: true
breaking: false
files:
  count: 2
  additions: 6
  deletions: 3
  al: 2
apps:
  - Shopify
objects_touched:
  - key: table/30100
    page: table/30100
    type: table
    id: 30100
    name: Shpfy Cue
    app: Shopify
    status: modified
  - key: table/30127
    page: table/30127
    type: table
    id: 30127
    name: Shpfy Product
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 648153
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10775 [Shopify] Optimize unmapped cue counts

> The Shopify Activities cues for unmapped customers, products and companies now count records with an empty stored Customer or Item SystemId, so SQL can run a direct COUNT instead of checking each row through lookup FlowFields. A new key led by Item SystemId supports the product count. Mappings that point to deleted records are no longer counted.

[Pull request](https://github.com/microsoft/BCApps/pull/10775) · merged into `main` (BC30) on 2026-09-02 by onbuyuka · 2 files (+6 -3), 2 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Changed cue calculations to count empty Customer and Item SystemId fields instead of using lookup FlowFields
- SQL can now execute direct COUNT(*) queries instead of materializing source tables
- Added a new key led by Item SystemId for efficient global unmapped-product seeking
- Records with deleted Customer or Item references are no longer included in counts
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 30100 "Shpfy Cue"](../../objects/table/30100.md), Shopify: modified
- [Table 30127 "Shpfy Product"](../../objects/table/30127.md), Shopify: modified

## Context

- Work items: AB#648153
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
