Set-ShopifyProductMetafield

EulandaXtools — Funktionsreferenz

Set-ShopifyProductMetafield

ÜBERSICHT

Setzt ein Metafield an einem Shopify-Produkt.

SYNTAX

Set-ShopifyProductMetafield [-Shop] <string> [-Token] <string> [-ApiVersion] <string> [-ProductId]
    <long> [-Namespace] <string> [-Key] <string> [-Value] <string> [-Type] <string> [[-MaxRetries]
    <int>] [[-TimeoutSec] <int>] [<CommonParameters>]

BESCHREIBUNG

Erstellt oder aktualisiert ein Metafield am angegebenen Produkt über die GraphQL Admin API (metafieldsSet Mutation).

Wird von Export-EulandaArticleToShopify verwendet, um Produkte mit 'eulanda.source = EulandaXtools' zu markieren (Herkunfts-Tag).

PARAMETER

-Shop

Type: string

Shopify-Shop-Domain, z.B. 'mein-shop.myshopify.com'.

-Token

Type: string

Admin API Access Token (shpat_...) der Custom App.

-ApiVersion

Type: string

API-Version, z.B. '2025-01'.

-ProductId

Type: long

Shopify-Product-ID (numerisch).

-Namespace

Type: string

Namespace des Metafields, z.B. 'eulanda'.

-Key

Type: string

Schlüssel des Metafields, z.B. 'source'.

-Value

Type: string

Wert des Metafields.

-Type

Type: string

Datentyp des Metafields, z.B. 'single_line_text_field'.

-MaxRetries

Type: int
Default: 3

Maximale Anzahl Wiederholungen bei Rate-Limit.

-TimeoutSec

Type: int
Default: 60

HTTP Timeout in Sekunden.

AUSGABEN

pscustomobject -- Das erstellte Metafield-Objekt.

BEISPIELE

Set-ShopifyProductMetafield -Shop 'mein-shop.myshopify.com' `
  -Token 'shpat_abc123' -ApiVersion '2025-01' `
  -ProductId 5551234567890 -Namespace 'eulanda' -Key 'source' `
  -Value 'EulandaXtools' -Type 'single_line_text_field'