Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Adobe Sites x CIF | integration with 3d party commerce solution - category issues

Avatar

Adobe Champion

Dear all,

 

We are trying to integrate AEM with a third-party commerce system (SAP CC). We have set up our adobe.io runtime functions to cater for the integration based on CIF documentation. However, we are facing (so far) the following challenges:

 

  1. Root category: It seems the author UI as well as CIF core components  expect the commerce catalog to have a single, "root category". Our catalog currently has multiple "top level" categories, not a single root one. Is there a way arounds this without having to adjust our commerce catalog structure (i.e. providing a single, root category at the top of our catalog)?
  2. Category ID: According to GraphQL query documentation , the queries expect an Integer as a category ID value. However in our commerce solution we have alphanumerics as category IDs. Has anyone else faced this issue and if yes, what would be an efficient workaround?

 

I understand for the above issues, a way to tackle them would be to customize both Author UI and Core components sightly as well as Java code, but obviously this is something we'd like to avoid

 

Thank you in advance for your support! 

3 Replies

Avatar

Level 4

My quick thoughts:

  1. One way to work around this issue without modifying the commerce catalog structure would be to create a virtual root category in the AEM author UI and CIF core components that acts as a container for the multiple top-level categories in your commerce catalog. This would allow you to present the catalog to AEM and CIF as a single, unified hierarchy, while still maintaining the existing structure of your commerce catalog.
  2. Regarding the category ID issue, it is possible to use alphanumeric category IDs in AEM and CIF, but you will need to modify the GraphQL queries to accept these values. In particular, you will need to modify the queries to use a string type instead of an integer type for the category ID values. This will allow you to use alphanumeric category IDs in the queries, as long as they are properly formatted and escaped.

Avatar

Adobe Champion

Hi @Monendra_Singh  ,

 

Thank you for your reply.  Can you be a bit more specific on where to look into for the adjustments mentioned? In particular:

 

1. Where would we create the "virtual" category? Would that require adjustments in the AEM Author UI (something we would rather avoid)?

 

2. Modifying the graphQL queries would also require adjusting the accompanying magento schema, correct? If that is the case, wouldn't this affect the Author UI too (as it assumes the "original" magento schema for its purposes)?

Avatar

Adobe Champion

Hi @Monendra_Singh  ,

 

as a follow up for point 2:

 

We modified the schema + response on adobe.io side and tried to see if that works with the CIF Author features. Unfortunately, as expected, AEM indeed expects an integer value and cannot recognize the String-based one:

 

com.google.gson.JsonParseException: com.shopify.graphql.support.SchemaViolationError: Invalid value "Cartegory ABC" for field CategoryTree.id