Export-ShopifyOrderAsCsv

EulandaXtools — Funktionsreferenz

Export-ShopifyOrderAsCsv

ÜBERSICHT

Exportiert eine Shopify-Bestellung als CSV-Datei.

SYNTAX

Export-ShopifyOrderAsCsv [-Order] <pscustomobject> [-Path] <string> [[-FileName] <string>]
    [<CommonParameters>]

BESCHREIBUNG

Wandelt ein normalisiertes Shopify-Order-Objekt (aus Get-ShopifyOrder) in eine CSV-Datei um. Die CSV dient als Zwischenformat für die Weiterverarbeitung mit ConvertFrom-CsvToEulandaMetaXml.

Pro Bestellposition wird eine Zeile erzeugt. Kopfdaten (Kunde, Adresse, Bestellnummer) werden in jeder Zeile wiederholt.

Der Spaltentrenner ist Semikolon (;), Encoding ist UTF-8 mit BOM.

PARAMETER

-Order

Type: pscustomobject

Normalisiertes Shopify-Order-Objekt aus Get-ShopifyOrder.

-Path

Type: string

Zielordner für die CSV-Datei.

-FileName

Type: string

Optionaler Dateiname. Wenn nicht gesetzt, wird "order-{OrderId}.csv" verwendet.

AUSGABEN

System.IO.FileInfo

BEISPIELE

# Bestellung als CSV exportieren
$order = Get-ShopifyOrder -Shop $shop -Token $token `
  -ApiVersion '2025-01' -OrderId 5551234567890
Export-ShopifyOrderAsCsv -Order $order -Path 'C:\queue\csv\done'
# Mit eigenem Dateinamen
Export-ShopifyOrderAsCsv -Order $order -Path $csvPath -FileName 'shopify-1001.csv'