{"title":"Codeunit 30114 Shpfy Customer API, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/30114-shpfy-customer-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":30114,"name":"Shpfy Customer API","app":"Shopify Connector","url":"https://jonas-paprotka.de/ref/codeunit/30114-shpfy-customer-api/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/30114-shpfy-customer-api/source/","path":"src/Apps/W1/Shopify/App/src/Customers/Codeunits/ShpfyCustomerAPI.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/"},"codeunit:30115":{"name":"Shpfy Customer Events","url":"https://jonas-paprotka.de/ref/codeunit/30115-shpfy-customer-events/"},"codeunit:30157":{"name":"Shpfy Json Helper","url":"https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/"},"table:30102":{"name":"Shpfy Shop","url":"https://jonas-paprotka.de/ref/table/30102-shpfy-shop/"},"codeunit:30316":{"name":"Shpfy Metafield API","url":"https://jonas-paprotka.de/ref/codeunit/30316-shpfy-metafield-api/"},"table:30105":{"name":"Shpfy Customer","url":"https://jonas-paprotka.de/ref/table/30105-shpfy-customer/"},"table:30106":{"name":"Shpfy Customer Address","url":"https://jonas-paprotka.de/ref/table/30106-shpfy-customer-address/"}},"procs":[{"name":"AddFieldToGraphQuery","line":37,"kind":"procedure","access":"local","params":4,"steps":[[44,"ext","codeunit",30103,"EscapeGraphQLData",1]]},{"name":"CreateCustomerGraphQLQuery","line":52,"kind":"procedure","access":"internal","params":2,"steps":[[58,"call","AddFieldToGraphQuery",3],[60,"call","AddFieldToGraphQuery",3],[62,"call","AddFieldToGraphQuery",3],[64,"call","AddFieldToGraphQuery",3],[67,"call","AddFieldToGraphQuery",3],[69,"call","AddFieldToGraphQuery",3],[71,"call","AddFieldToGraphQuery",3],[73,"call","AddFieldToGraphQuery",3],[75,"call","AddFieldToGraphQuery",3],[77,"call","AddFieldToGraphQuery",3],[79,"call","AddFieldToGraphQuery",3],[81,"call","AddFieldToGraphQuery",3],[83,"call","AddFieldToGraphQuery",3],[85,"call","AddFieldToGraphQuery",4]]},{"name":"CreateCustomer","line":97,"kind":"procedure","access":"internal","params":2,"steps":[[103,"ext","codeunit",30115,"OnBeforeSendCreateShopifyCustomer",3],[104,"call","CreateCustomerGraphQLQuery",2],[105,"ext","codeunit",30103,"ExecuteGraphQL",1],[108,"ext","codeunit",30103,"GetIdOfGId",1],[108,"ext","codeunit",30157,"GetValueAsText",2],[112,"ext","codeunit",30103,"GetIdOfGId",1],[112,"ext","codeunit",30157,"GetValueAsText",2],[115,"ext","codeunit",30157,"GetValueAsText",2],[116,"ext","codeunit",30157,"GetValueAsText",2]]},{"name":"FindIdByEmail","line":127,"kind":"procedure","access":"internal","params":1,"steps":[[140,"ext","codeunit",30103,"ExecuteGraphQL",2],[141,"ext","codeunit",30157,"GetJsonArray",3],[143,"ext","codeunit",30157,"GetJsonObject",3],[146,"ext","codeunit",30157,"GetValueAsText",2],[147,"ext","codeunit",30103,"GetIdOfGId",1],[147,"ext","codeunit",30157,"GetValueAsText",2]]},{"name":"FindIdByPhone","line":156,"kind":"procedure","access":"internal","params":1,"steps":[[170,"call","FormatPhoneNo",1],[173,"ext","codeunit",30103,"ExecuteGraphQL",2],[174,"ext","codeunit",30157,"GetJsonArray",3],[176,"ext","codeunit",30157,"GetJsonObject",3],[179,"call","FormatPhoneNo",1],[179,"ext","codeunit",30157,"GetValueAsText",2],[180,"ext","codeunit",30103,"GetIdOfGId",1],[180,"ext","codeunit",30157,"GetValueAsText",2]]},{"name":"RetrieveShopifyCustomer","line":199,"kind":"procedure","access":"internal","params":1,"steps":[[210,"ext","codeunit",30103,"ExecuteGraphQL",2],[211,"ext","codeunit",30157,"GetJsonObject",3],[212,"call","UpdateShopifyCustomerFields",2]]},{"name":"RetrieveShopifyCustomerIds","line":219,"kind":"procedure","access":"internal","params":1,"steps":[[233,"ext","table",30102,"GetLastSyncTime",1],[236,"ext","codeunit",30103,"ExecuteGraphQL",2],[237,"ext","codeunit",30157,"GetJsonArray",3],[239,"ext","codeunit",30157,"GetValueAsText",2],[240,"ext","codeunit",30157,"GetJsonObject",3],[241,"ext","codeunit",30103,"GetIdOfGId",1],[241,"ext","codeunit",30157,"GetValueAsText",2],[242,"ext","codeunit",30157,"GetValueAsDateTime",2],[252,"ext","codeunit",30157,"GetValueAsBoolean",2]]},{"name":"SetShop","line":259,"kind":"procedure","access":"internal","params":1,"steps":[[263,"ext","codeunit",30103,"SetShop",1],[264,"ext","codeunit",30316,"SetShop",1]]},{"name":"SetShop","line":271,"kind":"procedure","access":"internal","params":1,"steps":[[274,"ext","codeunit",30103,"SetShop",1]]},{"name":"UpdateCustomer","line":282,"kind":"procedure","access":"internal","params":2,"steps":[[290,"call","CreateGraphQueryUpdateCustomer",2],[293,"ext","codeunit",30103,"ExecuteGraphQL",1],[296,"ext","codeunit",30103,"GetIdOfGId",1],[296,"ext","codeunit",30157,"GetValueAsText",2],[298,"ext","codeunit",30157,"GetValueAsText",2],[302,"ext","codeunit",30157,"GetValueAsDateTime",2],[303,"ext","codeunit",30157,"GetValueAsBoolean",2],[304,"ext","codeunit",30157,"GetValueAsDateTime",2],[305,"ext","codeunit",30157,"GetValueAsBoolean",2],[309,"ext","codeunit",30103,"GetIdOfGId",1],[309,"ext","codeunit",30157,"GetValueAsText",2],[313,"ext","codeunit",30103,"GetIdOfGId",1],[313,"ext","codeunit",30157,"GetValueAsText",2],[317,"ext","codeunit",30157,"GetValueAsText",3],[318,"ext","codeunit",30157,"GetValueAsText",3]]},{"name":"CreateGraphQueryUpdateCustomer","line":324,"kind":"procedure","access":"internal","params":2,"steps":[[335,"ext","codeunit",30115,"OnBeforeSendUpdateShopifyCustomer",5],[337,"call","AddFieldToGraphQuery",3],[339,"call","AddFieldToGraphQuery",3],[341,"call","AddFieldToGraphQuery",3],[343,"call","AddFieldToGraphQuery",3],[345,"call","AddFieldToGraphQuery",3],[346,"ext","table",30105,"GetNote",0],[346,"ext","table",30105,"GetNote",0],[347,"call","AddFieldToGraphQuery",3],[347,"ext","codeunit",30103,"EscapeGraphQLData",1],[347,"ext","table",30105,"GetNote",0],[351,"call","AddFieldToGraphQuery",3],[353,"call","AddFieldToGraphQuery",3],[355,"call","AddFieldToGraphQuery",3],[357,"call","AddFieldToGraphQuery",3],[359,"call","AddFieldToGraphQuery",3],[359,"ext","codeunit",30103,"EscapeGraphQLData",1],[361,"call","AddFieldToGraphQuery",3],[361,"ext","codeunit",30103,"EscapeGraphQLData",1],[363,"call","AddFieldToGraphQuery",3],[365,"call","AddFieldToGraphQuery",3],[365,"ext","codeunit",30103,"EscapeGraphQLData",1],[367,"call","AddFieldToGraphQuery",3],[371,"call","AddFieldToGraphQuery",3]]},{"name":"UpdateShopifyCustomerFields","line":387,"kind":"procedure","access":"internal","params":2,"steps":[[403,"ext","codeunit",30157,"GetValueAsDateTime",2],[409,"ext","codeunit",30157,"GetValueAsDateTime",2],[411,"ext","codeunit",30157,"GetValueAsText",3],[412,"ext","codeunit",30157,"GetValueAsText",3],[413,"ext","codeunit",30157,"GetValueAsText",3],[415,"ext","codeunit",30157,"GetValueAsText",2],[418,"ext","codeunit",30157,"GetValueAsText",2],[422,"ext","codeunit",30157,"GetValueAsDateTime",2],[423,"ext","codeunit",30157,"GetValueAsBoolean",2],[424,"ext","codeunit",30157,"GetValueAsBoolean",2],[425,"ext","codeunit",30157,"GetValueAsText",2],[428,"ext","codeunit",30157,"GetValueAsText",2],[431,"ext","codeunit",30157,"GetValueAsText",2],[434,"ext","codeunit",30157,"GetValueAsDateTime",2],[435,"write",30105,"Modify"],[438,"ext","codeunit",30157,"GetJsonArray",3],[439,"ext","table",30105,"UpdateTags",1],[439,"ext","codeunit",30157,"GetArrayAsText",1],[441,"ext","codeunit",30157,"GetJsonArray",3],[445,"ext","codeunit",30103,"GetIdOfGId",1],[445,"ext","codeunit",30157,"GetValueAsText",2],[453,"write",30106,"Insert"],[456,"ext","codeunit",30157,"GetValueAsText",3],[457,"ext","codeunit",30157,"GetValueAsText",3],[458,"ext","codeunit",30157,"GetValueAsText",3],[459,"ext","codeunit",30157,"GetValueAsText",3],[460,"ext","codeunit",30157,"GetValueAsText",3],[461,"ext","codeunit",30157,"GetValueAsText",3],[462,"ext","codeunit",30157,"GetValueAsText",3],[463,"ext","codeunit",30157,"GetValueAsText",2],[464,"ext","codeunit",30157,"GetValueAsText",2],[465,"ext","codeunit",30157,"GetValueAsText",3],[466,"ext","codeunit",30157,"GetValueAsText",3],[468,"ext","codeunit",30157,"GetValueAsText",2],[472,"write",30106,"Modify"],[485,"write",30106,"DeleteAll"],[488,"ext","codeunit",30157,"GetJsonObject",3],[489,"ext","codeunit",30103,"GetIdOfGId",1],[489,"ext","codeunit",30157,"GetValueAsText",2],[494,"write",30106,"Modify"],[498,"ext","codeunit",30157,"GetJsonArray",3],[499,"ext","codeunit",30316,"UpdateMetafieldsFromShopify",3]]},{"name":"FillInMissingShopIds","line":503,"kind":"procedure","access":"internal","params":0,"steps":[[519,"write",30105,"ModifyAll"],[523,"ext","codeunit",30103,"ExecuteGraphQL",2],[525,"ext","codeunit",30157,"GetJsonArray",3],[529,"write",30105,"ModifyAll"],[532,"ext","codeunit",30157,"GetValueAsText",2],[534,"ext","codeunit",30157,"GetValueAsText",2],[535,"ext","codeunit",30157,"GetValueAsBoolean",2]]}]}