Supply Chain Management in Dynamics AX

This blog contains information and feedback on the Supply Chain Management area in Microsoft Dynamics AX

Import vendor catalogs: from setup to importing a sample catalog – Part 1 (Setup)

Import vendor catalogs: from setup to importing a sample catalog – Part 1 (Setup)

Rate This
  • Comments 8

We’ve been working on the import vendor catalogs functionality recently and realized that the ramp up time in this area is quite high. There is a lot of information on MSDN and on InformationSource about the topic but there aren’t any documents which would guide you from the initial setup to creating and importing a sample catalog.

Creating and maintaining procurement catalogs that company employees can use when they order items or services for internal use is one of the major tasks in Procurement and Sourcing. This can be done in several ways. Vendor catalog data can be added to the product master manually; the catalog can be hosted externally or it can be imported from a Catalog Maintenance Request (CMR) file. In this blog post I will focus on the last option: importing vendor catalogs. Before reading this blog post I recommend watching the “How to define procurement categories and catalogs – part 3” video on InformationSource.

Vendor catalog import parameters

The first step will be to setup the Vendor catalog import parameters.

image

  1. Create a root folder where the CMR files will be stored (e.g. c:\temp\CMR).
  2. Click Procurement and sourcing > Setup > Vendors > Vendor catalog import parameters.
  3. In the Vendor catalog import parameters form, in the Root folder path field, enter the location of the root folder that you created for storing CMR files.
  4. The CatalogImportPickup folder is created automatically inside the folder you specified.

Setup AIF

After you set up the vendor catalog import parameters you will need to configure an inbound AIF integration port for catalog import. I will not go into details since the process is very well described in this article.

image

There are a couple of additional steps which are not mentioned in the article:

1. When setting up the file adapter click the Configure button, mark both checkboxes and specify the administrator user in the lookup. Not doing this will lead to an error during the import.

2. If you can’t see the CatImpService.create in the service selection dialog you can go to the AOT, find the CatImpService under the Services node and click Addins\Register service. The alternative is to go to System administration > Setup > Checklists > Initialization checklist and click Set up Application Integration Framework in the Initialize system group.

You will also need some way of running the catalog import service. Normally this is done by setting up recurring batch jobs responsible for executing business logic through integration ports. To learn more about it read the Configure and start the AIF batch services section of this MSDN article.

This standard approach is intended for production. However it’s not very convenient for testing/learning purposes since the catalog import processing will be done asynchronously and the minimum recurrence interval is 1 minute. So I recommend using the x++ job below which performs the import catalog processing instantly:

 1: static void runAIFReceive(Args _args)
 2: {
 3:     new AifGatewayReceiveService().run();
 4:     new AifInboundProcessingService().run(); 
 5:  
 6:     info('AIF processing done');
 7: }

Setup workflow

The import vendor catalog functionality is leveraging another powerful feature of AX: workflow processing. You are allowed to setup rules for automated approval of vendor catalogs and specify one or more reviewers if manual approval is required. To enable the vendor catalog import functionality it is required to set up two types of workflows: Catalog import product approval (line-level), Catalog import approval (catalog-level).

Catalog import product approval

This type of workflow processes all the products that are included in the CMR file. Completion of all of the individual line-level workflow completes the overall catalog import workflow. In order to create a product approval workflow:

  1. Click Procurement and sourcing > Setup > Procurement and sourcing workflows.
  2. On the Action Pane, click New.
  3. Select Catalog import product approval and then click Create workflow.
General setup

The common catalog import product approval workflow should look like this:

image

Set up approvers

1. Double click the Catalog import product approval element.

2. Click the Step 1 element.

3. Click Assignment in the action pane.

4. The simplest assignment would be User->Admin.

Set up automatic actions

Automatic actions allow the workflow framework to automatically approve or reject the products in the imported vendor catalog which meet certain conditions. In order to set up an automatic action you need to:

1. Select the Catalog import product approval element.

2. Click Automatic actions in the action pane.

3. Click the Enable automatic actions check box

4. Setup the conditions for auto approval/rejection

There is one type of condition which I would like to focus on. You can specify Product candidate.Price delta as a parameter of the automatic action. The price delta is calculated as a ratio: (new price – old price) / old price. So if you want to make sure that the price delta is within 20% you need to set the condition to Product candidate.Price delta <= 0.2

5. Select the type of automatic action (approve/reject)

Catalog import approval

This type of workflow is used for setting up the rules for approving the whole catalog. When you configure this workflow, you can reference the Catalog import product approval workflow that you configured earlier. The common setup would be to automatically approve the whole catalog import after all the products have been approved:

image

In the properties of the Vendor catalog lines (products) element you need to reference the catalog import product approval that you created earlier.

Enable a vendor for catalog import

In order to be able to import catalogs for a particular vendor it has to be enabled for catalog import. There are two ways to achieve that

- Click Procurement\Set up\Configure vendor for catalog import

- If you don’t do this you will be prompted if you want to enable the vendor for catalog import when creating a new catalog for the vendor

After you do this a subfolder in the catalog import root folder is created. The name of the folder is the RecId of the vendor.

image

Inside the folder you will find an archive folder with all the CMR files that have been imported for this vendor. You will also find a folder that is used for importing images of the vendor’s products.

image

Setup procurement hierarchy

You won’t be able to import products from categories where the vendor is not approved for procurement. To approve the vendor:

1. Go to Procurement and sourcing/Setup/Categories/Procurement categories.

2. Select the category.

Add the vendor to the list of approved vendors in the Vendors fast tab.

Importing a vendor catalog

Now that all the setup is done we are ready for creating a sample CMR file and importing it. We will write about it the next blog post.

  • Hey Vanya,

    nice post! Can't wait to see the next part of it!

    Best regards,

    Max

  • Hi Max,

    Thanks ) I'm planning to post the second part within a week or two.

    Best regars,

    Vanya

  • Hi Vanya,

    Nice, and much needed post. :-)

    We are having issues where large catalogs, >50.000 items, gets stuck in the flow. A number of the items are approved as expected, but a large number of lines appear as they were never submitted to the workflow. I have a hunch that there is some kind of timing issue when importing large catalogs.

    Do you have any experience with catalogs of that caliber?

    Best regards,

    Palle Agermark

  • Palle, do you have a scenario that has been reported to customer support? We can help if we know the details or if you can repro it, share the screen etc.

  • We haven't had time to set up a repro scenario. As this article indicates, there are a lot of different bits and pieces that must fit together. A screen sharing session would be more managable, probably for your support top.

    I'll talk to the guys on the project and see if we can setup something and then we'll file a request for support.

    Thanks,

    Palle

  • Hi Palle,

    Sorry for not answering earlier. I was on vacation with a limited internet access. Unfortunately I haven't heard about the issue you describe. I hope you were able to resolve it. But just in case there are a couple of tricks that you may find useful. If a product candidate hasn't been submitted to the workflow I would expect the Submit button to be still active for this product candidate. If the submit button is not available then you should have access to the workflow history (Actions > View history on the workflow bar) and see on the tracking details tab if any errors occurred.

    Best regards,

    Vanya

  • Hi Vanya,

    could you please provide me with the a sample of the catalog file

  • Hi Ahmed,

    You can find it in the second part of the blog post blogs.msdn.com/.../import-vendor-catalogs-from-setup-to-importing-a-sample-catalog-part-2-importing-a-sample-catalog.aspx

    Best regards,

    Vanya

Page 1 of 1 (8 items)
Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post