---
id: object/codeunit/30161
type: object
title: Codeunit 30161 "Shpfy Import Order"
summary: Codeunit 30161 "Shpfy Import Order" in Shopify (Microsoft.Integration.Shopify). 10 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - shopify
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 423caffba1d5994f94f20196b80255a1ef544eb3c784f74f3847ae350fa49e21
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Shopify/app/src/Order%20handling/Codeunits/ShpfyImportOrder.Codeunit.al
    title: src/Apps/W1/Shopify/app/src/Order handling/Codeunits/ShpfyImportOrder.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10631
    - change/bcapps/10467
    - change/bcapps/10462
    - change/bcapps/10407
    - change/bcapps/9537
    - change/bcapps/8554
    - change/bcapps/8679
object_type: codeunit
object_id: 30161
name: Shpfy Import Order
namespace: Microsoft.Integration.Shopify
app: Shopify
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 44
  events: 0
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 30161 "Shpfy Import Order"

> Codeunit 30161 "Shpfy Import Order" in Shopify (Microsoft.Integration.Shopify). 10 public procedures. Introduced in BC29, still in BC30.

Shopify · Microsoft.Integration.Shopify · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Shopify/app/src/Order%20handling/Codeunits/ShpfyImportOrder.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| TableNo | Shpfy Orders to Import |
| Permissions | tabledata "Sales Line" = rim |

## Procedures

- `SetShop(ShopCode: Code[20]): Boolean` (internal)
- `ReimportExistingOrderConfirmIfConflicting(OrderHeader: Record "Shpfy Order Header")` (internal)
- `ImportCreateAndUpdateOrderHeaderFromMock(ShopCode: Code[20]; OrderId: BigInteger; MockJOrder: JsonObject)` (internal)
- `ImportCreateAndUpdateOrderLinesFromMock(OrderId: BigInteger; MockJOrderLines: JsonArray)` (internal)
- `ConsiderRefundsInQuantityAndAmounts(var OrderHeader: Record "Shpfy Order Header")` (internal)
- `MarkExchangeItemOrderLines(var OrderHeader: Record "Shpfy Order Header"; ExchangeLineIds: List of [BigInteger])` (internal)
- `IsImportedOrderConflictingExistingOrder(JOrder: JsonObject; OrderHeader: Record "Shpfy Order Header"; var TempOrderLine: Record "Shpfy Order Line" temporary; ExchangeLineIds: List of [BigInteger]): Boolean` (internal)
- `MarkOrderConflictAsResolved(var OrderHeader: Record "Shpfy Order Header")` (internal)
- `TranslateCurrencyCode(ShopifyCurrencyCode: Text): Code[10]` (internal)
- `CloseOrder(var OrderHeader: Record "Shpfy Order Header")` (internal): Description for CloseOrder.

Plus 34 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 30121 "Shpfy Orders to Import"](../table/30121.md)

## Recent changes

- 2026-08-26 [#10631 Integration/main to releases 29.x 31a860b5](../../changes/bcapps/10631.md) (releases/29.x, BC29, feature)
- 2026-08-24 [#10467 [Shopify] Fix more-expensive exchange refund: no balancing G/L line, no false processed-order warning](../../changes/bcapps/10467.md) (main, BC30, fix)
- 2026-08-24 [#10462 [Shopify] Fix order edit retaining discount allocation for removed quantity](../../changes/bcapps/10462.md) (main, BC30, fix)
- 2026-08-20 [#10407 Shopify connector: persist order Tax Area Code, Tax Liable, and Tax Exempt (stack 1/3)](../../changes/bcapps/10407.md) (main, BC30, feature)
- 2026-07-21 [#9537 [Shopify] Store tax lines linked to order shipping charges](../../changes/bcapps/9537.md) (main, BC30, feature)
- 2026-07-21 [#8554 [Shopify] Fix incorrect G/L line on credit memo for refund with exchange item](../../changes/bcapps/8554.md) (main, BC30, fix)
- 2026-07-17 [#8679 [Shopify] Fix missing shop currency mapping on order transactions](../../changes/bcapps/8679.md) (main, BC30, fix)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Shpfy Import Order")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
