Essential Knowledge
commercetools Connector Extend Customization
Essential knowledgeA Fluent Connector project typically has the structure as defined below :
com.fluentcommerce.connect.custom
Any customizations/extensions can either be done under the custom folder or as a separate module (jar) altogether.
Regardless of which way one chooses to extend it, the key message here is that any custom code should be under the `com.fluentcommerce.connect` package. This is due to how the FluentConnectorApplication is wired to work with Spring, and in its current form, Spring will only scan for components under `com.fluentcommerce.connect`.
During the server start-up, the commercetools-connector will load all handlers found in the spring context and bind them to the correct service they belong to. As part of this binding process, the commercetools-connector also determines which handler has precedence over others of the same name. In other words, it is possible to override existing handlers by assigning a higher priority to the custom handler. By default, all handlers will have a priority of zero, and the commercetools-connector understands the highest priority as the higher number. For example, priority = 100 takes precedence over priority = 1.`@HandlerInfo(name = "CustomCategoryUpsert", priority = 100)`Configure a Data Source for your Page
Essential knowledgeIn order to show data in the Storage Areas List, we need to configure a data source.Components on a page can reference a data source from a query defined on the Page Component.First, we'll configure a page query, to retrieve the currently active Location's associated Storage Areas.The `data` object on the Page Route takes a `query` and a `variables` object for defining a GraphQL Query.`"data": {``"query": "query locationStorageAreas ($locationRef: String!) { location (ref: $locationRef) { id ref storageAreas { edges { node { id name status type } } } } }",``"variables": {``"locationRef": "{{activeLocation.ref}}"``}``}`You'll notice the use of a special variable called `{{activeLocation.ref}}` above. Since this Web App Context is "location", you can access the currently active context using the `activeLocation` object. This provides access to the Location Id, Ref, and Primary Address.Once the Page query is defined, go to the Component configuration, and add a `dataSource` field. The `dataSource` for the list should be set to the `storageAreas` connection on the `location` query path: `location.storageAreas` `"dataSource": "location.storageAreas"`With the data source configured, all that's left is to update the fields to be displayed in the list with dynamic values. We'll display the Name, Type, and Status from the Storage Area.This is done by specifying the field of each node in the Storage Areas connection: `{{node.name}}` `"attributes": [``{``"label": "Name",`
`"value": "{{node.name}}"``},``{``"label": "Type",`
`"value": "{{node.type}}"``},``{``"label": "Status",`
`"value": "{{node.status}}"``}``]`See this in action in the video below...Note: This video does not have audio.Sourcing Profiles Interface
Essential knowledgeThe Sourcing Profiles functionality in the Fluent OMS Admin interface enables retailers to configure, manage, and optimize sourcing rules. Profiles group strategies with defined priorities, catalogs, and networks, while strategies use flexible conditions (IF) and criteria (THEN) to refine fulfillment logic. New profiles are created via API, while profile versions can be generated either through the Admin UI or API. The UI provides capabilities to view, edit, reorder, activate, and track versions.Multi-factor authentication (MFA)
Essential knowledgeMulti-factor authentication (MFA) is used to ensure that digital users provide at least two pieces of evidence to prove their identity. Each piece of evidence must come from a different category, something they know, have, or something they are.Traditionally, authentication mechanisms or factors have been categorized as belonging to one of three groups:- Something you know (for example, a password or a PIN).
- Something you have (for example, a mobile phone or a token).
- Something you are (for example, a fingerprint or other biometric data).
In best practice, though, MFA goes beyond 2FA by requiring a user to authenticate via two or more authentication factors from different categories (e.g., a “something you know” combined with a “something you have”). The goal of having two or more authentication factors from different categories is to reduce the likelihood of an impostor gaining access.