Retail Pricing on standard AX Sales order

In the U.K., a supplier of double-glazed windows has an offer which it has promoted on television for more than fifteen years, and as a result of this I cannot hear the phrase ‘Buy one get one free’, without silently repeating “I say, you buy one, you get one free”. This has gotten somewhat irritating over the last few days, since the topic of this post is about how to use ‘Buy one get one free’ functionality on a Sales order in Dynamics AX 2012 R3. The functionality requires the use of Retail ‘Mix and Match Discounts’ which, until R3, was only available to the AX POS application. With R3, we get Call center Retail channel functionality, and some associated enhancements to behaviour of the Sales order. In previous versions of AX, the only way to get BOGOF functionality was to use Supplementary items. This functionality has one well discussed draw back; there is no way in standard AX for the operator to be prompted to add supplementary items to a sales order. And, the operator could remove the ‘Buy one’ part of the deal from the order, and the customer could still get the ‘Get one free’ part! Both of these problems are addressed by using Mix and Match Discounts.

Before we start, please follow the steps in a previous post about initialising the Retail functionality. If you don’t do this, it doesn’t matter that you follow all the steps below – it won’t work.

We’re going to create the Call center Retail Channel first, but there are some mandatory fields to set on the Call center, so we’ll need to create the data for that.

Info codes
We’re going to need three Info codes. Head to Retail > Setup > Info codes and create three, each of with the Input type ‘Subcode list’. Name them as you like, but you can see their purpose from in screen shot below. Aside from being mandatory when creating a Call center, they are not needed for the functionality we are testing.

InfoCodes

Create three Info Codes

Warehouse & Customer We’re also going to need to specify a Warehouse and a Default Customer. I assume you’ll already have a warehouse. The Default Customer is, according to the help, used when no Customer exists on the transaction. I don’t know how I will create a Call Center Sales order without defining a customer, but to be on the safe side, I created a customer for this purpose.

Modify ‘Organisation Number’ number sequence (optional)
I’m going to change the number sequence that is used when assigning Organisation Numbers, since I don’t want a meaningless number to be used. You don’t have to do this, but you’ll not be able to change the Operating unit number of your Call Center in the next step if you don’t.

OrgNumber

Modify the Organisation number Number sequence

Create the Call Center Head to Retail > Common > Retail channels > Call centers, and hit ‘New Call Center’. Enter all the mandatory data, as per the screen shot below. I’ve also unticked ‘Enable order completion’, since that functionality is not required, and gets in the way of our tests later.

CreateCallCenter

Create the Call Center

In case we forget, we’ll add our user to the Call center now. Click the ‘Channel users’ button, and add your User Id.

CallCenterUser

Add your user to the Call Center

Now, you’ve done enough to enable Retail functionality on standard AX Sales orders. If you create a new sales order, you’ll see on the header that ‘Retail sale’ is ticked.

RetailSalesOrder

Retail Sales Order

From now on, the Sales order can behave slightly differently. But we haven’t done enough to enable Mix and Match pricing. (And, if at any time you want to go back to creating normal sales orders, remove your user from the Call center).

Organisational hierarchy We need to create a Organisational Hierarchy and add our Call Center to it. This setup is required by the Retail Assortment (you can read more about this here) and would normally represent the structure of all your Retail channels. An Assortment dictates the items that are going to be available in a store, and by using a Retail Organisational Hierarchy you can define which items are available to different groups of stores. Head to Org Admin -> Setup -> Organisation -> Organisation hierarchies and create a New record (I’ve named mine ‘Retail organisation hierarchy’). Hit the ‘Assign purpose’ button. In the form that opens, choose ‘Retail assortment’ (on the left) and then hit ‘Add’. Select the Organisation hierarchy you just created, and hit OK. If that sounded confusing, check the screen shot below. Whilst you’re here, you might as well set it as the default Retail assortment hierarchy.

OrgHierarchy

Create an Organisational Hierarchy for the Retail Assortment

Back on the ‘Organisation hierarchies’ form, select your new Organisational hierarchy and hit ‘View’. You’ll see your hierarchy is empty. Hit ‘Edit’, and the Action pane changes appearance. Click Insert -> Retail channel. Select your Call Center, and click OK. Click ‘Publish and close’ to save the hierarchy. Enter today’s date and hit the Publish button.

PublishHierarchy

Publish the Hierarchy

Category hierarchy Next, we’re going to create another hierarchy. This time it’s a Category hierarchy for our Retail Products – these being the items that we wish to sell via our Call Center. Head to Product information management -> Setup -> Categories -> Category hierarchies, and create a New one with a useful name; I called mine ‘B2C Call Center’, since it will contain products we’re going to sell in the Call Center I’ve called B2C. (Thinking back, it would have been better to call it ‘All Retail Products’ or similar, since we can have only one of this type of hierarchy). On the next form, click ‘New category node’ and name it ‘All’. Since it is the top node in our Category hierarchy, it will contain all the products which we add to this Category hierarchy.

AllNode

Create a new Category Node

I have three products that I want to add to this Category hierarchy, so I use ‘New category node’ to create three categories below ‘All’, with a bit of a hierarchy going on.

NodeHierarchy

Create a Hierarchy

On that form, that’s all we’re going to worry about. But we do have to set the Category as our Retail Product Hierarchy, which we do at Product information management -> Setup -> Categories -> Category hierarchy types (see the screen shot below).

CategoryHierarchyType

Set the Category as the Retail Product Hierarchy

We now need to add products to our Category hierarchy. Make sure that some Released Products exist in your company, and head over to Retail -> Setup -> Category hierarchies -> Retail product hierarchy. Expand the ‘Products’ fast tab, and expand all your hierarchy nodes on the left. Select each sub-node and use ‘Add’ to add products at each node.  When asked if you wish to ‘Update Product properties’, hit No. When that is done, head to the Released products form, and on one of those products hit the ‘Product categories’ button in the Action pane (‘Product’ tab -> ‘Setup’ area). You’ll get confirmation of the selection you made, and indeed we could have added Products to our Category Hierarchy this way too.

Assortment
Next, we create an Assortment. Head to Retail -> Common -> Assortments and hit New Assortment. I enter an Assortment Id (again, I modified the relevant number sequence to allow this – it’s not important) and an Assortment name. Then, on the ‘Retail channels’ fast tab, I hit ‘Add line’. Here, you’ll see evidence of the Organisation Hierarchy we created at the start of this exercise. With a full store hierarchy, it would be possible to add a group of stores or call centers to this Assortment. Go ahead and add your Call center to the Assortment.

NewAssortment

Create a Retail Assortment

Then, on the ‘Products’ fast tab, hit ‘Add line’. Set the Category to ‘All’, and make sure ‘Include’ is selected.

AssortmentProducts

Add the Products to the Assortment

When you’re done, hit the Publish button in the Action pane. This fires off a Batch job called ‘Retail Assortments’, and you should check to see that the job reaches the status ‘Ended’.

RetailAssortmentsBatchJob

The batch job Publishes the Assortment

Back on the Assortments List Page, your Assortment should have the status ‘Published’.

PublishedAssortment

The Published Assortment

Retail Catalogue
The last step is to create a Retail Catalogue. Here, we choose the Products from our Assortment that we want in our Catalogue. Unfortunately, to Approve a Retail Catalogue, we have to configure Workflow. Whilst it is not hard, I have not included all the steps to do this since it relies on Workflow actually working in your environment. If I get some comments to include this setup, I’ll add it at a later date. Please configure the workflow to approve a Retail catalogue now, since you won’t be able to get past the ‘Validate’ stage if you don’t.

Head to Retail -> Common -> Catalogues -> Catalogues. Hit ‘New Catalogue’. Now, I’m setting this up in an empty instance of AX, and when I did this I got the error ‘Unable to find any record in the DirPartyTable table for current user userid’. I could not create a catalogue. To get past this, I had to create an Employee for myself, and assign that Worker to my AX user id. Then, I created a Catalogue called ‘Spring 2015’. I can see it has stamped my Worker as the Owner of the catalogue. I add my Call center on the ‘Retail channel’ fast tab, and then hit ‘Add products’ in the Action pane. As with the Assortment, I add All products to the Catalogue.

NewCatalogue

Create a Retail Catalogue

Then, I Validate the catalogue.

ValidateCatalogue

Validate the Retail Catalogue

I am them able to submit the catalogue to workflow for Approval. Once approved, Publish the catalogue using the button on the Action pane.

PublishedCatalogue

The Catalogue is Published

Mix and Match Discount
Now we get to the setup for the Mix and Match discount that we are going to use to get the Buy One Get One Free functionality. I have already posted a Price/Discount Agreement to set the price of my item at £500 for all customers.

SalesPrice

The sales price of my item is £500

Next, I need to create a Retail Price Group. At Retail -> Setup -> Pricing and discounts -> Price groups, create a new Price group and tick the ‘Retail’ tick box.

RetailPriceGroup

Create a Retail Price Group

Go back to your Call center (Retail -> Common -> Retail channels -> Call center) and add this price group to it.

PriceGroup

Add the price group to your Call center

At Retail -> Setup -> Pricing and discounts -> ‘Mix and match line group setup’, create a line group which will cause the discount to be activated if two products are bought.

LineGroupSetup

Create a Mix and Match Line Group

Finally, we need to create the Mix and Match Discount. Head to Retail -> Common -> Pricing and discounts -> Mix and match discounts. Create a new Discount and give it a name. Hit the ‘Price groups’ button, and select your price group. Hit the ‘Mix and match line groups’ button and select the line group you just created.

Per the screenshot below, set the Discount type to ‘Least expensive’. Set it that 100% discount will be given to the least expensive line. On the Lines fast tab, add your Product(s) and set the Line group.

CreateMixandMatch

Create the Mix and Match Discount

Then set the status of the discount to ‘Enabled’. And you’re done! All you need to do now is test it.

Buy one, get one free
Create a Sales order for the item for a Quantity of 1. As expected, no discount is applied:

NoDiscount

No discount is applied

Alter the quantity to, say, 2. You are prompted to re-calculate all prices. HIT ‘YES’!

Discountapplied

Buy One Get One Free!

You’ll see the line splits into two. One line has the full unit price, and no discount. The other has a discount amount equal to the unit price and zero net amount.

I say, you buy one, you get one free 🙂

Notice that if you attempt to delete the line which has no discount, AX automatically ensures the discount on the remaining line disappears.

So, a lot of setup to get one small result, but it also opens up a whole possibility of Retail functionality on the sales order. But this is enough for one post. Hope it helps!

Advertisements

11 thoughts on “Retail Pricing on standard AX Sales order

  1. Great article! I tried it out and it worked perfectly..but did you ever try to use both the mix and match discounts and the trade agreement rule discounts on one orderline? AX does very strange things then..

    • Hi Jana,

      Thanks for your feedback. Yes, tried T/A Line discounts with Retail discounts. I found that AX would use either the T/A discount OR the Retail discounts; it used whichever discount was best for the customer.

      I think I also found that T/A Total discounts were calculated at Line level (it was a while since I looked at it). And that I liked!

  2. Hi, Please suggest the solution for below scenario.

    I have a requirement to setup a scenario like,

    If total Sales order amount reached to 10,000$ then an Item “X001” is free.

    • Hi,

      I’m no expert on retail pricing, but I had a think about either Mix and Match discounts or Threshold discounts, and I can’t think of a way to get what you want. Sorry! Try asking on the AX Community Forum.

  3. Pingback: Setup for Call Center gets a little bit harder with CU9 | guyterry's Dynamics AX blog

  4. Pingback: Supplementary sales items in AX 2012 R3 | timsaxblog

  5. Thank you for the nice step-by-step demonstration, very helpful. However, I cannot get the discount to push if I update the quantity to 2, even when I go to Sell > Calculate > Recalculate, I am required to put the second item in as a separate line. That is not a big deal, but I do have the problem of the discount being added to every instance of that item number placed on the sale after the first instance and if the first is deleted then all items have the discount, it does not recalculate as you said it did for your example. I used the “Least Expensive” discount method and set my “number of least expensive lines” to 1 and my “number of products needed” in the lines set to 2. Any ideas as to why it is not behaving properly?

    • Hi Jessi,

      I saw your question on the community forum, which would have been my suggestion! Retail pricing is not really one of my areas of expertise, and there are one or two on the forum who are pretty good on this topic.

  6. Great demonstration and it is very helpful.
    However, I cannot get the discount to push if I update the quantity to 2. I tried go to Sell > Calculate > Recalculate, but received the following error.

    Microsoft.Dynamics.Commerce.Runtime.DataValidationException: Sales line item could not be found. Try running product jobs and ensure item is assorted to current channel. See tracing log for detailed errors.

    Do you have any ideas why it is not behaving properly?

    • Hi Elaine,

      If you look at the bottom of this post, you’ll see I got the same error when I was testing after installing CU9. I never found the cause, and I didn’t get it in all the environments I tried it in. Sorry.

  7. Hi Guy,
    Great post .
    I am stuck in a following scenario :
    On a same Sales transaction I want to create a customer order for one item since this Item 1 is not available in any of the stores but I want to sell other 2 items which are available in the store.
    POS let me create the customer order for one item initially but the moment i add another 2 item to sell it restricts the available item into previous customer order only and does not let me sell them.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s