{"_id":"58a456549230160f009107e8","category":{"_id":"55dd9f4dab0e4d210045aaea","pages":["55dd9f4dab0e4d210045aaeb","55e96008ffba3323004216ea","55e96030e5d0c623003ed885","55e97a097f564237001d5b80","56795de3ade8221700923d2c","56797b1584397c0d00fe13ea"],"version":"55dd9f4dab0e4d210045aae9","__v":6,"project":"55dd9f2e0efd5821000d54d9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-26T11:12:47.544Z","from_sync":false,"order":0,"slug":"overview","title":"Overview"},"project":"55dd9f2e0efd5821000d54d9","__v":0,"version":{"_id":"55dd9f4dab0e4d210045aae9","__v":39,"project":"55dd9f2e0efd5821000d54d9","createdAt":"2015-08-26T11:13:17.024Z","releaseDate":"2015-08-26T11:13:17.024Z","categories":["55dd9f4dab0e4d210045aaea","55ddb5fa9067202b00ddff6f","55e0472c6bad670d0081f213","55e04764a44fae0d00214671","55e047a9a44fae0d00214672","55e047b258c5460d0076a9a7","55e95e337fc27b2d00d32cf2","55e979bda7ca823900ad549a","55edb8c18dcb210d0056900b","55f0365c8563861700a33765","55f03677d58f9b1900acf996","55f036938eeefc23001ea5de","55f036a38563861700a33767","55f036c08563861700a33769","55f036d02911b72100482cd7","55f036e92911b72100482cd9","55f036fa8563861700a3376b","55f0370ee507711900e58c69","55f0371df6101b1900c70700","55f0374f2911b72100482cdb","55f0375e2911b72100482cdc","560eb0f659cb8d0d0015cd52","560eb25239fad419002ae1e0","561fb64d4d67490d00804b2a","562b9f775a39cd0d009aff22","562ba0505a39cd0d009aff23","562ba149d56bc30d00f0cb18","562ba595f68a5f0d007b1f3b","562ba78fd56bc30d00f0cb1b","562ba8b95a39cd0d009aff27","562baadf6562140d001501d2","562bab37f68a5f0d007b1f3d","562bc1bf9ebc950d000f7523","562bc99ced4bea0d00c11dfa","562bd29c1b98640d00714520","562bd5875a39cd0d009aff60","562bdfabff2da50d002c0aaf","562be0bd5a39cd0d009aff75","57a0b476d8313e1900454439"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"parentDoc":null,"user":"55dd9841cafe7221002a4c62","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-02-15T13:23:32.109Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"dotmailer's EasyEditor features product blocks that can be dragged and dropped into campaigns, allowing ecommerce users to showcase, promote and sell their products. \n\nIn order for products to be available for selection in a product block, they need to be added to an account's AccountInsight in a collection named 'Catalog_Default'. \n\nIt's also compulsory to feature the following 5 keys for a product:\n\n  * **name** - the name of the product\n  * **sku** - the stock keeping unit of the product\n  * **price** - the price of the product\n  * **url** - the URL for the product in your online store; recipients will be taken here when clicking on the product\n  * **imagePath** - the path for the image of the product that will be used in the product block  \n\nIf the collection name 'Catalog_Default' isn't used and the 5 required keys aren't observed then products added in this way *won't *be available for selection in product blocks. \n\nProducts can be added to an account's AccountInsight using either of REST's:\n\n  * Add transactional data to contact\n  * Bulk add transactional data to contacts\n\nOr either of SOAP's:\n\n  * AddTransactionalData\n  * ImportTransactionalData\n\nHere's an example of what a product's structure could look like in JSON form (note that the contact identifier needs to be \"account\" to add the data to AccountInsight):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"key\\\": \\\"PR00001\\\",\\n  \\\"contactIdentifier\\\": \\\"account\\\",\\n  \\\"json\\\": \\\"{\\\\r\\\\n  \\\\\\\"name\\\\\\\": \\\\\\\"Plaid Cotton Shirt-Royal Blue-L\\\\\\\",\\\\r\\\\n  \\\\\\\"short_description\\\\\\\": \\\\\\\"This everyday shirt is equally stylish with jeans or trousers.\\\\\\\",\\\\r\\\\n  \\\\\\\"sku\\\\\\\": \\\\\\\"msj006c-Royal Blue-L\\\\\\\",\\\\r\\\\n  \\\\\\\"price\\\\\\\": 160,,\\\\r\\\\n  \\\\\\\"department\\\\\\\": \\\\\\\"menswear\\\\\\\"\\\\r\\\\n  \\\\\\\"url\\\\\\\": \\\\\\\"https://www.mywebsite.com/store/department/menswear/shirts/id=00001/plaid-cotton-shirt-royal-blue-l/\\\\\\\",\\\\r\\\\n  \\\\\\\"imagePath\\\\\\\": \\\\\\\"https://www.mywebsite.com/store/media/id=00001/plaid-cotton-shirt-royal-blue.jpg\\\\\\\",\\\\r\\\\n}\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Please be mindful about serving non-HTTPS product images in your campaign. Over recent years, webmail services such as Gmail and Outlook.com have defaulted to SSL when users log in. This means images served over HTTP represent a non-secure source and as such the email will cause a warning when viewed in recipient browsers. In which case, we advise serving only HTTPS images.\",\n  \"title\": \"A word of warning on non-HTTPS images\"\n}\n[/block]","excerpt":"","slug":"adding-products-to-your-accountinsight-for-use-in-easyeditor-product-blocks","type":"basic","title":"Adding products to your AccountInsight for use in EasyEditor product blocks"}

Adding products to your AccountInsight for use in EasyEditor product blocks


dotmailer's EasyEditor features product blocks that can be dragged and dropped into campaigns, allowing ecommerce users to showcase, promote and sell their products. In order for products to be available for selection in a product block, they need to be added to an account's AccountInsight in a collection named 'Catalog_Default'. It's also compulsory to feature the following 5 keys for a product: * **name** - the name of the product * **sku** - the stock keeping unit of the product * **price** - the price of the product * **url** - the URL for the product in your online store; recipients will be taken here when clicking on the product * **imagePath** - the path for the image of the product that will be used in the product block If the collection name 'Catalog_Default' isn't used and the 5 required keys aren't observed then products added in this way *won't *be available for selection in product blocks. Products can be added to an account's AccountInsight using either of REST's: * Add transactional data to contact * Bulk add transactional data to contacts Or either of SOAP's: * AddTransactionalData * ImportTransactionalData Here's an example of what a product's structure could look like in JSON form (note that the contact identifier needs to be "account" to add the data to AccountInsight): [block:code] { "codes": [ { "code": "{\n \"key\": \"PR00001\",\n \"contactIdentifier\": \"account\",\n \"json\": \"{\\r\\n \\\"name\\\": \\\"Plaid Cotton Shirt-Royal Blue-L\\\",\\r\\n \\\"short_description\\\": \\\"This everyday shirt is equally stylish with jeans or trousers.\\\",\\r\\n \\\"sku\\\": \\\"msj006c-Royal Blue-L\\\",\\r\\n \\\"price\\\": 160,,\\r\\n \\\"department\\\": \\\"menswear\\\"\\r\\n \\\"url\\\": \\\"https://www.mywebsite.com/store/department/menswear/shirts/id=00001/plaid-cotton-shirt-royal-blue-l/\\\",\\r\\n \\\"imagePath\\\": \\\"https://www.mywebsite.com/store/media/id=00001/plaid-cotton-shirt-royal-blue.jpg\\\",\\r\\n}\"\n}", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "body": "Please be mindful about serving non-HTTPS product images in your campaign. Over recent years, webmail services such as Gmail and Outlook.com have defaulted to SSL when users log in. This means images served over HTTP represent a non-secure source and as such the email will cause a warning when viewed in recipient browsers. In which case, we advise serving only HTTPS images.", "title": "A word of warning on non-HTTPS images" } [/block]