Skip to content
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

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Remove _sfdc_customer_id #1731

merged 3 commits into from
Apr 8, 2024

Conversation

kevinxh
Copy link
Collaborator

@kevinxh kevinxh commented Apr 5, 2024

Description

With the recent MRT HTTP3 upgrade, headers that starts with _ is no longer accepted and will cause errors.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • remove _sfdc_customer_id

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

Signed-off-by: Kevin He <kevin.he@salesforce.com>
@kevinxh kevinxh requested a review from a team as a code owner April 5, 2024 16:18
@vcua-mobify
Copy link
Contributor

Going to approve as this change is small.
From my understanding, the _sfdc_customer_id is no longer required as it is internally set by SCAPI.

vcua-mobify
vcua-mobify previously approved these changes Apr 5, 2024
@@ -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)
Copy link
Contributor

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},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

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?

Copy link
Contributor

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 <kevin.he@salesforce.com>
// 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},
Copy link
Contributor

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.

Copy link
Collaborator

@adamraya adamraya left a 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 kevinxh merged commit 245e7a8 into develop Apr 8, 2024
28 checks passed
@kevinxh kevinxh deleted the remove-invalid-header branch April 8, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants