{"title":"Codeunit 30165 Shpfy Orders API, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/30165-shpfy-orders-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":30165,"name":"Shpfy Orders API","app":"Shopify Connector","url":"https://jonas-paprotka.de/ref/codeunit/30165-shpfy-orders-api/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/30165-shpfy-orders-api/source/","path":"src/Apps/W1/Shopify/App/src/Order handling/Codeunits/ShpfyOrdersAPI.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:30103":{"name":"Shpfy Communication Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/30103-shpfy-communication-mgt/"},"table:30102":{"name":"Shpfy Shop","url":"https://jonas-paprotka.de/ref/table/30102-shpfy-shop/"},"codeunit:30157":{"name":"Shpfy Json Helper","url":"https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/"},"table:30116":{"name":"Shpfy Order Attribute","url":"https://jonas-paprotka.de/ref/table/30116-shpfy-order-attribute/"},"table:30121":{"name":"Shpfy Orders to Import","url":"https://jonas-paprotka.de/ref/table/30121-shpfy-orders-to-import/"},"codeunit:30170":{"name":"Shpfy Order Risks","url":"https://jonas-paprotka.de/ref/codeunit/30170-shpfy-order-risks/"}},"procs":[{"name":"OnRun","line":15,"kind":"trigger","steps":[[22,"call","SetShop",1],[23,"call","GetOrdersToImport",1]]},{"name":"GetOrdersToImport","line":37,"kind":"procedure","access":"internal","params":1,"steps":[[46,"ext","codeunit",30103,"SetShop",1],[49,"ext","table",30102,"GetLastSyncTime",1],[51,"ext","table",30102,"GetEmptySyncTime",0],[57,"ext","codeunit",30103,"ExecuteGraphQL",2],[59,"call","ExtractShopifyOrdersToImport",3],[64,"ext","table",30102,"GetEmptySyncTime",0],[70,"ext","codeunit",30157,"GetValueAsBoolean",2],[71,"ext","table",30102,"SetLastSyncTime",2]]},{"name":"UpdateOrderAttributes","line":80,"kind":"procedure","access":"local","params":2,"steps":[[87,"write",30116,"DeleteAll"],[93,"ext","codeunit",30157,"GetValueAsText",3],[95,"ext","codeunit",30157,"GetValueAsText",2],[97,"write",30116,"Insert"],[98,"write",30116,"Modify"]]},{"name":"AddOrderAttribute","line":109,"kind":"procedure","access":"internal","params":4,"steps":[[116,"ext","codeunit",30103,"SetShop",1],[122,"write",30116,"Modify"],[125,"write",30116,"Insert"],[140,"ext","codeunit",30103,"ExecuteGraphQL",2]]},{"name":"ConvertToFulfillmentStatus","line":167,"kind":"procedure","access":"local","params":1,"steps":[[169,"ext","codeunit",30103,"ConvertToCleanOptionValue",1]]},{"name":"ConvertToFinancialStatus","line":176,"kind":"procedure","access":"local","params":1,"steps":[[178,"ext","codeunit",30103,"ConvertToCleanOptionValue",1]]},{"name":"ExtractShopifyOrdersToImport","line":185,"kind":"procedure","access":"internal","params":3,"steps":[[201,"ext","codeunit",30157,"GetJsonArray",3],[203,"ext","codeunit",30157,"GetValueAsText",2],[204,"ext","codeunit",30157,"GetJsonObject",3],[205,"ext","codeunit",30157,"GetValueAsBigInteger",2],[206,"ext","codeunit",30157,"GetValueAsBoolean",2],[213,"ext","codeunit",30157,"GetValueIntoField",4],[214,"ext","codeunit",30157,"GetValueIntoField",4],[215,"ext","codeunit",30157,"GetValueIntoField",4],[216,"ext","codeunit",30157,"GetValueIntoField",4],[217,"ext","codeunit",30157,"GetValueIntoField",4],[218,"ext","codeunit",30157,"GetValueIntoField",4],[219,"ext","codeunit",30157,"GetValueIntoField",4],[220,"ext","codeunit",30157,"GetValueIntoField",4],[221,"ext","codeunit",30157,"GetValueIntoField",4],[222,"ext","codeunit",30157,"GetValueIntoField",4],[223,"ext","codeunit",30157,"GetValueIntoField",4],[224,"ext","codeunit",30157,"GetValueIntoField",4],[225,"ext","codeunit",30157,"GetValueIntoField",4],[226,"ext","codeunit",30157,"GetValueIntoField",4],[227,"ext","codeunit",30157,"GetValueIntoField",4],[229,"call","ConvertToFinancialStatus",1],[229,"ext","codeunit",30157,"GetValueAsText",2],[230,"call","ConvertToFulfillmentStatus",1],[230,"ext","codeunit",30157,"GetValueAsText",2],[231,"ext","codeunit",30157,"GetJsonObject",3],[232,"ext","codeunit",30157,"GetJsonObject",3],[236,"ext","codeunit",30157,"GetJsonArray",3],[237,"call","UpdateOrderAttributes",2],[238,"ext","codeunit",30157,"GetJsonArray",3],[248,"call","IsHighRiskOrder",1],[249,"call","ContainsChannelLiableTax",1],[257,"write",30121,"Insert"],[258,"write",30121,"Modify"]]},{"name":"MarkAsPaid","line":265,"kind":"procedure","access":"internal","params":2,"steps":[[272,"ext","codeunit",30103,"SetShop",1],[275,"ext","codeunit",30103,"ExecuteGraphQL",2],[276,"ext","codeunit",30157,"GetValueAsBoolean",2]]},{"name":"CancelOrder","line":279,"kind":"procedure","access":"internal","params":6,"steps":[[286,"ext","codeunit",30103,"SetShop",1],[292,"ext","codeunit",30103,"ConvertBooleanToText",1],[293,"ext","codeunit",30103,"ConvertBooleanToText",1],[294,"ext","codeunit",30103,"ConvertBooleanToText",1],[295,"ext","codeunit",30103,"ExecuteGraphQL",2],[296,"ext","codeunit",30157,"GetJsonArray",2]]},{"name":"IsHighRiskOrder","line":299,"kind":"procedure","access":"local","params":1,"steps":[[306,"ext","codeunit",30157,"GetJsonArray",3],[308,"ext","codeunit",30170,"ConvertToRiskLevel",1],[308,"ext","codeunit",30157,"GetValueAsText",2]]},{"name":"ContainsChannelLiableTax","line":314,"kind":"procedure","access":"local","params":1,"steps":[[319,"ext","codeunit",30157,"GetJsonArray",3],[329,"ext","codeunit",30157,"GetValueAsBoolean",2]]}]}