Dear Friends,
As we know that there is a standard AX functionality (after configuring e-mail notification profiles), which helps us sending e-mail notifications from AX once the customer gets created through online channels (along with many other scenarios; like sales order creation, order confirmation etc).
But this does not
works, in case we need to use it upon creation of new customers from AX, or
from EPOS or MPOS. To achieve this, we need to do some customizations following
the standard coding technique (which can be injected for customer creation,
based upon the requirement); and this will help us using this standard
functionality of e-mail notification.
·
We need to put data in
“RetailEventNotificationTable” to use the standard e-mail notification
functionality.
·
There is an abstract class called “RetailENInfo”;
which takes care of all these e-mail notifications which gets triggered. We
need to inject the code in “construct” method to initiate our code.
·
There is one more abstract class called
“RetailOENInfo” (which extends “RetailENinfo”), and gets used for configuring
the parameters and other default values. We need to inject our codes in
“getToAddr”, “initParameterMap” methods to put our business logic for sending
the e-mail to the customer e-mail being provided in customer master. Also we
need to create one “parm” method over here, for fetching the complete tuple
related to the customer account.
·
We need to create one new class (extending the
standard “RetailOENInfo” class (as being done for all other event
notifications). In this class, we need to do method overriding for the standard
method “resolveSalesOrder” of “RetailOENInfo” class; and we also need to do
method overriding for standard method “eventNotificationType” of “RetailENInfo”
class.
·
Once all these codes are completed, the
following code can be injected (as this example is creating record in
“RetailEventNotificationTable” table from “newCustomer” method of
“RetailTransactionServiceCustomer” class, which gets used for new customer
creation from EPOS or MPOS). In case there is a requirement of sending the
notification upon creation of customers from AX; this portion of code can be
injected in “insert” method of “CustTable” table as well.
thanks for sharing this valuable article. Would expect more like this in future
ReplyDeleteThank you :)
Delete