Skip to content

ShopwareAddProducts - Shopware

Version: 6.5.x

← Shopware Add-On Übersicht

Mit diesem Step können Sie neue Artikel in einem Shopware System anlegen.

Die folgenden Daten sind dazu mindestens notwendig:

  • ArticleNumber - Eine Spalte mit der Artikelnummer des neuen Artikels 

  • Name - Name des neuen Artikels

  • Tax - Mehrwertsteuer des neuen Artikels

Dieser Step ermöglicht die Neuanlage von Artikeln. Updates von bestehenden Artikeln bzw. die Anlage eines Artikels mit einer bereits vorhandenen Artikelnummer sind nicht möglich. Zum setzen von Beständen und Preisen vorhandener Artikel können die Steps  ShopwareSetCurrentStock bzw. ShopwareSetPrice verwendet werden. Wie Sie neue Artikel erkennen können wird in diesem Cookbook beschrieben.

 

Step Konfiguration:

Input

Beschreibung

account

Wählen sie hier Ihren Shopware-Account aus, um auf die Schnittstelle Ihres Shops zuzugreifen zu können (weitere Informationen)

inputSpreadsheet Verknüpfung zu einem Output (Spreadsheet) eines vorherigen Step, dass z.B. mit Artikeldaten eines Lieferanten enthält


mappingdefinition Durch einen Klick auf "Configure" können Sie die Spalten des eben verknüpften Spreadsheets zuweisen. Weiterhin haben Sie, falls benötigt, die Möglichkeit die im Spreadsheet enthaltenen Daten zu mappen.
limitProducts (optional)

Dieser Filter schränkt ein wie viele Artikel maximal angelegt werden. Gerade während der Erstellung eines Flows ist es praktisch diesen Wert eher klein zu halten (z.B. 1), damit der Aufwand zur Korrektur bei evtl. Fehlern minimiert wird.

Default: 25

Mit klick auf den “Configure” Button gelangen Sie in die sogenannte Mapping Ansicht. Hier können Sie weitere, optional Spalten für die neuen Artikel zuordnen oder mit festen Werten befüllen.

Falls Sie Werte nicht setzen möchten, können Sie die entsprechende Spalte aus dem Mapping entfernen.

Die Bild URLs in der Zielspalte Images müssen Komma - separiert angeben werden, z.B. https://apps.synesty.com/templates/img/studio_inline_logo_square_572_300dpi.png,https://apps.synesty.com/templates/img/synesty_logo_square_572_300dpi.png

Die Kategorien der Zielspalte CategoryPaths müssen den gesamten Kategoriepfad Pipe (|) getrennt beinhalten, z.B: Deutsch|Test123 . Mehrere Kategoriepfade werden durch Semikolon getrennt, z.B: Deutsch|Test123;Englisch|Test321 angegeben. Bitte beachten Sie, dass beim Artikelimport nur die tiefste Kategorie-Ebene (“Blattkategorie”, im Beispiel Test123 & Test321) korrekt angelegt werden kann. Alle Oberkategorien müssen bereits angelegt sein. Alternativ können diese auch über den ShopwareAddCategories Step vor dem Artikelimport angelegt werden.

Ab Shopware Version 5.2

Alle Eigenschaften können in der Zielspalte Properties als Schlüssel-Wert Paar (Option1=Wert1;Option2=Wert2 ...) angeben werden. Neue Eigenschaften und deren Werte werden automatisch angelegt. Für den Import der Eigenschaften muss die Zielspalte FilterGroupId (ID aus Shopware Datenbank Tabelle s_filter) gesetzt werden.

Cross-Selling(similar[Ähnliche Artikel] und related[Zubehör Artikel]): In diesen beiden Spalten können Sie eine Komma-separierte Liste von Artikelnummern angeben, z.B: SW10001,SW10003,SW1005 um Ähnliche bzw. Zubehör Artikel zu verknüpfen.

Ressourcen(Links und Downloads): In diesen Zielspalten können sie ein Komma-separierte Liste von Urls angeben, z.B: https://app.synesty.com,https://apps.synesty.com/transformy
Wichtig die URL müssen mit http:// bzw. https:// beginnen. Sie können optional auch einen Namen für den Link bzw. Download vergeben. Der Name muss durch ein Gleichheitszeichen(=) getrennt vor dem Link bzw. Download eingefügt werden, z.B: synesty=https://app.synesty.com,tranformy=https://apps.synesty.com/transformy

Wichtig: Bild-URLs und Ressourcensollten in der Regel als HTTP-URL angegeben werden. D.h. die URL muss mit **http://**bzw.https:// beginnen (z.B. http://meinserver.de/meinbild1.jpg)

Eigene Freitextfelder/Attribute setzen (ab Shopware 5.2)

Ab Shopware 5.2 ist es möglich neben den 20 Standard-Feldern, weitere Attribute anzulegen. 

Diese Attribute können gesetzt werden, indem Sie in der Konfiguration des Steps eine neue Spalte hinzufügen, die den Titel *Attribute_{Spaltenname} *hat.

Wenn sie einen Datenbank Spaltentitel mit Unterstrichen (_) verwenden erwartet die Shopware API eine Camel Case Schreibweise.

Beispiele:

DB SpaltennameTitel Zielspalte in Step
meintextfeldAttribute_meintextfeld
mein_textfeldAttribute_meinTextfeld
mein_text_feldAttribute_meinTextFeld

Ein Flow zum Anlegen neuer Artikel in Shopware könnte wie folgt aussehen:

Eine CSV Datei wird vom URLDownload Step geladen. Der SpreadsheetCSVReader liest diese Datei ein und wandelt sie in ein Spreadsheet um. Im SpreadsheetMapper können die Daten umgeformt und ein Querverweis auf eine Datastore mit den bereits vorhandenen Shopware Artikel durchgeführt werden. Der Spreadsheet Filter Step kann anschließend alle neuen Artikelzeilen filtern (z.B. durch SpalteQuerverweis == “No Record found”). Am Ende des Flows werden die neuen Artikel vom ShopwareAddProducts Step importiert.


Inputs

Das sind die Optionen, mit denen man den Step konfigurieren kann.

Name Datentyp Beschreibung Pflichtfeld Werte
account ACCOUNT Ihre Shopware 6 Verbindung Ja
limit STRING Begrenzt die Anzahl der Artikel die angelegt werden sollen. Leer für unbegrenzt. Nein
productSpreadsheet SPREADSHEET Ein SPREADSHEET mit den Artikeldaten die zu Shopware importiert werden sollen. Ja
mappingdefinition STRING Die Mapping-Definition als JSON String Nein
Folgende Felder sind zu konfigurieren :

Feld Datentyp Beschreibung Pflichtfeld Standardwert
Id SINGLE The UUID of new products is generated automatically (empty value) or can optionally be entered here (pattern: ^[0-9a-f]{32}$ ). Nein
ProductNumber SINGLE Unique number assigned to individual products. Define rules for automatic assignment of every product creation as per your number range. Ja
Name SINGLE Name of the product. Ja
TaxId SINGLE Unique identity of tax. Nein
TaxRate SINGLE Nein
Stock SINGLE Indicates the number of products available. Ja 0
PriceCurrencyId SINGLE Nein
PriceCurrencyIsoCode SINGLE Nein
PriceGross SINGLE Nein
PriceNet SINGLE Nein
PriceLinked SINGLE Nein
PriceRuleId SINGLE Nein
ListPriceGross SINGLE Nein
ListPriceNet SINGLE Nein
ListPriceLinked SINGLE Nein
RegulationPriceGross SINGLE Nein
RegulationPriceNet SINGLE Nein
RegulationPriceLinked SINGLE Nein
PurchasePriceGross SINGLE Nein
PurchasePriceNet SINGLE Nein
PurchasePriceLinked SINGLE Nein
Description SINGLE Description of the product. Nein
MetaDescription SINGLE A short description of the product for search results listings. Nein
MetaTitle SINGLE A page title indexed by search engines and appears in search results listings. Nein
Keywords SINGLE Keywords that give additional information about the Product. Nein
AdditionalText SINGLE Nein
Active SINGLE When boolean value is true, the products are available for selection in the storefront for purchase. Nein
MarkAsTopseller SINGLE Indicates weather the product is top seller or not. Nein
DisplayInListing SINGLE Nein
DeliveryTimeId SINGLE Unique identity of delivery time. Nein
RestockTime SINGLE The restock time in days indicates how long it will take until a sold out item is back in stock. Nein
ShippingFree SINGLE Indicates weather the shipping price is free or not. Nein
MinPurchase SINGLE Minimum number of items that can be purchased. Nein
PurchaseSteps SINGLE Specifies the scales in which the item is to be offered. For example, a scale of 2 means that your customers can purchase 2, 4, 6 products, etc., but not 1, 3 or 5. Nein
MaxPurchase SINGLE Maximum number of items that can be purchased. Nein
IsCloseout SINGLE When the value is set to true, the product is hidden when sold out. Nein
ReleaseDate SINGLE The release date of a product or product model. This can be used to distinguish the exact variant of a product. Nein
EAN SINGLE Indicates EAN of the product. Nein
ManufacturerNumber SINGLE Unique number that describes the manufacturer. Nein
ManufacturerId SINGLE Unique identity of the manufacturer. Nein
ManufacturerName SINGLE Name of the manufacturer. Nein
Width SINGLE The width of the product. Nein
Height SINGLE The height of the product. Nein
Length SINGLE The length of the product. Nein
Weight SINGLE The weight of the product. Nein
PurchaseUnit SINGLE Quantity of the item purchased. Nein
TagIds MULTIPLEVALUE Tag ids as semicolon separated list, e.g. 25ab9d62bbc346f480549861f0f657b2;cbcee43364b444fb879eb2dd05b280ac Nein
VisibilitySaleschannelIds MULTIPLEVALUE Visibility ids as semicolon separated list, e.g. 25ab9d62bbc346f480549861f0f657b2;cbcee43364b444fb879eb2dd05b280ac Nein
CategoryIds MULTIPLEVALUE Category ids as semicolon separated list of category ids, e.g. 25ab9d62bbc346f480549861f0f657b2;cbcee43364b444fb879eb2dd05b280ac Nein
CustomFields MAP Custom product fields as map, e.g. custom_field1=Text1;custom_field2=132 Nein
PropertyGroupOptionIds MULTIPLEVALUE Property Group Option Ids as semicolon separated list of property ids, e.g. 25ab9d62bbc346f480549861f0f657b2;cbcee43364b444fb879eb2dd05b280ac Nein
autoCreateManufacturers STRING Sollen neue Hersteller automatisch angelegt werden (Zielspalte 'ManufacturerName')? Nein
  • Ja
  • Nein
autoCreateTax STRING Sollen neue Steuersätze automatisch angelegt werden (Zielspalte 'TaxRate' )? Nein
  • Ja
  • Nein

Outputs

Das sind die Ergebnisse des Steps, die von nachfolgenden Steps, nach der Ausführung verwendet werden können.

Name Datentyp Beschreibung Pflichtfeld Werte
results SPREADSHEET Ein SPREADSHEET, dass die erstellten Produkte enthält. Ja
Folgende Felder sind im Output enthalten :

Feld Datentyp Beschreibung Pflichtfeld Standardwert
Type SINGLE Type of product. Nein
identifier SINGLE The identifier column to import Spreadsheet into a Datastore. Nein
Id SINGLE Unique identity of the product. Nein
parent_identifier SINGLE The parent_identifier column to import Spreadsheet into a Datastore. Nein
ParentId SINGLE Unique identity of the parent product (MainVariant). Nein
ChildCount SINGLE Number of variants the product has. Nein
ProductNumber SINGLE Unique number assigned to individual products. Define rules for automatic assignment of every product creation as per your number range. Nein
Name SINGLE Name of the product. Nein
MetaTitle SINGLE A page title indexed by search engines and appears in search results listings. Nein
MetaDescription SINGLE A short description of the product for search results listings. Nein
Description SINGLE Description of the product. Nein
Keywords SINGLE Keywords that give additional information about the Product. Nein
AdditionalText SINGLE (depracated) AdditonalText is not used anymore. The column will be remove in a future version of this Step. Nein
Active SINGLE If true, the products are available for selection in the storefront for purchase. Nein
MarkAsTopseller SINGLE Indicates weather the product is top seller or not. Nein
CoverId SINGLE Unique identity of a ProductMedia item used as product cover. Nein
CoverUrl SINGLE Url of cover image. Nein
ImageUrls MULTIPLEVALUE A list of image URLs (media type = image) Nein
MediaIds MULTIPLEVALUE A list of product media Ids Nein
MediaUrls MULTIPLEVALUE A list of the URLs of all product media (including images) Nein
PriceGross SINGLE The gross price value. Nein
PriceNet SINGLE The net price value Nein
PriceLinked SINGLE If true, the net and gross value is linked Nein true
PriceListPriceGross SINGLE The gross list price value. Nein
PriceListPriceNet SINGLE The net list price value. Nein
PriceListPriceLinked SINGLE If true, the net list price and gross list price is linked Nein
PriceRegulationPriceGross SINGLE The gross regulation price value. Nein
PriceRegulationPriceNet SINGLE The net regulation price value. Nein
PriceRegulationPriceLinked SINGLE If true, the net regulation price and gross regulation price is linked Nein
PurchasePrice SINGLE (depracated) Purchase price (gross) of default currency. Nein
PurchasePriceGross SINGLE The gross price value. Nein
PurchasePriceNet SINGLE The net price value Nein
PurchasePriceLinked SINGLE If true, the net and gross value is linked Nein true
DefaultCurrencyId SINGLE Unique identity of currency. Nein
DefaultCurrencyName SINGLE Full name of the currency. For example, US-Dollar. Nein
DefaultCurrencyIsoCode SINGLE Standard international three digit code to represent currency. For example, USD. Nein
TaxId SINGLE Unique identity of tax. Nein
TaxRate SINGLE Rate of tax. Nein
TaxName SINGLE Name defined for a Tax. Nein
Stock SINGLE Indicates the number of products available. Nein
AvailableStock SINGLE Indicates the number of products still available. This value results from the stock minus the open orders. Nein
Available SINGLE Indicates weather the product is available or not. Nein
DisplayInListing SINGLE (depracated) This column is not used anymore and will be removed in future version of this step. Nein
DeliveryTimeId SINGLE Unique identity of delivery time. Nein
RestockTime SINGLE The restock time in days indicates how long it will take until a sold out item is back in stock. Nein
ShippingFree SINGLE Indicates weather the shipping price is free or not. Nein
MinPurchase SINGLE Minimum number of items that can be purchased. Nein
PurchaseSteps SINGLE Specifies the scales in which the item is to be offered. For example, a scale of 2 means that your customers can purchase 2, 4, 6 products, etc., but not 1, 3 or 5. Nein
MaxPurchase SINGLE Maximum number of items that can be purchased. Nein
IsCloseout SINGLE When the value is set to true, the product is hidden when sold out. Nein
ReleaseDate SINGLE The release date of a product or product model. This can be used to distinguish the exact variant of a product. Nein
EAN SINGLE Indicates EAN of the product. Nein
ManufacturerNumber SINGLE Unique number that describes the manufacturer. Nein
ManufacturerId SINGLE Unique identity of the manufacturer. Nein
ManufacturerMediaId SINGLE Unique identity of the media. Nein
ManufacturerLink SINGLE URL of the manufacturer's portal. Nein
ManufacturerName SINGLE Name of the product manufacturer. Nein
ManufacturerDescription SINGLE A detailed description of product manufacturer. Nein
Width SINGLE The width of the product. Nein
Height SINGLE The height of the product. Nein
Length SINGLE The length of the product. Nein
Weight SINGLE The weight of the product. Nein
PurchaseUnit SINGLE Quantity of the item purchased. For example, 500ml, 2kg, etc. Nein
UnitId SINGLE Unique identity of the unit. Nein
UnitShortCode SINGLE Short name for unit, e.g., m, kg. Nein
UnitName SINGLE Full name of the unit, e.g., Meter, kilogram. Nein
PackUnit SINGLE Type of packing. For example, bottle, tin, crate, etc. Nein
ReferenceUnit SINGLE Price of purchased item calculated as per the reference unit. Say, you bought 500ml of milk and the price is calculated in reference to 1000ml. Nein
ProductId SINGLE Unique identity of the product. Nein
CustomFields MAP Nein
CategoryTreeIds MULTIPLEVALUE Nein
CategoryBreadcrumbs MULTIPLEVALUE Nein
CategoryNames MULTIPLEVALUE Nein
VisibilitySaleschannelIds MULTIPLEVALUE Nein
PropertyIds MULTIPLEVALUE Nein
PropertyNamesMap MAP Nein
OptionIds MULTIPLEVALUE Nein
OptionNamesMap MAP Nein
TagIds MULTIPLEVALUE Nein
TagNames MULTIPLEVALUE Nein
BlacklistIds MULTIPLEVALUE Nein
WhitelistIds MULTIPLEVALUE Nein
AdvancedPricesGross MAP Advanced pricing (gross) as map, e.g. ruleId1=11;ruleId2=13.20 Nein
AdvancedPricesNet MAP Advanced pricing (net) as map, e.g. ruleId1=11;ruleId2=13.20 Nein
AdvancedPricesListPriceGross MAP Advanced pricing (gross list price) as map, e.g. ruleId1=11;ruleId2=13.20 Nein
AdvancedPricesListPriceNet MAP Advanced pricing (net list price) as map, e.g. ruleId1=11;ruleId2=13.20 Nein
ConfiguratorSettingsIdOptionIdMap MAP Map of configurator settings ids and optionId (id1=optionId1;id2=optionId2,...). Nein
ConfiguratorSettingsOptionPriceGrossMap MAP Configurator settings (option id=price gross ) as map, e.g. option1=11.00;option2=13.20 Nein
ConfiguratorSettingsOptionPriceNetMap MAP Configurator settings (option id=price net ) as map, e.g. option1=11.00;option2=13.20 Nein
CreatedAt SINGLE Nein
UpdatedAt SINGLE Nein
VersionId SINGLE Unique identity of the product's version. Nein
ParentVersionId SINGLE Unique identity of the parent product's version. Nein