Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam B2C Commerce Developer Topic 1 Question 89 Discussion

Actual exam question for Salesforce's B2C Commerce Developer exam
Question #: 89
Topic #: 1
[All B2C Commerce Developer Questions]

A developer is writing a server side script that needs to maintain state across calls. The persistent

information needed includes these items.

* The current customer

* Whether or not the customer is authenticated

* The privacy attributes (such as tracking consent or cookie policy)

Which technique should the developer use to maintain state in an efficient and scalable manner that

follows best practice?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Felice
2 months ago
Option B all the way! The Session class is like a superhero for state management. It's not only efficient, but it also keeps your code clean and secure.
upvoted 0 times
Ronnie
5 days ago
Using a client-side cookie might not be as secure as using the Session class.
upvoted 0 times
...
Enola
13 days ago
Plus, it helps with managing privacy attributes like tracking consent.
upvoted 0 times
...
Elly
1 months ago
It's great for keeping track of the current customer and their authentication status.
upvoted 0 times
...
Felice
1 months ago
I agree, the Session class is definitely the way to go for maintaining state.
upvoted 0 times
...
...
Hermila
2 months ago
I'm a bit skeptical of using a Custom Object. Seems like a lot of overhead for a simple state management task. Let's stick to the standard API tools.
upvoted 0 times
...
German
2 months ago
C seems like a good option. SFRA controllers automatically maintain state, so it's a hassle-free solution. Plus, it's server-side, so it's more secure than client-side cookies.
upvoted 0 times
...
Solange
2 months ago
D is the simplest solution, but I'm not sure it's the most efficient or secure. Cookies can be tampered with, and storing sensitive information like authentication status in them isn't ideal.
upvoted 0 times
Kathryn
23 days ago
B) Use the Session class in the B2C Commerce api.
upvoted 0 times
...
Coral
24 days ago
A) Use a non-replicable Custom Object to store the information temporarily temporarily.
upvoted 0 times
...
...
Destiny
2 months ago
But wouldn't using a client-side cookie be easier to implement and maintain?
upvoted 0 times
...
Pamella
2 months ago
I think option B is the way to go. The Session class in the B2C Commerce API is designed for this exact use case. It's scalable and follows best practices.
upvoted 0 times
...
Barbra
2 months ago
I disagree, I believe using an SFRA controller would be more efficient and scalable.
upvoted 0 times
...
Destiny
2 months ago
I think the best option is to use the Session class in the B2C Commerce api.
upvoted 0 times
...

Save Cancel