1

Are Business Manager and Job contexts mean the same in SFCC?

I would like to perform OCAPI requests during a job execution. So, I am exploring the OCAPI setup. Here is the documentation excerpt:

Use the Shop API in the context of a Business Manager user to interact with the system as an agent on behalf of a shop customer, for example, to access customer-specific data or to create and submit a basket. Authenticate the user by obtaining an OAuth token for a Business Manager user to be passed in each request. The system checks both the Open Commerce API Settings and the required Business Manager permissions before allowing the request.

So, my question is: Does the above excerpt apply to the Job context?

Thank you.

1

Business Manager User context means that in the session there is a Business Manager User logged in.

You can perform OCAPI requests from a job, but they would be executed in their own context. You would have one thread of the application server that handles the job, and another thread that handles the OCAPI requests. These two will have separate contexts.

In order to get Business Manager user context, see "Obtain a Business Manager user grant" section from https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/OCAPI/19.3/usage/OAuth.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.