Repository navigation
Add appEvents.emit to the Checkout and Customer Account APIs - #4749
Merged
Merged
Conversation
haozhi-liao
force-pushed
the
app-events-checkout-customer-account
branch
from
October 15, 2026 15:59
35c929a to
ca123ca
Compare
kumar303
reviewed
Oct 15, 2026
kumar303
left a comment
Contributor
There was a problem hiding this comment.
Some suggestions for making the API docs more clear to partners
kumar303
approved these changes
Oct 16, 2026
kumar303
left a comment
Contributor
There was a problem hiding this comment.
Looks good but I think you're waiting until 2027-01-rc exists so you can merge it there, right? In any case, this same patch can be applied there.
kristianpd
approved these changes
Oct 22, 2026
kristianpd
force-pushed
the
app-events-checkout-customer-account
branch
from
October 22, 2026 13:57
44f90e0 to
1b81ba4
Compare
Adds shopify.appEvents.emit(eventHandle, attributes?) to the Checkout
standard and address-autocomplete APIs and the Customer Account standard
API. emit resolves with {success: true} once the host accepts the event,
or {success: false, error} when it was not sent.
Also:
- Simplify appEvents API doc wording
- Make appEvents required on the Checkout and Customer Account APIs
- Rename AppEventsApi to AppEvents
- Remove the unused AppEvent type
haozhi-liao
force-pushed
the
app-events-checkout-customer-account
branch
from
October 22, 2026 14:02
1b81ba4 to
61f1b65
Compare
Contributor
|
/snapit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
shopify.appEvents.emit(eventHandle, attributes?)to the Checkout standard and address-autocomplete APIs and the Customer Account standard API.emitresolves with{success: true}once the host accepts the event, or{success: false, error}when it was not sent.Background
App Events let an app record what happens in its UI extensions without a request to the app's backend. Shopify adds the app, shop and extension to each event, and the events show in the app's Dev Dashboard logs next to the events the app sends from its backend with the App Events API.
Host implementations (shop/world, stacked):
Guides on shopify.dev: #2263577 (Checkout) and #2263578 (Customer Account).
Solution
checkout/api/standard/standard.ts:AppEvents,AppEventEmitResult,AppEventAttributesandAppEventAttributeValue(string | number | boolean). Customer Account re-exports them from there, as it doesSubscribableSignalLike.appEventsis required on CheckoutStandardApi, CheckoutAddressAutocompleteStandardApiand Customer AccountStandardApi, so Customer Account order-status targets get it too. Both hosts always expose it on2027-01. When the feature is off for a shop,emitresolves with{success: false}instead of the property being missing.{success: true}means the host accepted the event. It may still wait for analytics consent, and it does not confirm delivery.{success: false, error}covers everything the host rejects: invalid handle or attributes, rate limit, buyer data in attributes, and a disabled host such as the checkout editor.emitnever rejects.customer-account-web'sapp-events.ts.@shopify/ui-extensions-tester: the Checkout and Customer Account mocks return{success: true}.🎩
2027-01-rc(ee50e202a) locally:yarn type-check,yarn lintandyarn testpass.Checklist