Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Retail Interest Group by Dynamics 365 Commerce has moved from Yammer to Viva Engage. If you don't have access to the new Viva Engage community, fill out this form (https://aka.ms/JoinD365commerceVivaEngageCommunity) to be added and stay engaged in the latest discussions.
This article covers the module data file in Microsoft Dynamics 365 Commerce.
A module data file contains the typings for data actions that the module uses to fetch data. The naming convention for module data files is MODULE_NAME.data.ts.
The software development kit (SDK) includes a set of core data actions that can get data from Dynamics 365 Commerce, ratings and reviews, or the recommendations service. You can find the list of data actions under the SDK's \node_modules\@msdyn365-commerce-modules\retail-actions\dist\lib directory.
Example
The following example shows a sample data file for a new module.
import { SimpleProduct } from '@msdyn365-commerce/commerce-entities';
import { AsyncResult } from '@msdyn365-commerce/retail-proxy';
import { IGetProductReviewsData } from '../../actions/getProductReviews';
export interface IProductFeatureData {
products: AsyncResult<SimpleProduct>[];
productReviews: AsyncResult<IGetProductReviewsData>;
}