---
id: object/codeunit/30166
type: object
title: Codeunit 30166 "Shpfy Process Order"
summary: Codeunit 30166 "Shpfy Process Order" in Shopify (Microsoft.Integration.Shopify). 5 public procedures, 2 event subscribers. 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: 46d76adea023c2ebdcd8668a071a18ce5cb502e5267c61f19bf41406bf1f92eb
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Shopify/app/src/Order%20handling/Codeunits/ShpfyProcessOrder.Codeunit.al
    title: src/Apps/W1/Shopify/app/src/Order handling/Codeunits/ShpfyProcessOrder.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/12214
    - change/bcapps/11407
    - change/bcapps/10407
    - change/bcapps/8554
object_type: codeunit
object_id: 30166
name: Shpfy Process 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: 15
  events: 0
  subscribers: 2
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 30166 "Shpfy Process Order"

> Codeunit 30166 "Shpfy Process Order" in Shopify (Microsoft.Integration.Shopify). 5 public procedures, 2 event subscribers. 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/ShpfyProcessOrder.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| TableNo | Shpfy Order Header |
| Permissions | tabledata Item = rim, tabledata "Item Variant" = rim |

## Event subscriptions

- TransferShopifyValuesToShipmentHeader subscribes to Codeunit "Sales-Post" OnInsertShipmentHeaderOnAfterTransferfieldsToSalesShptHeader
- TransferShopifyValuesOnBeforeSalesLineInsert subscribes to Table "Sales Header" OnBeforeSalesLineInsert

## Procedures

- `CreateHeaderFromShopifyOrder(var SalesHeader: Record "Sales Header"; ShopifyOrderHeader: Record "Shpfy Order Header")` (internal): Create Header From Shopify Order.
- `CreateLinesFromShopifyOrder(var SalesHeader: Record "Sales Header"; ShopifyOrderHeader: Record "Shpfy Order Header")` (internal): Create Lines From Shopify Order.
- `GetCountryCode(ISOCode: Code[10]): Code[10]` (internal): Get Country Code.
- `CleanUpLastCreatedDocument()` (internal): Description for CleanUpLastCreatedDocument.
- `SetShopifyShop(Shop: Record "Shpfy Shop")` (internal)

Plus 8 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 30118 "Shpfy Order Header"](../table/30118.md)

## Recent changes

- 2026-10-06 [#12214 [Shopify] Store currency handling for auto-created orders](../../changes/bcapps/12214.md) (main, BC30, fix)
- 2026-09-18 [#11407 [Shopify] Keep exchange shipments eligible for synchronization](../../changes/bcapps/11407.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 [#8554 [Shopify] Fix incorrect G/L line on credit memo for refund with exchange item](../../changes/bcapps/8554.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 Process Order")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
