From f10c832050b2a5c7c00b79d82a3fff7b25cd7973 Mon Sep 17 00:00:00 2001 From: Prateek Srivastava <86006694+prateek-ct@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:55:17 +0200 Subject: [PATCH] Update README.md --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0030c5b..1c0a83a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# connect-search-ingestion-template -This repository provides a [connect](https://docs.commercetools.com/connect) template for a search ingestion connector for populating a Store-specific external search engine. This boilerplate code acts as a starting point for such integration. +# connect-product-ingestion-template +This repository provides a [connect](https://docs.commercetools.com/connect) template for a product ingestion connector for populating a external systems with product data from composable commerce. This boilerplate code acts as a starting point for such integration. -This template uses the [Store](https://docs.commercetools.com/api/projects/stores) and [Product Selection](https://docs.commercetools.com/api/projects/product-selections) data models from commercetools composable commerce which can be used for querying Store-specific product data to power Store-specific frontends. Template is based on asynchronous [Subscriptions](https://docs.commercetools.com/api/projects/subscriptions) to keep the search indices up to date. +This template uses the [Product type](https://docs.commercetools.com/api/projects/productTypes), [Product](https://docs.commercetools.com/api/projects/products), [Store](https://docs.commercetools.com/api/projects/stores), [Product Selection](https://docs.commercetools.com/api/projects/product-selections) data models from commercetools composable commerce which can be used for querying Store-specific product data to sync into external systems. Template is based on asynchronous [Subscriptions](https://docs.commercetools.com/api/projects/subscriptions) to keep the external systems up to date. ## Template Features - NodeJS supported. @@ -18,30 +18,30 @@ Users are expected to create API client responsible for fetching product, store #### 2. commercetools composable commerce Data setup Users are expected to create store and link product selection, accordingly linking products to corresponding product selection. The Store detail is taken as input as an environment variable / configuration for connect. Details of store can be provided as environment variables (configuration for connect) `CTP_STORE_KEY`. For details, please read [Deployment Configuration](./README.md#Deployment Configuration). -#### 3. external search index creation -Users are expected to create search index in external search engine . The index details are taken as input as an environment variable / configuration for connect. Details of search index can be provided as environment variables (configuration for connect) `SEARCH_PLATFORM_CONFIG`.For details, please read [Deployment Configuration](./README.md#Deployment Configuration). +#### 3. external system +Users are expected to create api clients/ keys in external system . Those details are taken as input as an environment variable / configuration for connect. Details of external system can be provided as environment variables (configuration for connect) `SEARCH_PLATFORM_CONFIG`.For details, please read [Deployment Configuration](./README.md#Deployment Configuration). ## Getting started The template contains two separated modules : -- Full Ingestion : Provides a REST-API to users to export all products from specific store of a commercetools project to external search index as initial load or for full reindexing whenever needed. -- Incremental Updater : Receives message from commercetools project once there are product changes in commercetools store. The modified products are then synchronized to the existing external search index. +- Full Ingestion : Provides a REST-API to users to export all products from specific store of a commercetools project to external system as initial load or for full reindexing whenever needed. +- Incremental Updater : Receives message from commercetools project once there are product changes in commercetools store. The modified products are then synchronized to the external system. Regarding the development of both modules, please refer to the following documetations: - Development of Full Ingestion - Development of Incremental Updater -#### 1. Develop your search-specific needs -To import the [commercetools composable commerce Product Projections](https://docs.commercetools.com/api/projects/productProjections) to external search index, users need to extend this connector with the following tasks -- Data Mapping: Implementaion to transform the product projection objects from commercetools structure to users-desired structure for the search index. -- Data Persistence: Implementation to save/remove product data to the specific search index using libraries provided by external search product. Please remember that the product data might not be saved into the external search index in a single attempt, it should have needed retry and recovery mechanism. +#### 1. Develop your specific needs +To import the [commercetools composable commerce Product Projections](https://docs.commercetools.com/api/projects/productProjections) to external system, users need to extend this connector with the following tasks +- Data Mapping: Implementaion to transform the product projection objects from commercetools structure to users-desired structure for external system. +- Data Persistence: Implementation to save/remove product data to the external system using libraries provided by external systems. Please remember that the product data might not be saved into the external system in a single attempt, it should have needed retry and recovery mechanism. #### 2. Register as connector in commercetools Connect Follow guidelines [here](https://docs.commercetools.com/connect/getting-started) to register the connector for public/private use. ## Deployment Configuration -In order to deploy your customized search connector application on commercetools Connect, it needs to be published. For details, please refer to [documentation about commercetools Connect](https://docs.commercetools.com/connect/concepts) +In order to deploy your customized connector application on commercetools Connect, it needs to be published. For details, please refer to [documentation about commercetools Connect](https://docs.commercetools.com/connect/concepts) In addition, in order to support connect, the search connector template has a folder structure as listed below ``` ├── full-ingestion @@ -76,7 +76,7 @@ deployAs: - key: CTP_REGION description: Region of commercetools project - key: SEARCH_PLATFORM_CONFIG - description: Escaped JSON object including credentails to search platform and other settings + description: Escaped JSON object including credentails to external platform and other settings - name: incremental-updater applicationType: event endpoint: /deltaSync @@ -98,7 +98,7 @@ deployAs: - key: CTP_REGION description: Region of commercetools project - key: SEARCH_PLATFORM_CONFIG - description: Escaped JSON object including credentails to search platform and other settings + description: Escaped JSON object including credentails to external platform and other settings ``` Here you can see the details about various variables in configuration @@ -107,7 +107,7 @@ Here you can see the details about various variables in configuration - CTP_CLIENT_SECRET: The client secret of commercetools user account. It is used in commercetools client to communicate with commercetools platform via SDK. - CTP_SCOPE: The scope constrains the endpoints to which the commercetools client has access, as well as the read/write access right to an endpoint. - CTP_REGION: As the commercetools APIs are provided in six different region, it defines the region which your commercetools user account belongs to. -- SEARCH_PLATFORM_CONFIG: It defines the configurations required by the external search index, such as credentials, search index unique identifier, etc. +- SEARCH_PLATFORM_CONFIG: It defines the configurations required by the external system, such as credentials, search index unique identifier, etc. Following is a sample JSON object of this variable. ```