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 Accredited B2B Commerce Developer Professional (AP-202) Exam - Topic 1 Question 90 Discussion

Posted by Izetta on Apr 02, 2026 at 06:26 AM

When a user buys 10 units of product B, the user wants 1 unit of Product A to be

automatically added to the cart. How can this requirement be fulfilled?

Get Premium Salesforce Accredited B2B Commerce Developer Professional (AP-202) Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
12 comments · newest first
FR
Francine 3 months ago
Option C seems right. It processes before adding to the cart.
LU
Luke 3 months ago
I prefer option D. It directly relates to adding items.
LA
Lavera 3 months ago
I think option B is the best choice. It prepares the cart before saving.
PA
Paz 4 months ago
Why would you need to add A only when buying 10 of B? Seems odd.
LE
Lezlie 4 months ago
I agree with B, makes the most sense for saving the cart.
RO
Rosio 4 months ago
Wait, can we really override those methods? Sounds tricky!
JO
Josphine 5 months ago
Nah, I’m pretty sure it’s D.
AA
Aaron 6 months ago
I think option B is the right choice.
CL
Clemencia 6 months ago
I’m leaning towards the preprocess method, but I can't recall exactly how it fits into the cart logic.
BA
Barrett 7 months ago
I feel like the AllowCheckout method wouldn't be the right choice here since it’s more about the checkout process, not adding items.
CR
Cristal 7 months ago
I remember practicing a similar question where we had to modify cart behavior, and I think the prepareForSave method was involved.
GR
Graciela 7 months ago
I think we might need to override the prepareToAdd method since it deals with adding items to the cart, but I'm not entirely sure.
0/2000 characters

Save Cancel