New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Exam - Topic 1 Question 89 Discussion

Actual exam question for Salesforce's Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) exam
Question #: 89
Topic #: 1
[All Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) 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:

0/2000 characters
Aileen
2 months ago
I agree, B is best practice for this scenario!
upvoted 0 times
...
Rebbecca
2 months ago
I think C is a solid option too, but B feels more reliable.
upvoted 0 times
...
Dolores
3 months ago
Wait, using a client-side cookie? That sounds risky!
upvoted 0 times
...
Malinda
3 months ago
Custom Object? Nah, that won't scale well.
upvoted 0 times
...
Lashanda
3 months ago
B is definitely the way to go for maintaining state.
upvoted 0 times
...
Timmy
3 months ago
I vaguely recall that non-replicable Custom Objects are not ideal for maintaining state across calls. It seems like they might not be scalable.
upvoted 0 times
...
Marla
4 months ago
I think the SFRA controller could be a good choice since it handles state automatically, but I’m not clear on how it compares to the Session class.
upvoted 0 times
...
Brittney
4 months ago
I'm not entirely sure, but I feel like using a client-side cookie could lead to security issues, especially with sensitive information like authentication status.
upvoted 0 times
...
Myra
4 months ago
I remember we discussed session management in our last class, and I think using the Session class in the B2C Commerce API might be the best option here.
upvoted 0 times
...
Lenna
4 months ago
The SFRA controller option sounds interesting, but I'm not sure if that's the most scalable solution. I'll need to do some research on the different techniques and their pros and cons.
upvoted 0 times
...
Nana
4 months ago
I'm a bit confused on this one. I'm not sure if using a custom object or a client-side cookie would be the right approach. I'll need to review the best practices for state management.
upvoted 0 times
...
Hoa
5 months ago
Okay, I think I know the answer here. The Session class in the B2C Commerce API seems like the best way to maintain state efficiently and securely.
upvoted 0 times
...
Bettye
5 months ago
Hmm, this seems like a tricky one. I'll need to think through the different options carefully.
upvoted 0 times
...
Felice
10 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
9 months ago
Using a client-side cookie might not be as secure as using the Session class.
upvoted 0 times
...
Enola
9 months ago
Plus, it helps with managing privacy attributes like tracking consent.
upvoted 0 times
...
Elly
10 months ago
It's great for keeping track of the current customer and their authentication status.
upvoted 0 times
...
Felice
10 months ago
I agree, the Session class is definitely the way to go for maintaining state.
upvoted 0 times
...
...
Hermila
10 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
10 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
10 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
9 months ago
B) Use the Session class in the B2C Commerce api.
upvoted 0 times
...
Coral
9 months ago
A) Use a non-replicable Custom Object to store the information temporarily temporarily.
upvoted 0 times
...
...
Destiny
11 months ago
But wouldn't using a client-side cookie be easier to implement and maintain?
upvoted 0 times
...
Pamella
11 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
11 months ago
I disagree, I believe using an SFRA controller would be more efficient and scalable.
upvoted 0 times
...
Destiny
11 months ago
I think the best option is to use the Session class in the B2C Commerce api.
upvoted 0 times
...

Save Cancel