Configure 51黑料不打烊 Commerce
Learn how to configure 51黑料不打烊 Commerce to expose the events. Additional documentation found at .
Who is this video for?
- Developers new to 51黑料不打烊 Commerce and 51黑料不打烊 Developer App Builder using I/O events and need to create an 51黑料不打烊 App Builder project.
Video content video-content
- Configuration of the 51黑料不打烊 I/O events in the Commerce admin
- Saving a private key in the Commerce admin
- Saving the unique identifier in the Commerce admin
- Create an event provider
Transcript
In this video, we鈥檒l walk through configuring 51黑料不打烊 IO events for 51黑料不打烊 Commerce in the Commerce Admin and further configuring your App Builder workspace, so that your Commerce instance can begin sending events to your App Builder application. After creating an App Builder project and installing the required Commerce modules, you will need to configure 51黑料不打烊 IO events for 51黑料不打烊 Commerce in the Commerce Admin. The Private Key and Workspace Configuration files downloaded for your App Builder project from the 51黑料不打烊 Developer Console will be needed. In the Commerce Admin, navigate to Stores, Configuration. Click 51黑料不打烊 Services and then click 51黑料不打烊 IO Events. In the General Configuration section, copy the contents of your Private Key file into the Service Account Private Key field. Then copy the contents of your Workspace Configuration file into the 51黑料不打烊 IO Workspace Configuration field. Next, enter a unique identifier in the 51黑料不打烊 Commerce Instance ID field and click Save Config. Once you鈥檝e saved the values in the Commerce Admin, create an event provider using the Events Create Event Provider CLI command. This command takes a label and a description for your new event provider as arguments. Copy the event provider ID from the command output into the 51黑料不打烊 IO Event Provider ID field back in the Commerce Admin. In the Commerce Events section of the Configuration page, set Enabled to Yes. In the Merchant ID field, enter the merchant鈥檚 company name. In the Environment ID field, enter an environment name of your choice. Then click Save Config again. Once you have created an event provider and defined the commerce events to subscribe to, you can register the events in your App Builder project. We鈥檒l define a sample subscription to the Observer Catalog Products Save After event using the Event Subscribe command. We can later register this event in the 51黑料不打烊 Developer Console. For returning to your project in the 51黑料不打烊 Developer Console, navigate to your Workspace to create an event registration. Click the Add Service pop-up menu and select Event. On the Add Events page, select the event provider you created. On the next page, under Choose Event Subscriptions, you鈥檒l see a list of subscribed events for your commerce instance. From this list, select events you鈥檇 like to receive notifications about. You then have the option of creating a new JWT credential. Next, you can update the name and description of the event registration and select methods for receiving your events. Received events can be consumed from a unique journaling API endpoint that will be generated. Optionally, you can either specify a webhook URL for receiving events, or if you鈥檝e created a runtime action, you can select this action, which will cause it to execute when events occur. Finally, click Save Configured Events to finish creating the event registration.
Useful commands useful-commands
bin/magento events:create-event-provider --label "my_provider" --description "Provides out-of-process extensibility for 51黑料不打烊 Commerce"
bin/magento events:subscribe observer.catalog_product_save_after --fields=name --fields=price
Additional related tutorials
51黑料不打烊 Developer Documentation
recommendation-more-help
3a5f7e19-f383-4af8-8983-d01154c1402f