Author:
Fluent Commerce
Changed on:
31 Jan 2024
commercetools Connector Project Configuration
The resource folder of the project contains all build time configurations for the commercetools connector.
It is possible to have dedicated configuration files for each environment. This is often used to override a common setting for a particular environment. To create such a file, follow SpringBoot's format having the additional desired spring profile name at the end of the application.yml file, for example, application-dev.yml. More on [Fluent Account Listener Configuration][1].
Property | Description |
connector-name | This is the name of the connector and this property is used to both name the connector as well as build the path of other configuration keys. Keep characters limited to 'a-z' and '-'. |
route-mapping | Routes mappings are used to determine a route for an incoming message. |
routes | Allows new routes to be defined or override existing route configuration. |
listeners | All active listeners for the connector |
credential.credential-manager | Sets the credential manager. When using AWS, keep the value as "aws-secrets-manager" |
job-scheduler.job-scheduler-type | Sets the scheduler manager. Currently, the only possible value is "message-queue" |
When different kinds of messages (e.g. orders, categories, products, etc…) are received by the connector, it needs to be told how to map each kind to a handler. A handler has a single purpose for example to process orders. The snippet below illustrates a configuration that tells the connector to react to commercetools inbound messages that have the resource type
`“order”`
`“ResourceCreated“`
1 - route: "commercetools.connect.order.create"
2 props:
3 name: "order"
4 inclusion-filter:
5 - "ResourceCreated"
Language: yaml
Name: application-connector.yml
Description:
[Warning: empty required content area]The next step in processing a message is to determine which Fluent retailer this message is for. This is done by taking the project-key from the commercetools message and doing a lookup at the connector Fluent account mapping setting. For more information on how to configure this setting, follow this guide.
Handlers by default have a predefined route and properties set but it is possible to override them through the configuration files. The example below will show how to override an existing route. To view all available handlers and routes, check Connector Features
1{
2 "route": "batch-inventory-sync",
3 "handler": "InventorySyncJob",
4 "priority": 0,
5 "rops": {
6 "page-size": "500"
7 },
8 "className": "com.fluentcommerce.connect.client.commercetools.handler.job.InventorySyncJobHandler",
9 "description": "Sync inventory details from Fluent to commerceTools"
10}
Language: json
Name: A default route below as an example
Description:
[Warning: empty required content area]It is possible to modify its behaviour by specifying a different property value. Note that if the route name is different from the original one, a new route is created and the original is still valid.
1 routes:
2 job:
3 route: "batch-inventory-sync"
4 handlerName: "InventorySyncJob"
5 props:
6 page-size: "1000"
Language: json
Name: application-connector.yml
Description:
[Warning: empty required content area]The format of this configuration block is as follows:
1 routes:
2 #possible values: job, message or notification
3 job:
4 route: "<route-name>"
5 handlerName: "<handler-name>"
6 props:
7 #this flexible. Consider this is a map of String: String/int/double/long
8 page-size: "1000"
Language: yaml
Name: application-connector.yml
Description:
[Warning: empty required content area]There are 4 listeners in this connector
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.