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

Multichannel Marketing Backend MVP: API #34556

Closed
nima-karimi opened this issue Sep 2, 2022 · 0 comments · Fixed by #36453
Closed

Multichannel Marketing Backend MVP: API #34556

nima-karimi opened this issue Sep 2, 2022 · 0 comments · Fixed by #36453
Assignees
Labels
focus: marketing Marketing page in WooCommerce Admin, i.e. `/wp-admin/admin.php?page=wc-admin&path=%2Fmarketing`.

Comments

@nima-karimi
Copy link
Contributor

This issue is part of the epic #34548. It's also dependent on #34549.

As part of the multichannel marketing feature, we will implement APIs that the new marketing dashboard will use to retrieve and render the data provided by marketing channel extensions (through the method implemented in #34549).

The front end will use the API to interact with the marketing channels. In the MVP version, it will only be used to fetch the channels data and display them on the dashboard; however, in the future, the API will allow the creation of marketing campaigns too.

This API will be implemented under the Automattic\WooCommerce\Admin\API namespace. An API is already implemented for the marketing page under that namespace within the MarketingOverview class. However, since we will be using a feature toggle, it would be best to implement the new API under a new class and keep the current one intact. Later we can deprecate the MarketingOverview class and ultimately delete it.

GET marketing/channels

This endpoint utilizes the MarketingChannels service to fetch and return the list of active marketing channels. It will return an array of serialized MarketingChannelInterface objects; however, the campaign data need to be redacted because the front-end displays the aggregated campaign data (see endpoint below), not the campaigns grouped by channel.

GET marketing/campaigns

This endpoint returns the aggregated list of marketing campaigns for all channels. It will return an array of serialized MarketingCampaign objects. The ID/slug of the marketing channel should also be specified for each campaign and included in the data returned.

@nima-karimi nima-karimi added the focus: marketing Marketing page in WooCommerce Admin, i.e. `/wp-admin/admin.php?page=wc-admin&path=%2Fmarketing`. label Sep 2, 2022
@nima-karimi nima-karimi self-assigned this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: marketing Marketing page in WooCommerce Admin, i.e. `/wp-admin/admin.php?page=wc-admin&path=%2Fmarketing`.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant