cancel
Showing results for 
Search instead for 
Did you mean: 

ASM Functionality implementation in 2211 using OCC calls

former_member856730
Discoverer
0 Kudos

Hi Team,
I want to implement ASM functionality in 2211 hybris commerce version with OCC calls ,suggest for steps

Accepted Solutions (0)

Answers (2)

Answers (2)

safin
Advisor
Advisor

Hi Sridhar,

Basically, you can follow these steps

  1. first create an extension based on yocc template, please remember the extension name must end with occ, such as xyzocc
  2. add this new created extension into config\localextensions.xml
  3. Based on the functionalities you want to expose by OCC, develop related controller class with the appropriate methods. In the implementation of controller, delegate to specific facades (such as AssistedServiceFacade) to finish its business logic. A Controller should be created in the /src directory,

A simple example is as follows:

@Controller 
@RequestMapping(value = "/{baseSiteId}/asm") 
public class ASMController 
{
    ...

    @Secured(
	{ "ROLE_CUSTOMERMANAGERGROUP" })
	@RequestMapping(value = "/carts/{userId}/", method = RequestMethod.POST)
	@ResponseStatus(HttpStatus.OK)
	public CartWsDTO bindCustomerToCart(@PathVariable(value = "userId")
	final String customerId)
	{
		assistedServiceFacade.bindCustomerToCart(customerId);
	}

	...
} 

For the concrete information about OCC, you can refer to https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/3476714bba0b4cb9b3eb58c270e44439/8ef2d8d7b...

Hopefully, it can help you a little.

Thanks

adamreisberg
Active Participant
0 Kudos

Yes, it is possible, but you'll need to mix-and-match various components, some being webservices and some being OCC web services.

Starting Point

Look at assistedservicewebservices Extension | SAP Help Portal as a starting off point. This includes web services that are useful for integrating with OCC.

OCC Web Services

The OCC web services allow you to pass in a customer ID to act on behalf of the user. This is built into the OCC V2 framework.

Reference Architectures

Look at existing front-end clients (Spartacus for example) as a good reference point on consuming and utilizing Assisted Service Module APIs

former_member856730
Discoverer
0 Kudos

Hi adamreisberg ,

thank you very much for the response with suggestions, i have gone trough these already but i dont find API to emulate the customer session using asagent as inn 2211 asmstrorefront is deprecated, so in facade layer i found one method in "DefaultAssistedServiceFacade" to emulate , this is using in previous hybris versions storefront, but is that only we can use to write one new OCC controller to and to call this facade or do we have any endpoint to emulate customer session.

so please help me on the same

adamreisberg
Active Participant
0 Kudos

sridhar1490 look at assistedservicewebservices Extension | SAP Help Portal. This is not OCC APIs, but it does provide web services (similar to CMS web services) that should enable that functionality.