Loading
Salesforce B2B Commerce
목차
필터 선택

          결과 없음
          결과 없음
          몇 가지 검색 팁

          키워드의 맞춤법을 확인하십시오.
          더 일반적인 검색 용어를 사용하십시오.
          필터 수를 줄여 검색 범위를 확장하십시오.

          전체 Salesforce 도움말 검색
          Create a Shareable URL for Your Store

          Create a Shareable URL for Your Store

          Customers can use a shareable URL to access your B2B store. The shareable URL contains a special URL parameter that's associated with a buyer group that has its own price book and discounts. Customers who get to the store using the shareable URL are automatically assigned to the associated buyer group, either in addition to the buyer group the customer is already part of or instead of that buyer group, depending on how your developer set up buyer group extensions.

          Required Editions

          A social media influencer can provide a shareable URL to their followers that gets the followers discounts on specific items. Similarly, if multiple distributors are selling products in your store, each distributor can have a shareable URL that assigns their customers to a specific buyer group that receives special discounts. To create a shareable URL, add a URL parameter to the markup in the store's heading.

          When your developer configures buyer group extensions, the developer can specify what happens when a customer arrives at the store using a shareable URL. The shareable URL customer can be assigned to the buyer group associated with that shareable URL along with the buyer group that was dynamically assigned. Alternatively, the shareable URL customer can be assigned to the buyer group associated with the shareable URL instead of the buyer group that was dynamically assigned.

          For example, consider a customer John Doe, who browses your store with the location set to US. You've set up special discounts on your store for Black Friday. Customers who have the store location set to US receive a special discount on all items in the store. John's son sends him an influencer's referrer link to the store. Anybody accessing the store through the link gets 10% off the price of certain items in the store. When John accesses your store using the link his son sent him, one of two things happen depending on how you set up the buyer group extension

          • If the buyer group extension was set up such that the buyer group associated with the referrer URL overrides the dynamically assigned buyer groups (the buyer group based on location, for example), then John receives only the 10% discount on the price of certain items.
          • If the buyer group extension was set up such that the buyer group associated with the referrer URL exists in addition to the dynamically assigned buyer groups, then John receives the 10%discount on certain items, as well as the Black Friday discounts you've set in place for your US store.
          Note
          Note Salesforce recommends that you keep the number of characters in the URL parameter short so that your URL doesn't exceed the common browser limit of 2048 characters.

          To implement a persistent URL, follow these steps.

          1. In the navigation sidebar, select a store from the Store dropdown.
          2. Click Website Design and then select Experience Builder.
          3. In Experience Builder, click Settings | Advanced.
          4. Click Edit Head Markup.

            Screenshot showing Edit Head Markup under Advanced Settings in Experience Builder

          5. Add the URL parameter to the existing markup.

            Faster Add-to-Cart supports only 20 parameters, with a maximum key length of 25 characters and a maximum value length of 251 characters. For more information about Faster Add-to-Cart, see Improve Product Page Performance in a B2B Store.

            For example, this sample markup code shows how to add a custom parameter referrer, in the URL.

            <script>
            window.CLWR = window.CLWR || {};
            window.CLWR.registeredPersistentParamNames = window.CLWR.registeredPersistentParamNames || new Set();
            
            // Register params
            window.CLWR.registeredPersistentParamNames.add("referrer");
            </script>

            The final markup looks like this.

            Screenshot showing head markup after edit.

          6. Set the security level to Relaxed CSP: Permit Access to Inline Scripts and Allowed Hosts.
          7. Add an Apex extension that returns the buyer group for a user based on the URL parameter.

            When working with Apex, make sure that you follow the security tips for Apex development. For more information, see Security Tips for Apex and Visualforce Development.

            For example, this custom code for the referral parameterreferrer is linked to a referrer's username. The buyer group associated with the URL parameter is Discounted Buyer Group.

            if URL has parameter 'referrer':
                 referrerUser = getUserByUsername(referrer)
                 if referrerUser exists:
                      assign shopper to Discounted Buyer Group
                 else:
                      assign shopper to Normal Buyer Group
            else:
                 assign shopper to Normal Buyer Group
            If necessary, you can download a sample code, make the necessary changes, and then use the updated code for your store. See Shareable URL sample.
          8. Publish your store.
           
          로드 중
          Salesforce Help | Article