Vous êtes sur la page 1sur 14

How to: Publish a SharePoint online store

Further reading
How to create a SharePoint online store How to deploy a StoreFront How to Setup and Configure Commerce Data Exchange: Retail-time Service How to create and configure a retail channel navigation hierarchy Microsoft Dynamics AX 2012 for Developers [AX 2012] SDK Download

Prerequisites
A SharePoint online store is created in AX. Refer to How to create a SharePoint online store. A SharePoint store front is deployed. Refer to How to deploy a StoreFront. Ask your IT administrator for the following information. We will use them in this how-to tutorial o SharePoint catalog site collection URL o SharePoint publishing site collection URL o CRT (Commerce Runtime) database name and server name A Commerce Data Exchange: Real-time Service profile is created. Refer to How to Setup and Configure Commerce Data Exchange: Retail-time Service. A navigation category hierarchy is crated. Refer to How to create and configure a retail channel navigation hierarchy.

Why do we need to publish a SharePoint online store?


Retail operation manager creates and configures an online store using AX Retail. When the online store is ready to push to the online store front, the manager needs to do an explicit action to publish the online store from AX to SharePoint. Therefore, the manager can keep the draft store in AX and only make it available online by channel publishing. Behind the scene, when an online store is published, the channel data is replicated to the CRT database by Synch Service, from where the data is then replicated to the SharePoint store front by a SharePoint job. You can track the state of publishing by checking the Publishing status field of the online store. The publishing status has two states: Draft The online store is still under edit, and it has not been published yet. The channel data stays in AX at this moment.

In progress The user has clicked the Publish button to trigger the publishing process. The channel data is waiting to be replicated to the SharePoint store front. Published The channel data has been replicated to SharePoint store front. The online store has been published successfully. The retail operation manager can edit the channel and revert it to draft for the next publishing. Failed The channel has failed to publish. The Publishing status message should provide more details of the failure. The retail operation manager can edit the channel and revert it to draft for the next publishing.

Online store setup checklist


It is a fairly long process to prepare a SharePoint online store and publish it. The Online store setup checklist is available to guide the users to go through the process step by step. You can open the checklist by clicking on Retail > Setup > Online store setup checklist.

The checklist contains the steps for both channel publishing and catalog publishing. By comparison, this tutorial will only describe channel publishing in details. The rest of the tutorial contains two how-to: How to: publish a SharePoint online store for the first time How to: modify one SharePoint online store and republish it

How to: Publish a SharePoint online store for the first time
In order to publish an online store, you need to finish the prerequisites. After that, you should have an online store created which has never been published.

1. Create a Commerce Data Exchange: Synch Service profile for AOS (AOS Object Server) if you dont have one yet. This profile tells Commerce Data Exchange the location of the Synch Service on the AX server which handles reading and writing data from/to AX server. a. Go to Retail > Setup > Retail scheduler > Channel integration > Commerce Data Exchange: Synch Service profiles. b. Click New button, and specify the Service name and the Server name of the AX server.

c. Click Test connection to verify the settings. d. Click Close. 2. Create an AOS profile if you dont have one yet. This profile tells Commerce Data Exchange the location of AX server which is the data source of the channel publishing. a. Go to Retail > Setup > Retail scheduler > Channel integration >AOS profiles. b. Click New button, and specify the fields. Select the Synch Service profile for AOS in the Commerce Data Exchange: Synch Service field.

c. Click Test connection to verify the settings. d. Click Close. 3. Create a Commerce Data Exchange: Synch Service profile for CRT (Commerce Runtime) server. This profile tells Commerce Data Exchange the location of the Synch Service on the CRT server which handles reading and writing from/to the CRT server. Note: If your AX server and CRT server are the same, you only need one Commerce Data Exchange: Synch Service profile. a. Follow the similar steps of creating a Commerce Data Exchange: Synch Service profile for AOS. Set the field values based on the CRT server. 4. Create a database profile for the CRT database. This profile tells Commerce Data Exchange the location of CRT database which is the data target of the channel publishing. a. Go to Retail > Setup > Retail scheduler > Channel integration >Database profiles. b. Click New button, and specify the fields. i. Name: the name of profile ii. Server name: the CRT server name iii. Database name: the CRT database name e.g. AxRetailSP. iv. Encrypt database connection: recommend to enable v. Commerce Data Exchange: Synch Service: the Synch Service profile for CRT server.

c. Click Test connection to verify the settings. d. Click Close. 5. Create a channel profile if you dont have one already. This profile describes the endpoints of the SharePoint server. The SharePoint publishing job replicates data from CRT database to SharePoint sites based on this profile. a. Go to Retail > Setup > Retail scheduler > Channel integration >Channel profiles. b. Click New button, and specify the Name and select Profile type SharePoint online store. c. Add two Profile properties i. Publishing site collection URL ii. Catalog site collection URL

d. Click Validate profile to verify the settings. e. Click Close. 6. A distribution location is created automatically for each retail channel (including online stores). We still need to configure the distribution location of the online store based on the profiles we just created. a. Go to Retail > Setup > Retail scheduler > Distribution locations. b. Select the distribution location for your channel (e.g. OOB Store Front), and specify the fields: i. Description: the description of the distribution location. ii. Channel: the channel of the distribution location. iii. Database profile: the CRT database that the online store will replicate data from/to. Note: Do not point two channels to one database profile. One CRT database only supports one online store in this version. iv. Channel profile: the profile of SharePoint store front that the online store will publish to. v. Retail channel schema: the schema type of the CRT database, in this case, 2012 R2 Online Channel vi. Send data: indictor of whether AX should send data to the distribution location. vii. Receive data: indictor of whether AX should receive data from the distribution location. viii. Continuous data transfer schedule: the data synchronization job that will keep run regardless of Send data and Receive data flags.

c. Click Functions > Test connection to verify the settings. d. Click Close. 7. Edit the channel to add the navigation hierarchy to the channel. The navigation category hierarchy defines the product category hierarchy on the SharePoint store front. a. Go to Retail > Common > Retail channels > Online stores. b. Select your online store and click Edit. c. Under General section, set the Category hierarchy field to your navigation category hierarchy. d. Stay on this form for publishing the channel in the next. 8. Publish the channel. This step will populate the channel data into publishing tables which will be replicated to the CRT database. a. Click Publish button, and select Yes for the publishing confirmation. Publishing may take a moment.

b. The Publishing status should change to In progress.

c. Click Close. 9. So far the channel has been triggered for publishing. The channel data is waiting to be replicated to the CRT database and then to the SharePoint server. We need to synchronize the initial data set (including the channel data) to the CRT database. a. Go to Retail > Setup > Retail scheduler > Distribution locations. b. Select the distribution location for your channel (e.g. OOB Store Front). c. Click Functions > Deploy initial dataset. Note: Deploy initial dataset if only necessary for the first time publishing of a channel.

d. Select A-0001_OC from the distribution schedule, and click OK. This step may take a few minutes.

e. Click Close to close the distribution location list. f. Commerce Data Exchange will automatically replicate the channel data from AX server to the CRT database.

10. If the SharePoint store front is deployed properly, its retail publishing job will automatically replicate the channel data from the CRT database to SharePoint. Once its done, the Publishing status will change to either Published or Failed.

a. If the channel is published Congratulations! now you can see the navigation category hierarchy on the SharePoint store front. You can continue to create and publish a catalog (i.e. products) to the channel. b. If the channel publishing failed Please examine the Publishing status message field of the channel, fix the problem, and republish the channel. Note: you can edit the channel and revert the publishing status to Draft, and publish it again.

How to: Modify one SharePoint online store and republish it


When one channel is published for the first time, its target CRT database is empty. Therefore, we need to run Deploy initial dataset to replicate all the existing settings and channel data to the CRT database. However, Deploy initial dataset is time consuming. Once the channel is published successfully, all the following publishing just need to replicate the delta (the data created/updated/deleted since last publishing). This tutorial describes how to republish an online store using A jobs. 1. Create or configure a distribution location list. Distribution location represents the target of the data replication using Commerce Data Exchange. A distribution location list groups multiple distribution locations. The distribution locations in the same list can be associated to the same distribution schedules. a. Go to Retail > Setup > Retail scheduler > Distribution location list. b. Click New to create a new distribution location list for online stores if you dont already have one, e.g. Default include list (Online Channel).

c. Click Add to add the distribution location of your online store into the list.

d. In the future, if you have a second online store, and you want to Commerce Data Exchange executed on the same schedule for all the online stores. You can add the distribution location of the second online store to this list. e. Click Close. 2. Configure the distribution schedules. The distribution schedule is executed to replicate data between AX server and a list (or lists) of distribution locations. Different distribution schedules are responsible for different data. For example, the schedule A-1000_OC replicates the currency data for online channels. a. Go to Retail > Periodic > Data distribution > Distribution schedule. b. Select any distribution schedule of online stores e.g. A-1000_OC, and add your distribution location list (e.g. Default include list (Online Channel)) to the distribution schedule.

c. Repeat the same step for all distribution schedules of online stores (i.e. all _OC schedules). d. Click Close. 3. Edit and republish the online store. Suppose youve modified the navigation category hierarchy for the online store. In order to make the new hierarchy available on the SharePoint store front, you need edit and republish the online store. a. Go to Retail > Common > Retail channels > Online stores. b. Select your online store and click Edit. Click Yes to change the Publishing status back to Draft. c. You can make additional changes to the channel before publishing. When the channel is ready for publishing, continue with the next step. d. Click Publish button, and select Yes for the publishing confirmation. Publishing may take a moment.

e. The Publishing status should change to In progress.

f.

Click Close.

4. Execute Commerce Data Exchange. So far the channel has been triggered for publishing. The channel data is waiting to be replicated to the CRT database and then to the SharePoint server. a. Go to Retail > Periodic > Data distribution > Create actions. b. Click OK to generate actions for data replication. c. Go to Retail > Periodic > Data distribution >Distribution schedule d. Select schedule A-1075_OC. Note, the schedule is associated with the distribution list which contains the distribution location of your online store, e.g. Default include list (Online Channel). e. Click Run directly and then Yes f. Commerce Data Exchange will automatically replicate the channel data from AX server to the CRT database. g. If youve also modified data other than channel data, you need to run corresponding distribution schedules. For example, you need to run A-1040_OC to synchronize pricing data for online stores. 5. If the SharePoint store front is deployed properly, its retail publishing job will automatically replicate the channel data from the CRT database to SharePoint. Once its done, the Publishing status will change to either Published or Failed.

a. If the channel is published Congratulations! now you can see the navigation category hierarchy on the SharePoint store front. You can continue to create and publish a catalog (i.e. products) to the channel. b. If the channel publishing failed Please examine the Publishing status message field of the channel, fix the problem, and republish the channel. Note: you can edit the channel and revert the publishing status to Draft, and publish it again.