EulandaXtools — Funktionsreferenz
Setzt ein Metafield an einer Shopify-Bestellung.
Set-ShopifyOrderMetafield [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-OrderId]
<long> [-Namespace] <string> [-Key] <string> [-Value] <string> [-Type] <string> [[-MaxRetries]
<int>] [[-TimeoutSec] <int>] [<CommonParameters>]Erstellt oder aktualisiert ein Metafield an der angegebenen Order über die GraphQL Admin API (metafieldsSet Mutation).
Für Dokumenten-Verknüpfungen wird Type 'file_reference' verwendet und als Value die Shopify GID (z.B. 'gid://shopify/GenericFile/123').
-Shop
Type: stringShopify-Shop-Domain, z.B. 'mein-shop.myshopify.com'.
-Token
Type: stringAdmin API Access Token (shpat_...) der Custom App.
-ApiVersion
Type: stringAPI-Version, z.B. '2025-01'.
-OrderId
Type: longShopify-Order-ID (numerisch).
-Namespace
Type: stringNamespace des Metafields, z.B. 'custom'.
-Key
Type: stringSchlüssel des Metafields, z.B. 'invoice_pdf'.
-Value
Type: stringWert des Metafields. Für file_reference: GID-String.
-Type
Type: stringDatentyp des Metafields, z.B. 'file_reference', 'single_line_text_field'.
-MaxRetries
Type: int
Default: 3Maximale Anzahl Wiederholungen bei Rate-Limit.
-TimeoutSec
Type: int
Default: 60HTTP Timeout in Sekunden.
pscustomobject -- Das erstellte Metafield-Objekt.Set-ShopifyOrderMetafield -Shop 'mein-shop.myshopify.com' `
-Token 'shpat_abc123' -ApiVersion '2025-01' `
-OrderId 5551234567890 -Namespace 'custom' -Key 'invoice_pdf' `
-Value 'gid://shopify/GenericFile/123456789' -Type 'file_reference'