Extensibility Request: [W1][Codeunit][30116][Shpfy Customer Export] - OnBeforeFillShopifyCustomerData with Custom Change Detection
Why do you need this change?
We need to customize the Shopify customer export process in Codeunit 30116. Currently, the FillInShopifyCustomerData procedure has no extensibility points, preventing us from:
- Modify customer data before export (e.g., custom phone formatting, address standardization)
- Implement custom change detection - the hardcoded HasDiff() comparison doesn't allow us to:
- Ignore changes to specific to:
- fields
- Detect changes in related data
- Control when Last Updated by BC gets updated
Benefits:
- Enable industry-specific data formatting (GDPR compliance, regional standards)
- Reduce unnecessary Shopify API calls by implementing business-specific change detection
- Eliminate base code modifications, reducing upgrade conflicts and maintenance costs
- Support diverse business requirements across multiple integration scenarios
Describe the request
Add a new integration event at the beginning of the FillInShopifyCustomerData procedure that allows extensions to modify data and control change detection.
Event Signature
[IntegrationEvent(false,false)]
local procedure OnBeforeFillShopifyCustomerData(
Customer: Record Customer;
var ShopifyCustomer: Record "Shpfy Customer";
var CustomerAddress: Record "Shpfy Customer Address";
var IsChanged: Boolean;
var Handled: Boolean
)
begin
end;
[IntegrationEvent(false,false)]
local procedure OnAfterFillShopifyCustomerData(
Customer: Record Customer;
var ShopifyCustomer: Record "Shpfy Customer";
var CustomerAddress: Record "Shpfy Customer Address";
var IsChanged: Boolean;
var Handled: Boolean
)
begin
end;
Modified Procedure Logic
internal procedure FillInShopifyCustomerData(Customer: Record Customer;
var ShopifyCustomer: Record "Shpfy Customer";
var CustomerAddress: Record "Shpfy Customer Address"): Boolean
var
// ... existing variables ...
IsChanged: Boolean;
Handled: Boolean;
begin
// NEW: Event for custom data modification and change detection
OnBeforeFillShopifyCustomerData(Customer, ShopifyCustomer, CustomerAddress, IsChanged, Handled);
if Handled then
exit(IsChanged);
// ... existing mapping logic ...
// NEW: Event for custom data modification and change detection
OnAfterFillShopifyCustomerData(Customer, ShopifyCustomer, CustomerAddress, IsChanged, Handled);
if Handled then
exit(IsChanged);
// Use extension's decision OR default logic
if IsChanged or HasDiff(ShopifyCustomer, xShopifyCustomer) or HasDiff(CustomerAddress, xCustomerAddress) then begin
ShopifyCustomer."Last Updated by BC" := CurrentDateTime;
exit(true);
end;
end;
Hi @ReneGubler,
Thank you for your extensibility request.
The code you'd like to change is part of the BCApps repository. To have this change made, it needs to go through a contribution. Please refer to the contribution guide for instructions on how to proceed: https://github.com/microsoft/BCApps/blob/main/CONTRIBUTING.md
[!NOTE] Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
[!TIP] Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.