Saturday, September 17, 2016

Configuring SMS transport in WebSphere Commerce

In E-commerce world, customers prefers to get notification SMSs in their mobile phones whenever there is an update in the orders they placed. WebSphere commerce provides an easier configuration option to integrate SMS gateways with WCS for sending SMSs. The below section explains how to configure SMS transport in WCS.

Given below is the step by step activities to be performed for the integration in your local WCS instance.

1. Login to admin console https://localhost:8002/webapp/wcs/admin/servlet/ToolsLogon?XMLFile=adminconsole.AdminConsoleLogon

2. From the top menu options, select Configuration -> Transports as shown below.



3. From the list of transports listed in this page, select SMS HTTP option and click "configure" button on the right hand side.




4. Provide the SMS gateway related information over here, including the SMS gateway endpoint/URL information and the mapping between the parameter names accepted by the gateway and WCS parameters.


In the above example, the sendMessage API accepts parameters such as message, MobileNo etc as the input. The message is mapped to "Message Key" in WCS system which will contain the SMS content to be send to the customer. MobileNo field in the API is mapped to "Receipant Key" in WCS, which holds the mobile number of the customer. (Note that the sms gateway name mentioned here is just a sample which actually doesn't exists. Please replace it with the API details of your sms gateway)

5. Save the configuration.
6. Navigate back to Configuration -> Transports option in admin console and select SMS HTTP option once again. Click "Change Status" button in the right hand side and activate the transport.


Now, let us configure the scenarios when the SMS need to be send to the user. One of the pre-defined event available in WCS for this is notifying the customer once the order is placed. Let us see how to configure the message type corresponding to this event.

1. In admin console, navigate to Configuration -> Message Types screen
2. Click on "New" button on the right side of the screen
3. select "message type" as "Message for a received order". Configure other parameters as shown in the below screen.




4. Click next. Specify the details that you have mentioned in step 4 of configuring transports above at here too and click finish.

5. Navigate back to Configuration -> Message Types screen in admin console. You can see that the newly created message type is listed on this page.

6. Click on the check box next to the message type that we newly configured and click on "change" button on the right side to activate it.

That's it. The customer will receive the SMS notifications, once the order is placed. No additional coding/customization is required for this.

 

No comments:

Post a Comment