Skip to content

Conversation

@crgee1
Copy link
Contributor

@crgee1 crgee1 commented Jun 17, 2025

@crgee1 crgee1 requested a review from a team June 17, 2025 23:35
Copy link
Contributor

@jjl014 jjl014 left a comment

Choose a reason for hiding this comment

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

The changes look good from what I can tell. Just left some comments around some typos and the descriptions. Lmk what you think.

It might be helpful to have another pair of eyes to review, just in case I missed something.

* @param {object} parameters - Additional parameters to be sent with request
* @param {array.<{question: string}>} parameters.questions - List of pre-defined questions shown to the user
* @param {string} parameters.itemId - Product id whose page we are on
* @param {string} parameters.itemName - Product name whose page we are one
Copy link
Contributor

Choose a reason for hiding this comment

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

typo one -> on

* },
* );
*/
trackAssistantPdpView(parameters, networkParameters = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add some sort of label mentioning this will be deprecated in the future?

* },
* );
*/
trackAssistantPdpOutOfView(parameters, networkParameters = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to above, it looks like this function will be deprecated in the future

* @param {object} [networkParameters] - Parameters relevant to the network request
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
* @returns {(true|Error)}
* @description The PDP Q&A element was focused on
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be more specific here and say input element?

Separately, this is just a nitpick, but could we update the descriptions for the functions to be consistent with others? (i.e. User focused on the PDP Q&A input element)

* @param {string} parameters.itemName - Product name whose page we are one
* @param {array.<{start: string | undefined,
* end: string | undefined}>} parameters.viewTimespans - List of timestamp pairs in ISO_8601 format
* @param {string} [parameters.variationId] - Variation id whose page we are one
Copy link
Contributor

Choose a reason for hiding this comment

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

typo one -> on. looks like this typo exists on most/all of the functions. I'll leave this note here so I don't spam the comments.

@jjl014
Copy link
Contributor

jjl014 commented Jun 27, 2025

Forgot to mention in original review message, but let's check in with the ASA team on whether or not they plan to change the names of the endpoints so we can make the change while these changes are still in progress.

We'll also want to make the switch from assistant -> agent, while ensuring backwards compatibility so both will work.

@jjl014 jjl014 requested a review from a team June 30, 2025 20:32
Copy link
Contributor

@jjl014 jjl014 left a comment

Choose a reason for hiding this comment

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

Changes are looking good from what I can tell. I did leave a couple more comments on descriptions/consistency.

}

/**
* Send product insights agent out of view event
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be "Send product insights agent input focus event"

* @param {object} [networkParameters] - Parameters relevant to the network request
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
* @returns {(true|Error)}
* @description The product insights agent question that was clicked on
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, should we change this to be "User clicked on a question within the product insights agent"?

* @param {object} [networkParameters] - Parameters relevant to the network request
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
* @returns {(true|Error)}
* @description The product insights agent question was submitted
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, should we change this to be "User submitted a question to the product insights agent"?

* @param {object} [networkParameters] - Parameters relevant to the network request
* @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
* @returns {(true|Error)}
* @description The product insights agent answer was shown to the user
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, should we change this to be "User viewed the answer provided by the product insights agent"?

}

/**
* Send product insights agent question submit
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this in my previous review, but let's add "event" to the end of this to keep things consistent

}

/**
* Send product insights agent answer view
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 add "event" to the end of this

}

/**
* Send product insights agent answer feedback
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 add "event" to the end of this

@jjl014 jjl014 merged commit a081698 into master Jul 15, 2025
8 of 12 checks passed
@jjl014 jjl014 deleted the ci-4555-support-asa-pdp-functions branch July 15, 2025 20:58
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.

3 participants