Custom Commerce Adapter Developer Manual / Version 2201
Table Of ContentsIn order to use the custom adapter service with the CoreMedia system. A minimum set of configuration and setup is needed.
Configuring the adapter service Endpoint
To enable the generic client to connect to a custom
adapter service
an endpoint for that service has to be added on the client side.
This is done as described on
gRPC Spring Boot Starter Client Configuration
.
Use the prefix grpc.client.GLOBAL
for properties that apply to all services. The
specific configurations are done using the prefix grpc.client.<endpointName>
where endpointName
is an ops-friendly string of your choice, such as
fooService
.
It is sufficient to configure fooService
as the endpointName
property
inside the site's commerce
settings struct if
grpc.client.fooService.address
is configured.
If the address is not configured on the Spring level, the endpoint
value is taken as
address to connect to.
Please refer to the Javadoc of the methods com.coremedia.blueprint.base.livecontext.client.settings.CommerceSettings#getEndpoint() and com.coremedia.blueprint.base.livecontext.client.settings.CommerceSettings#getEndpointName()
The Vendor Name
To integrate an adapter service with the CoreMedia system, a vendor name for the commerce system has to be configured
via metadata.vendor
in the adapter service. This name is used as a prefix for all commerce IDs by the coreMedia system
and should therefore never be changed.
The Commerce Settings
The CoreMedia Commerce Hub generic client expects a commerce system to have at least one catalog and a root category. If this is the case, no further configuration is needed to set up the commerce connection. If the commerce system provides multiple catalogs or stores, both may be configured via the site's commerce settings document.
Caution
The commerce connection is an instance of the GenericCommerceConnection managed by the generic client. It is valid only if the generic client is able to create an instance of the GenericStoreContext while communicating with the custom adapter service.
After the commerce connection for the adapter service is set up correctly, the catalog along with its categories and products can be displayed in the CoreMedia Studio library.
Note
If the CAE is used for augmenting the commerce storefront the
LinkRepository
needs to be implemented.