{"title":"Codeunit 30269 Shpfy Webhooks Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/30269-shpfy-webhooks-mgt/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":30269,"name":"Shpfy Webhooks Mgt.","app":"Shopify Connector","url":"https://jonas-paprotka.de/ref/codeunit/30269-shpfy-webhooks-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/30269-shpfy-webhooks-mgt/source/","path":"src/Apps/W1/Shopify/App/src/Webhooks/Codeunits/ShpfyWebhooksMgt.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:30363":{"name":"Shpfy Webhook Notification","url":"https://jonas-paprotka.de/ref/codeunit/30363-shpfy-webhook-notification/"},"table:2000000199":{"name":"Webhook Subscription","url":"https://jonas-paprotka.de/ref/table/2000000199-webhook-subscription/"},"codeunit:30251":{"name":"Shpfy Webhooks API","url":"https://jonas-paprotka.de/ref/codeunit/30251-shpfy-webhooks-api/"},"table:30102":{"name":"Shpfy Shop","url":"https://jonas-paprotka.de/ref/table/30102-shpfy-shop/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"codeunit:2300":{"name":"Tenant License State","url":"https://jonas-paprotka.de/ref/codeunit/2300-tenant-license-state/"},"codeunit:5377":{"name":"Webhook Management","url":"https://jonas-paprotka.de/ref/codeunit/5377-webhook-management/"},"table:472":{"name":"Job Queue Entry","url":"https://jonas-paprotka.de/ref/table/472-job-queue-entry/"},"codeunit:30101":{"name":"Shpfy Background Syncs","url":"https://jonas-paprotka.de/ref/codeunit/30101-shpfy-background-syncs/"},"codeunit:30270":{"name":"Shpfy Bulk Operation Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/30270-shpfy-bulk-operation-mgt/"}},"procs":[{"name":"HandleOnWebhookNotificationInsert","line":28,"kind":"procedure","access":"local","params":2,"steps":[[47,"call","ProcessCompanyWebhookNotification",2]]},{"name":"ProcessCompanyWebhookNotification","line":51,"kind":"procedure","access":"local","params":2,"steps":[[55,"event","OnScheduleWebhookNotificationTask",0],[57,"run","codeunit",30363]]},{"name":"EnableWebhook","line":65,"kind":"procedure","access":"internal","params":3,"steps":[[72,"call","GetShopDomain",1],[74,"write",2000000199,"Delete"],[76,"ext","codeunit",30251,"GetWebhookSubscription",3],[77,"ext","codeunit",30251,"DeleteWebhookSubscription",2],[78,"ext","codeunit",30251,"RegisterWebhookSubscription",2],[80,"call","CreateWebhookSubscription",3],[82,"call","ChangePrevWebhookUserId",5]]},{"name":"EnableBulkOperationWebhook","line":88,"kind":"procedure","access":"internal","params":1,"steps":[[90,"call","EnableWebhook",3],[91,"write",30102,"Modify"]]},{"name":"DisableBulkOperationsWebhook","line":94,"kind":"procedure","access":"internal","params":1,"steps":[[102,"call","GetShopDomain",1],[125,"write",2000000199,"Delete"],[127,"ext","codeunit",30251,"TryDeleteWebhookSubscription",2],[131,"write",2000000199,"Modify"],[137,"write",30102,"Modify"]]},{"name":"EnableOrderCreatedWebhook","line":141,"kind":"procedure","access":"internal","params":1,"steps":[[145,"call","EnableWebhook",3],[145,"call","GetOrderCreatedWebhookUser",1],[146,"write",30102,"Modify"],[147,"ext","codeunit",8703,"LogUptake",3]]},{"name":"DisableOrderCreatedWebhook","line":150,"kind":"procedure","access":"internal","params":1,"steps":[[158,"call","GetShopDomain",1],[181,"write",2000000199,"Delete"],[183,"ext","codeunit",30251,"TryDeleteWebhookSubscription",2],[187,"write",2000000199,"Modify"],[193,"write",30102,"Modify"]]},{"name":"HandleOnCompanyBeforeDelete","line":198,"kind":"procedure","access":"local","params":2,"steps":[[209,"ext","codeunit",2300,"GetLicenseState",0],[214,"call","DisableOrderCreatedWebhook",1],[215,"call","DisableBulkOperationsWebhook",1]]},{"name":"CreateWebhookSubscription","line":220,"kind":"procedure","access":"local","params":3,"steps":[[224,"call","GetShopDomain",1],[229,"write",2000000199,"Insert"]]},{"name":"SetOrderCreatedWebhookSubscriptionUserAsCurrentUser","line":232,"kind":"procedure","access":"local","params":1,"steps":[[237,"ext","codeunit",5377,"IsValidNotificationRunAsUser",1],[238,"validate",30102,"Order Created Webhook User Id"],[239,"write",30102,"Modify"]]},{"name":"GetOrderCreatedWebhookUser","line":245,"kind":"procedure","access":"local","params":1,"steps":[[250,"call","SetOrderCreatedWebhookSubscriptionUserAsCurrentUser",1]]},{"name":"ProcessOrderCreatedNotification","line":253,"kind":"procedure","access":"internal","params":1,"steps":[[265,"ext","table",472,"GetXmlContent",0],[270,"ext","codeunit",30101,"SyncAllOrders",1]]},{"name":"ProcessBulkOperationNotification","line":273,"kind":"procedure","access":"internal","params":2,"steps":[[286,"ext","codeunit",30270,"ProcessBulkOperationNotification",2]]},{"name":"ChangePrevWebhookUserId","line":289,"kind":"procedure","access":"local","params":5,"steps":[[303,"validate",30102,"Order Created Webhook User Id"],[304,"write",30102,"Modify"],[315,"validate",30102,"Bulk Operation Webhook User Id"],[316,"write",30102,"Modify"]]},{"name":"TestOrderCreatedWebhookConnection","line":327,"kind":"procedure","access":"internal","params":1,"steps":[[337,"call","GetShopDomain",1],[341,"ext","codeunit",30251,"GetWebhookSubscription",3]]}]}