---
id: change/bcapps/9316
type: change
title: "#9316 [Shopify] Preserve manually set Sell-to Customer No. when Bill-to mapping fails"
summary: Fixed a Shopify Connector bug where manually set Sell-to Customer No. was overwritten when Bill-to Customer No. failed to map, and added fallback logic to derive Bill-to from Sell-to when unmapped.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit shpfy order mapping
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:04.516Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 20deff8d3e492e0b18bdf25a2589e49e09f23b4a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9316
    title: "microsoft/BCApps#9316: [Shopify] Preserve manually set Sell-to Customer No. when Bill-to mapping fails"
    date: "2026-07-13"
    commit: 20deff8d3e492e0b18bdf25a2589e49e09f23b4a
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/30163
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9316
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9316
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-13T15:52:17Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 55
  deletions: 9
  al: 1
apps:
  - Shopify
objects_touched:
  - key: codeunit/30163
    page: codeunit/30163
    type: codeunit
    id: 30163
    name: Shpfy Order Mapping
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642033
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9316 [Shopify] Preserve manually set Sell-to Customer No. when Bill-to mapping fails

> Fixed a Shopify Connector bug where manually set Sell-to Customer No. was overwritten when Bill-to Customer No. failed to map, and added fallback logic to derive Bill-to from Sell-to when unmapped.

[Pull request](https://github.com/microsoft/BCApps/pull/9316) · merged into `main` (BC30) on 2026-07-13 by onbuyuka · 2 files (+55 -9), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Sell-to Customer No. mapping now runs only when Sell-to is blank, so a manually chosen customer is kept
- Bill-to Customer No. falls back to Sell-to Customer No. when it would otherwise stay blank
- Automated imports, where Sell-to starts blank, behave as before
- Only the non-B2B mapping path changed; B2B mapping is untouched
- Test added for a manual Sell-to with an unmapped Bill-to
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 30163 "Shpfy Order Mapping"](../../objects/codeunit/30163.md), Shopify: modified

## Context

- Work items: AB#642033
- Labels: AL: Apps (W1)
- 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).
