API
Version 7.x > API > Ecommerce customers, link to custom table View modes: 
User avatar
Member
Member
thanos.panousis-indice - 2/28/2013 12:57:38 PM
   
Ecommerce customers, link to custom table
When editing an ecommerce customer, the support people handling cases should be able to add comment entries with date, author and text information. So each ecommerce site customer should have the following data "linked" to him:

|16/1/2013 | user1 | "customer called and asked for delivery to his door. Should call back" |
|18/1/2013 | user2 | "Called back customer, didn't pick up. Should retry." |

So this is in essence a simple ticketing mechanism for each customer.

What would be the "way to go" using Kentico? I am thinking custom tables, alternative forms but I am not sure how all this will work together. The form should be visible to customer support from the site administrator. Could you please post some advice/short walkthrought of the step we would need to take in order to develop this?

Thank you.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/1/2013 10:19:55 AM
   
RE:Ecommerce customers, link to custom table
You could add a new page to the ECommerce Customer module and allow the customer service person to view all comments for that customer and add more comments. I haven't tested this but it would be a good step in the right direction.

1. Agreed, a custom table seems like the way to go. Or even a table not marked as custom. Only benefit of a Custom Table is the ability to add/edit/delete content and schema from within the UI and perform searches within the data. If this isn't needed then just create a table in the database.
2. Create a new page called Customer_Comments.aspx in /CMSModules/Ecommerce/Pages/Tools/Customers/ that would inherit the CMSCustomersPage and have a cms:UniGrid on it to display the records entered in the custom table
3. On the newly created page, create a simple form that performs an insert to the custom table. (or create an "Edit" page do to that work)
4. Register the new page in the ECommerce module in the Site Manger>Development>Modules. Select ECommerce>Orders>Customers.
5. With Customers selected, click New Element and Enter Customer Comments for the Dislay name and Caption and enter the URL of ~/CMSModules/Ecommerce/Pages/Tools/Customers/Customer_Comments.aspx?customerId={%customerId%}&orderid={%orderid%} to your new page.

And just like that, you have the ability to view and add comments per site and customer! One thing I didn't add what the custom table schema, but I'm assuming you have that figured out that you'd need a site ID, and customer ID in there in order to bring up the records per site and customer. You can also reference the pages in the ~/CMSModules/Ecommerce/Pages/Tools/Customers/ directory to help you get some additional info, like how they get the customer ID or CustomerInfo object.

Best of luck.