-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove _sfdc_customer_id
#1731
Remove _sfdc_customer_id
#1731
Conversation
Signed-off-by: Kevin He <[email protected]>
Going to approve as this change is small. |
@@ -11,6 +11,7 @@ | |||
- Fix locale selector navigating back to default locale [#1670](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1670) | |||
- Fix handling of offline products on Cart, Checkout, Order History, and Wishlist pages [#1691](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1691) | |||
- Fix tracking of `viewSearch` event for Einstein analytics, in the case of no-search-results [#1702](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1702) | |||
- Remove invalid header `_sfdc_customer_id` [#1731](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1731) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mention the http3 upgrade to be clearer. Otherwise, without context, it may confuse customer why this header is no longer valid.
// Einstein events sent via the API with the finishOrder event fired by ECOM | ||
// when an Order transitions from Created to New status. | ||
// Without this, various order conversion metrics will not appear on reports and dashboards | ||
headers: {_sfdc_customer_id: usid}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to do the same thing to the older PWA Kit: https://github.com/SalesforceCommerceCloud/pwa-kit/blob/release-2.6.x/packages/template-retail-react-app/app/commerce-api/hooks/useBasket.js#L367-L374
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No net new customer should use v2 and existing customers will need to patch their project, therefore i don't think we need to patch v2 pwa kit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 🤔 good point, all right we don't need to patch v2.
Signed-off-by: Kevin He <[email protected]>
// Einstein events sent via the API with the finishOrder event fired by ECOM | ||
// when an Order transitions from Created to New status. | ||
// Without this, various order conversion metrics will not appear on reports and dashboards | ||
headers: {_sfdc_customer_id: usid}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see 🤔 good point, all right we don't need to patch v2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably also want to align and remove references to the _sfdc_client_auth
header.
* Get a shopper JWT access token for a registered customer using a trusted agent (merchant). | |
If using a SLAS private client ID, you must also use an `_sfdc_client_auth` header. | |
The value of the `_sfdc_client_auth` header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (`:`). For example, `privateClientId:privateClientsecret` becomes `cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ=` after Base64 encoding. | |
* @returns A TanStack Query mutation hook for interacting with the Shopper Login `getTrustedAgentAccessToken` endpoint. | |
*/ | |
GetTrustedAgentAccessToken: 'getTrustedAgentAccessToken', |
@kevinxh I see this change was marked as a bugfix and not a breaking change. For customers launched on pwa-kit, if the MRT functionality is changed out underneath (infra change) would this not be a breaking change for them unless they updated their code to remove the underscores in the header? We are having some intermittent issues calling the order create mutation and identified this as a possible contributor. The site was launched before this update was made. Thoughts? |
Description
With the recent MRT HTTP3 upgrade, headers that starts with
_
is no longer accepted and will cause errors.Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization