---
title: "Codeunit 30362 Shpfy Posted Invoice Export, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/points/
object: https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/
app: "Shopify Connector"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
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/"
---

# Codeunit 30362 Shpfy Posted Invoice Export, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/points/

14 procedures and triggers with a step in src/Apps/W1/Shopify/App/src/Invoicing/Codeunits/ShpfyPostedInvoiceExport.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 27](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L27), trigger.

- [29](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L29) calls `ExportPostedSalesInvoiceToShopify`

## SetShop

[Line 45](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L45), internal.

- [48](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L48) calls [Codeunit 30159 Shpfy Draft Orders API](https://jonas-paprotka.de/ref/codeunit/30159-shpfy-draft-orders-api/) `SetShop`
- [49](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L49) calls [Codeunit 30361 Shpfy Fulfillment API](https://jonas-paprotka.de/ref/codeunit/30361-shpfy-fulfillment-api/) `SetShop`

## ExportPostedSalesInvoiceToShopify

[Line 60](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L60), internal.

- [71](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L71) calls `IsInvoiceExportable`
- [72](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L72) calls `SetSalesInvoiceShopifyOrderInformation`
- [76](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L76) calls `MapPostedSalesInvoiceData`
- [78](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L78) calls [Codeunit 30159 Shpfy Draft Orders API](https://jonas-paprotka.de/ref/codeunit/30159-shpfy-draft-orders-api/) `CreateDraftOrder`
- [80](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L80) calls `SetSalesInvoiceShopifyOrderInformation`
- [83](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L83) calls [Codeunit 30159 Shpfy Draft Orders API](https://jonas-paprotka.de/ref/codeunit/30159-shpfy-draft-orders-api/) `CompleteDraftOrder`
- [85](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L85) calls `IsSuccess`
- [86](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L86) calls [Codeunit 30157 Shpfy Json Helper](https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/) `GetValueAsBigInteger`
- [87](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L87) calls [Codeunit 30157 Shpfy Json Helper](https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/) `GetValueAsText`
- [89](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L89) calls [Codeunit 30361 Shpfy Fulfillment API](https://jonas-paprotka.de/ref/codeunit/30361-shpfy-fulfillment-api/) `GetFulfillmentOrderIds`
- [90](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L90) calls `CreateFulfillmentsForShopifyOrder`
- [91](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L91) calls `CreateShopifyInvoiceHeader`
- [92](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L92) calls `SetSalesInvoiceShopifyOrderInformation`
- [93](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L93) calls `AddDocumentLinkToBCDocument`
- [95](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L95) calls `SetSalesInvoiceShopifyOrderInformation`

## CreateFulfillmentsForShopifyOrder

[Line 98](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L98), local.

- [103](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L103) calls [Codeunit 30361 Shpfy Fulfillment API](https://jonas-paprotka.de/ref/codeunit/30361-shpfy-fulfillment-api/) `CreateFulfillment`

## IsInvoiceExportable

[Line 106](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L106), local.

- [115](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L115) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [120](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L120) calls `ShopifyPaymentTermsExists`
- [121](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L121) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [126](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L126) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [130](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L130) calls `CheckCustomerTemplates`
- [131](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L131) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [135](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L135) calls `CheckSalesInvoiceHeaderLines`

## CheckSalesInvoiceHeaderLines

[Line 168](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L168), local.

- [175](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L175) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [185](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L185) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`
- [190](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L190) calls [Codeunit 30313 Shpfy Skipped Record](https://jonas-paprotka.de/ref/codeunit/30313-shpfy-skipped-record/) `LogSkippedRecord`

## SetSalesInvoiceShopifyOrderInformation

[Line 198](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L198), local.

- [200](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L200) validates [Table 112 Sales Invoice Header](https://jonas-paprotka.de/ref/table/112-sales-invoice-header/) `Shpfy Order Id`
- [201](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L201) validates [Table 112 Sales Invoice Header](https://jonas-paprotka.de/ref/table/112-sales-invoice-header/) `Shpfy Order No.`
- [202](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L202) writes [Table 112 Sales Invoice Header](https://jonas-paprotka.de/ref/table/112-sales-invoice-header/) Modify(true)

## MapPostedSalesInvoiceData

[Line 205](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L205), internal.

- [214](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L214) calls `MapSalesInvoiceHeader`
- [220](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L220) calls `MapSalesInvoiceLine`

## MapSalesInvoiceHeader

[Line 224](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L224), local.

- [235](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L235) calls `MapCurrencyCode`
- [242](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L242) calls `IsInvoiceUnpaid`
- [244](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L244) calls `MapBillToInformation`
- [245](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L245) calls `MapShipToInformation`
- [247](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L247) writes [Table 30118 Shpfy Order Header](https://jonas-paprotka.de/ref/table/30118-shpfy-order-header/) Insert

## MapSalesInvoiceLine

[Line 306](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L306), local.

- [324](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L324) writes [Table 30118 Shpfy Order Header](https://jonas-paprotka.de/ref/table/30118-shpfy-order-header/) Modify
- [326](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L326) calls `MapTaxLine`
- [328](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L328) writes [Table 30119 Shpfy Order Line](https://jonas-paprotka.de/ref/table/30119-shpfy-order-line/) Insert

## IsSuccess

[Line 349](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L349), local.

- [351](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L351) calls [Codeunit 30157 Shpfy Json Helper](https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/) `GetJsonArray`

## CreateShopifyInvoiceHeader

[Line 354](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L354), local.

- [359](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L359) validates [Table 30161 Shpfy Invoice Header](https://jonas-paprotka.de/ref/table/30161-shpfy-invoice-header/) `Shopify Order Id`
- [360](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L360) writes [Table 30161 Shpfy Invoice Header](https://jonas-paprotka.de/ref/table/30161-shpfy-invoice-header/) Insert(true)

## AddDocumentLinkToBCDocument

[Line 363](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L363), local.

- [371](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L371) calls [Codeunit 30259 Shpfy BC Document Type Convert](https://jonas-paprotka.de/ref/codeunit/30259-shpfy-bc-document-type-convert/) `Convert`
- [373](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L373) writes [Table 30146 Shpfy Doc. Link To Doc.](https://jonas-paprotka.de/ref/table/30146-shpfy-doc-link-to-doc/) Insert(true)

## ConfigurePaymentTermsMapping

[Line 376](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L376), internal.

- [383](https://jonas-paprotka.de/ref/codeunit/30362-shpfy-posted-invoice-export/source/#L383) runs [Page 30162 Shpfy Payment Terms Mapping](https://jonas-paprotka.de/ref/page/30162-shpfy-payment-terms-mapping/)

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
