Friday, August 15, 2014

Retail POS does not show Price - No Channel Configuration was found

Issue: 
Dynamics AX Retail POS does not show Price for products added to sale. Also you will find an event log error as 'No Channel Configuration was found' with some stack trace.

Resolution:
The Retail POS is not able to find the Channel i.e Store information based on the data setup for the legal entity, a simple overlook on a few Legal entity setups can cause this issue and become an headache during the implementation. 
Dynamics AX Retail POS uses the Channel DB's CHANNELCONFIGURATIONVIEW to get the Channel.

If you can observe the joins in the View, it seems a simple assortment, price group and store setup is not sufficient to get the prices onto the Retail POS, you would need to setup the Legal entity properly.

To make it short, make sure you have entered the language, address in Legal entity and Retail Parameters defined. After iterating changes in the setup, run the view again to check if the Store channel is retrieved correctly in the query window. Then run the POS, with the View returning the relevant record the Retail POS should be able to compute the Product prices correctly using the Retail Pricing DLL's. You should now be able to make the product sale.

Actual View(For troubleshooting):
ALTER VIEW [crt].[CHANNELCONFIGURATIONVIEW] AS
(
SELECT
[rct].[RECID],
[rct].[CHANNELTYPE],
[rct].[INVENTLOCATION],
[rct].[INVENTLOCATIONDATAAREAID],
[rct].[CURRENCY],
[rct].[PRICEINCLUDESSALESTAX],
[l].ACCOUNTINGCURRENCY AS 'COMPANYCURRENCY',
[lpa].[COUNTRYREGIONID],
[lacr].[ISOCODE] AS 'COUNTRYREGIONISOCODE',
[rsp].[EXCHANGERATETYPE],
[rsp].[STAFFPASSWORDHASH],
[rsp].[TSPASSWORDENCRYPTION],
[rsp].[DEVICETOKENALGORITHM],
[rsp].[EARNLOYALTYOFFLINE],
[rtsp].[PROFILEID] AS 'TSPROFILEID',
[rtsp].[LANGUAGE] AS 'TSLANGUAGEID',
[rtsp].[TSSTAFF] AS 'TSSTAFFLOGONCONFIGURATION',
[rtsp].[CENTRALTABLESERVER] AS 'TSHOST',
[rtsp].[CENTRALTABLESERVERPORT] AS 'TSPORT',
[rtsp].[RETAILTSDATA] AS 'TSENCRYPTEDPASSWORD',
[rtsp].[SERVERCERTIFICATEDNS] AS 'TSSERVERCERTIFICATEDNS',
[rtsp].[SERVERSERVICENAME] AS 'TSSERVICENAME',
[rtsp].[PROTOCOL] AS 'TSPROTOCOL',
[rtsp].[SECURITYOFF] AS 'TSSECURITYOFF',
[rp].PICKUPDELIVERYMODECODE,
[rp].ELECTRONICDELIVERYMODECODE,
[rp].GIFTCARDITEM,
[rp].CANCELLATIONCHARGE,
[rp].CANCELLATIONCHARGECODE,
[rp].EXPIRATIONDATE AS 'QUOTEEXPIRATIONDAYS',
[rp].MINIMUMDEPOSITFORSALESORDER,
[rp].SHIPPINGCHARGECODE,
[rct].CHANNELTIMEZONEINFOID AS 'TIMEZONEINFOID',
[clv].LANGUAGEID AS 'DEFAULTLANGUAGEID',
[rsbp].[APIKEY] AS 'BINGAPIKEY',
[lpa].VALIDFROM,
[lpa].VALIDTO,
[crt].GETCATALOGIMAGEATTRIBUTEDEFAULTVALUE() AS CATALOGDEFAULTIMAGETEMPLATE,
[crt].GETEMPLOYEEIMAGEATTRIBUTEDEFAULTVALUE() AS EMPLOYEEDEFAULTIMAGETEMPLATE,
[crt].GETCUSTOMERIMAGEATTRIBUTEDEFAULTVALUE() AS CUSTOMERDEFAULTIMAGETEMPLATE
FROM [ax].RETAILCHANNELTABLE rct

-- Get transaction service profile information
INNER JOIN [ax].RETAILTRANSACTIONSERVICEPROFILE rtsp ON rct.TRANSACTIONSERVICEPROFILE = rtsp.PROFILEID

-- Get the store's country/region
INNER JOIN [ax].COMPANYINFO ci ON ci.DATAAREA = rct.INVENTLOCATIONDATAAREAID
INNER JOIN [ax].LEDGER l ON l.PRIMARYFORLEGALENTITY = ci.RECID
INNER JOIN [ax].DIRPARTYLOCATION drl ON drl.ISPRIMARY = 1 AND drl.PARTY = ci.RECID
INNER JOIN [ax].LOGISTICSPOSTALADDRESS lpa ON lpa.ISPRIVATE = 0 AND lpa.LOCATION = drl.LOCATION
INNER JOIN [ax].LOGISTICSADDRESSCOUNTRYREGION lacr ON lacr.COUNTRYREGIONID = lpa.COUNTRYREGIONID

-- Get the store's default language
INNER JOIN [crt].CHANNELLANGUAGESVIEW clv ON clv.CHANNEL = rct.RECID AND clv.ISDEFAULT = 1
INNER JOIN [ax].RETAILPARAMETERS rp ON rp.[KEY] = 0 AND rp.DATAAREAID = rct.INVENTLOCATIONDATAAREAID

CROSS JOIN [ax].RETAILSHAREDPARAMETERS rsp

LEFT JOIN [ax].RETAILSHAREDBINGPARAMETERS rsbp ON rsbp.[KEY] = 0
WHERE rsp.[KEY] = 0
)

Detailed Event Log:
LSRetailPosis.POSProcesses.ProcessInput: Microsoft.Dynamics.Commerce.Runtime.ConfigurationException: No channel configuration was found.
   at Microsoft.Dynamics.Commerce.Runtime.Data.ChannelDatabaseAccessor.GetChannelConfiguration(Int64 channelId)
   at Microsoft.Dynamics.Commerce.Runtime.Data.ChannelDataManager.GetChannelConfiguration(Int64 channelId)
   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.CreateRequestContext(Request request)
   at Microsoft.Dynamics.Retail.Pos.PriceService.Price.GetPrice(IRetailTransaction retailTransaction)
   at LSRetailPosis.BusinessLogic.ItemSystem.CalculatePriceDiscount(IPosTransaction transaction)
   at LSRetailPosis.BusinessLogic.ItemSystem.CalculatePriceTaxDiscount(IPosTransaction transaction)
   at LSRetailPosis.POSProcesses.ItemSale.Execute()
   at LSRetailPosis.POSProcesses.Operation.RunOperation()
   at LSRetailPosis.POSProcesses.ProcessInput.Execute().

Monday, August 11, 2014

Life Cycle Service(LCS) - Deployment of Development and Test Environments

Life cycle services has just released the August update, with a lot of new enhancements especially for Dynamics AX environments. For a full information on the release details please checkout the LCS blog. One of the most significant changes in the August release of LCS update was the release of new Pre-Built environments for Development or Testing and Retail specific environments for Pre-sales and internal development for Partners. This is a very interesting development as these steps pave the way for a fully featured Dynamics AX 2012 deployment fully on the cloud for Production environment. LCS in the past couple of years has taken significant initiatives to streamline partner concerns on assisting AX projects with Sure step methodologies, Business process, Project Issue tracking, Environment hosting, etc. In a way LCS is slowly moving from a passive roles to getting more active and engage the Partner and customers in the project deployments.

To access these new features, create a new Project or an existing one and Click on the Cloud hosted environments. It is assumed that you have downloaded the LCS certificate and uploaded it to the Azure Portal to let LCS manage it on your behalf (Configuring and Deploying VM's).


Choose the + button to create a new Deployment,


As you notice now you have a lot more Beta environments that are prebuilt in this update compared to previous LCS releases. The new options available in the August release are,
  1. Developer/Test
  2. Retail E-Commerce
  3. Retail Essentials
  4. Retail Essentials Demo
  5. Retail Mobility
I chose to deploy the Retail Essentials Demo environment on my Azure for performing some demo scenarios. Click on Next and then relax, let LCS do all the job of copy, deploy and provision the new Demo Environment. It will take a couple of hours to get all the things up, you should be able to see the Environment getting ready on Azure. To login use the connect button on Azure to RDP to the deployed server. The User name and password to login can be found under LCS > Project > Cloud hosted environments > Environment


Enjoy doing a demo or perform a test or simply trying out the new features in AX 2012 R3 on your new Environment in under an hour.


Thursday, August 7, 2014

AX 2012 Retail POS Task Recorder

Dynamics AX 2012 has a very good task recorder function which will record the user actions performed in AX client to create as a word document or recording video. The resulting document or video in the Recording file path can be used a manual or troubleshooting guide by the users. From my experience I literally use the Task recorder to create custom user guides which can be readily used by the customers. Dynamics AX 2012 has introduced a process oriented or simply to say "structured" way of doing a task recorder by bringing in the concepts of Framework, Industry and Hierarchy levels. These are completely definable by the author as in a way it is deemed necessary of arranging the document artifacts. Also the Framework and Industry helps to create a matrix which you can use to create multiple nodes based on the hierarchy levels. Let me now get back to this post where I want to just focus on the Task recorder of the Retail POS. Yes you heard it right, the Task recorder is extended and available in Retail POS also with the same Framework and Industry. The Rich client task recorder is pretty much straight forward as you can create some nodes and add the Recording path and straight away start doing the Task recording. 

There is pretty much NIL documentation(At least until the publication of this post) if you need to know anything on the Task recording for Retail POS and how to get it working as expected like the Rich client. There are some steps that you would need to do to make sure the Task recorder start button is enabled for Retail. 
First step is using the AX client make sure you have a Hierarchy and Industry created or available, and make sure for the Retail POS the Recording mode is selected as Basic. Under the Hierarchy levels create the sequences for atleast 3 levels, may be you can provide the Levels such as Process Group, Process, Task, etc. For reference you can check the Contoso demo data. Make sure you have enabled the Allow artifacts from Sequence 3 onwards, this is the feature that enables to link the document recordings to the Nodes.
 


Then make sure to run the Data distribution job 1170 to sync these values to the Channel database. Open retail POS using manager privilege and open the Task Recorder. If the operation is not available you can choose any button and add the operation from the button properties if Design change on POS is allowed.

Choose your Framework and Industry, the New node should be enabled. Add the new node until the level where allow artifacts is enabled as shown in the above Hierarchy levels. Make sure to check the recording path is already available on the Setup.


Now do your start recording just as you would on the AX Client, after done stop and your document should be prepared with all the screenshots and steps just the way you want it.




Saturday, August 2, 2014

Dynamics AX 2012 Retail Loyalty Points Earnings are not updated Realtime from POS

Recently I came across an issue where the Retail Loyalty transactions are not updated real time back to the AX HQ. All the settings for Loyalty Programs, Schemes, Tiers and Cards were set correctly but the points update was elusive and we had no idea why it was not getting updated. When the same settings were done in an another environment it was working as expected, so we were quite sure there was some issue that was localized to the Retail POS, but not sure why it was happening.
Finally the resolution was a simple one, just Closing and Opening a New shift did the trick. It seems the settings even though are fully pushed to the POS, the loyalty specific settings was not used until and unless the worker had closed the shift. Then after this operation all the Loyalty points update was back to normal just as expected.

Please do note, if your Loyalty earnings are setup to process offline. Then they wont be updated real time that means the points shown is as of last processing of offline loyalty transactions. So the drawback is that the points cannot be used for redemption immediately. But the redemption transaction is realtime that means when the points are redeemed it is updated realtime back to HQ based on the balance points that he already has in his card.