Skip to main content
Grupo destacado

* B2C Commerce *

Welcome! This group is dedicated to your success with Salesforce B2C Commerce. Join the conversation here to stay up to date on the product, learn best practices, and everything in between. Use this group to review resources, ask questions, help each other, and share experiences. --------------------------------------- This group is maintained and moderated by Salesforce employees. The content received in this group falls under the official Forward-Looking Statement: http://investor.salesforce.com/about-us/investor/forward-looking-statements/default.aspx

🤖 Build real expertise for the Agentic AI era. 

 

Trailhead Journeys are now available across 10 Salesforce products empowering you to move from fundamentals to advanced expertise with a progressive, step-by-step curriculum. 

 

Newly added journeys:

 

Skip the search. Start the journey 👉 trailhead.com/trailhead-journeys

 

🤖 Build real expertise for the Agentic AI era.

 

 

12 comentarios
0/9000

Greetings all and thank you for your attention

 

I'm new in salesforce Commerce Cloud B2C and I realized that I can only apply the debugger in the server side js files. When I tried to start the debugger in the client side js files it appears an error.

Can you tell me please with what tool I can start the debugger in a cliente side js file? Or an alternative

1 respuesta
  1. 14 jul 2021, 19:44

    You can only debug your storefront Javascript in the console of your browser, unfortunately. I have not found a way yet to hook in VS Code or any other IDE for that matter.

     

    (Secretly hoping someone has found a way and wants to reply ;-) )

0/9000

Hello Team, has anyone in the group integrated WordPress with SF ? I need to insert a webToLead form in a WordPress site. Is it possible without using plugins?  Thx!

3 respuestas
0/9000

Hello! Is it possible to create a sorting rule that orders products from highest to lowest price based on the discounted prices, as it currently only takes the base price? Or are there ways to create custom sorting rules with such criteria?

2 respuestas
  1. 13 sept 2023, 15:17

    Hi @Mayra Janeth Gómez, in B2C Commerce you can include the price attribute as a standard attribute in your custom sorting rules (https://help.salesforce.com/s/articleView?id=cc.b2c_creating_sorting_rules.htm&type=5). The price attribute uses the information stored in your price books. So you could use a standard/base price book and a sales/promotional price book depending on how you create and structure your price books. Please note that promotional prices as a result of the promotion engine are not reflected in the sorting rules. Promotional prices based on our promotion engine are highly dynamic and are not considered in search to avoid performance impact.

0/9000

In ConsentTracking controller, we have a server.post(SetConsent) route with couple of middleware steps. When I try to debug using Browser's Developer tools->Network tab, I see that for ConsentTracking-SetConsent call the request method is GET. According to code, it checks if the request is post. But as the request is GET we are getting the params do not match route error. As a result, I am getting tracking consent popup on every page. I am not at all modifying this Controller in my custom cartridge. I don't understand why the http method is changed to GET. 

Is the POST request getting overridden by GET request due to any previous calls?

Can anyone please suggest why is this happening?

 

(Note - This error popped up when I was trying to upgrade SFRA version from 6.0.0 to 6.2.0) 

5 respuestas
  1. 29 jul, 6:34

    @Giovanni Marchetto

     

    I don’t think a previous call is changing the POST to GET. This usually happens when the frontend code and controller route are not from the same SFRA version.

    Since this started after upgrading from SFRA 6.0.0 to 6.2.0, I’d compare all ConsentTracking-related files, not just the controller.

    Check these:

    1. Search your cartridges for ConsentTracking-SetConsent, ConsentTracking-SetSession, and SetConsent.
    2. See if your custom cartridge is overriding ConsentTracking.js or any consent popup JS/ISML.
    3. Compare those files with the SFRA 6.2.0 version.
    4. Clear cache and redeploy static assets.

    Most likely, the browser is calling the newer GET-based consent endpoint, but your controller/custom override is still expecting POST. So it looks like a version mismatch rather than the method being overridden. 

0/9000

I have created an API Client under Account Manager

In Business Manager for my user under  Manage Access Keys I created "Agent User Login and OCAPI"

 

When I test making a call to https://[sandbox domain]/dw/oauth2/access_token?client_id={API Client ID}

with header info:

 

basic_auth_token = b64encode(

            bytes(f"{business_manager_username}:{business_manager_password}:{api_client_password}",

                  "utf-8")

        ).decode("ascii")

headers = {}

 

authorization = f"Basic {basic_auth_token}"

 

headers["Authorization"] = authorization

headers["Content-type"] = "application/x-www-form-urlencoded"

headers["Cache-Control"] = "no-cache" 

 

and

data = {

"grant_type": "urn:demandware:params:oauth:grant-type:client-id:dwsid:dwsecuretoken"

}

 

I keep getting HTTP 400 with error message:

"Client id 'client id' has invalid credentials to use grant type 'urn:demandware:params:oauth:grant-type:client-id:dwsid:dwsecuretoken'."

 

anyone can pinpoint what I am doing wrong?

@* B2C Commerce * 

2 respuestas
  1. 23 jul, 15:08

    Hello , were you able to solve this issue ?

0/9000

We're building out Headless 360 learning on Trailhead and want your input. 💙  

 

We're running a short survey to understand what you want to learn, how you like to learn, and which use cases matter most to your work. 

 

👉 Take the Headless 360 survey now through July 28.

 

Thank you for taking the time to provide this valuable feedback! 🙌  

We're building out Headless 360 learning on Trailhead and want your input.

Hii Salesforce Community,. 

 

1. I need a complete, step-by-step guide for integrating Salesforce Payments with Salesforce Order Management (OMS). 

 

Please explain the entire implementation process, including: 

 

  • How to configure and integrate Salesforce Payments with Salesforce OMS from scratch.
  • The prerequisites, required licenses, and Salesforce features that must be enabled.
  • How to connect Salesforce Payments to OMS, including the objects, settings, and relationships involved.
  • The complete payment lifecycle, including Authorization, Capture, Void, and Refund.
  • How payment transactions are associated with Orders and Fulfillment Orders in OMS.
  • Whether payment capture is handled automatically by Salesforce OMS when an order is fulfilled, or whether custom automation (such as Flows, Apex, Platform Events, or APIs) is required.
  • The standard APIs, payment gateway adapters, and integration points involved in the process.
  • A complete end-to-end implementation example, from checkout through order creation, fulfillment, payment capture, cancellation, and refund.
  • Salesforce best practices, common implementation challenges, and recommended architecture for a production environment.

 

2. How does payment capture work in Salesforce Order Management (OMS) when an order reaches the Fulfilled status? 

 

  • I would like a complete, step-by-step explanation of the end-to-end payment capture process, including:

 

  • Whether Salesforce OMS automatically captures an authorized payment when an order is fulfilled, or if custom automation is required.

 

  • The complete implementation flow from payment authorization through order fulfillment to payment capture.

 

  • Which standard Salesforce OMS components, payment gateway integrations, and APIs are involved in the capture process.

 

  • If automation is required, please explain how to implement it using Flows, Apex, Platform Events, or other recommended approaches.

 

  • Include a practical example with the order lifecycle, payment transaction states, and best practices for production implementations.

 

@* Commerce Salesforce Order Management *@* Salesforce Commerce for B2B & D2C *@* B2C Commerce *

3 respuestas
  1. 16 jul, 10:41

    Hi @Robert Musk

    Salesforce Payments is available for sandbox environment or Salesforce payments only available in product environmen only, but how to test the salesforce payments in sanbox regarding payment capture, refunding , payment failures? can we able to cpature the authorized payment in stripe test account  

     

    do you have any documentation about configuring and setuping the salesforce payment for stripe in sandbox ? 

     

0/9000

We have a Server Side campaign in Personalization Studio that uses an "In Cart" anchor type.  We cannot figure out how to send over a payload that will call the campaign and get it to use the products we send with it.  We don't know how those products are supposed to be structured in the payload and the type of interaction/item to send them as.  We've tried a bunch of AI items and none of them have worked, the same with everything we can find in the documentation ourselves and so far support can't provide it.  Anyone know how to do it?   

@* B2C Commerce * 

4 respuestas
  1. 2 nov 2025, 18:09

    Hi, 

    You can trigger an

    “In Cart”

    server-side campaign using the standard Event API structure — no special sandbox needed. 

    Send a payload like this to your dataset’s Event API endpoint:

    {

    "source": { "channel": "Server", "pageType": "Cart" },

    "user": { "id": "USER-123" },

    "itemAction": "ViewCart",

    "cart": {

    "complete": [

    { "itemId": "SKU-001", "quantity": 2, "price": 19.99 },

    { "itemId": "SKU-002", "quantity": 1, "price": 12.50 }

    ]

    }

    }

    Key points:

    • Use "itemAction": "ViewCart" to activate the In Cart anchor.
    • cart.complete should list products with itemId, quantity, and price.
    • Make sure your itemId matches catalog IDs in Personalization Studio.
    • Include "source": { "channel": "Server" } so server-side campaigns return messages in the response.

    Reference: Event API | Marketing Cloud Personalization | Salesforce Developers

0/9000

  We’re currently migrating from an Unlimited org to an Enterprise org. In our Unlimited org, we used both CPQ and Commerce Cloud, but in the Enterprise org, we’re replacing CPQ with RLM. However, we’re running into an issue where product prices aren’t being fetched in the Commerce Cloud store when using ProductSellingModel. In the Unlimited org, since ProductSellingModel wasn’t present, prices were fetched correctly. As a test, we created a product without ProductSellingModel in the Enterprise org, and the prices were fetched successfully.    Has anyone else encountered this issue or found a workaround that allows you to keep ProductSellingModel and still display prices? For reference, we’re using the standard Connect API Commerce Cloud methods to fetch the data.

  @* Salesforce Revenue Cloud * @* B2C Commerce * 

3 respuestas
  1. 8 jul, 5:59

    Make sure that  

    • Price Book Effective Dates are invalid (Most common) Valid From ≤ Today and Valid To ≥ Today (or blank) 
    •  Missing or inactive Price Book Entry 
    •  Missing Standard Price Book Entry 
    •  Buyer Account not correctly assigned to Buyer Group 
    •  Currency mismatch 
    •  Product not included in the Price Entitlement 
    •  Inactive Product or Price Book
    •  Missing or inactive Price Book Entry 
    •  Missing Standard Price Book Entry 
    •  Buyer Account not correctly assigned to Buyer Group 
    •  Currency mismatch 
    •  Product not included in the Price Entitlement 
    •  Inactive Product or Price Book 
    •  Store cache/search index not refreshed

     

    In my case the issue was with pricebook

    effective dates i.e. valid from < today and valid To should be > today. I have fixed the issue by adjusting dates.

     

     

     

     

0/9000