{"title":"Codeunit 30195 Shpfy Inventory API, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/30195-shpfy-inventory-api/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":30195,"name":"Shpfy Inventory API","app":"Shopify Connector","url":"https://jonas-paprotka.de/ref/codeunit/30195-shpfy-inventory-api/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/30195-shpfy-inventory-api/source/","path":"src/Apps/W1/Shopify/App/src/Inventory/Codeunits/ShpfyInventoryAPI.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:30196":{"name":"Shpfy Inventory Events","url":"https://jonas-paprotka.de/ref/codeunit/30196-shpfy-inventory-events/"},"codeunit:30157":{"name":"Shpfy Json Helper","url":"https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/"},"table:30112":{"name":"Shpfy Shop Inventory","url":"https://jonas-paprotka.de/ref/table/30112-shpfy-shop-inventory/"},"codeunit:30154":{"name":"Shpfy GraphQL Queries","url":"https://jonas-paprotka.de/ref/codeunit/30154-shpfy-graphql-queries/"},"codeunit:30103":{"name":"Shpfy Communication Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/30103-shpfy-communication-mgt/"},"codeunit:30313":{"name":"Shpfy Skipped Record","url":"https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/"}},"procs":[{"name":"GetStock","line":27,"kind":"procedure","access":"internal","params":1,"steps":[[38,"call","SetShop",1],[51,"call","StockCalculationFactory",2],[72,"ext","codeunit",30196,"OnAfterCalculationStock",4]]},{"name":"GetId","line":76,"kind":"procedure","access":"local","params":1,"steps":[[82,"ext","codeunit",30157,"GetJsonValue",3]]},{"name":"GetInventoryLevels","line":90,"kind":"procedure","access":"local","params":2,"steps":[[95,"ext","codeunit",30157,"GetJsonObject",3],[96,"ext","codeunit",30157,"GetJsonObject",3],[97,"ext","codeunit",30157,"GetJsonObject",3]]},{"name":"RemoveUnusedInventoryIds","line":113,"kind":"procedure","access":"internal","params":0,"steps":[[121,"write",30112,"Delete"]]},{"name":"ExportStock","line":124,"kind":"procedure","access":"internal","params":2,"steps":[[135,"ext","codeunit",30154,"GetQueryWithCost",2],[137,"ext","codeunit",30157,"GetJsonArray",2],[140,"call","CalcStock",2],[145,"call","ExecuteInventoryGraphQL",2],[148,"ext","codeunit",30157,"GetJsonArray",2],[155,"call","ExecuteInventoryGraphQL",2]]},{"name":"ExecuteInventoryGraphQL","line":159,"kind":"procedure","access":"local","params":2,"steps":[[180,"ext","codeunit",30103,"ExecuteGraphQL",2],[182,"ext","codeunit",30157,"GetJsonArray",3],[184,"ext","codeunit",30157,"GetValueAsText",2],[195,"call","LogSkippedInventoryUpdate",2]]},{"name":"LogSkippedInventoryUpdate","line":198,"kind":"procedure","access":"local","params":2,"steps":[[205,"ext","codeunit",30157,"GetJsonArray",3],[207,"ext","codeunit",30313,"LogSkippedRecord",3]]},{"name":"CalcStock","line":210,"kind":"procedure","access":"local","params":2,"steps":[[224,"write",30112,"Delete"],[231,"validate",30112,"Stock"],[231,"call","GetStock",1],[232,"write",30112,"Modify"]]},{"name":"HasNextResults","line":250,"kind":"procedure","access":"local","params":1,"steps":[[255,"ext","codeunit",30157,"GetJsonObject",3],[256,"ext","codeunit",30157,"GetJsonValue",3]]},{"name":"ImportInventoryLevels","line":260,"kind":"procedure","access":"internal","params":4,"steps":[[279,"ext","codeunit",30157,"GetJsonArray",3],[281,"ext","codeunit",30157,"GetJsonValue",3],[285,"ext","codeunit",30157,"GetJsonObject",3],[286,"ext","codeunit",30157,"GetJsonArray",3],[288,"ext","codeunit",30157,"GetJsonValue",3],[295,"ext","codeunit",30157,"GetJsonObject",3],[296,"call","GetId",1],[297,"ext","codeunit",30157,"GetJsonObject",3],[298,"call","GetId",1],[301,"ext","codeunit",30157,"GetJsonObject",3],[302,"call","GetId",1],[304,"validate",30112,"Shopify Stock"],[306,"write",30112,"Modify"],[315,"validate",30112,"Shopify Stock"],[316,"write",30112,"Insert"]]},{"name":"ImportStock","line":331,"kind":"procedure","access":"internal","params":1,"steps":[[341,"ext","codeunit",30103,"ExecuteGraphQL",2],[342,"call","GetInventoryLevels",2],[343,"call","ImportInventoryLevels",4],[344,"call","HasNextResults",1]]},{"name":"SetShop","line":347,"kind":"procedure","access":"internal","params":1,"steps":[[351,"ext","codeunit",30103,"SetShop",1]]}]}