Try our conversational search powered by Generative AI!

Add notes to contact Dynamically


We are using Episerver commers 8.16.1 and I am looking for a way to add notes to the customer dynamicly. Any Help would be appreciated. 

Dec 29, 2015 20:55


By dynamically you mean programmatically? By code?


Dec 30, 2015 17:31
var note = new EntityObject("ContactNote");
note["ContactId"] = new PrimaryKeyId(new Guid("{id-of-your-customer-contact}"));

note["NoteTitle"] = "...";
note["NoteContent"] = "...";

var pk = BusinessManager.Create(note);

Other properties you may be interested in:

- CreatorId

- ModifierId

- NoteType

Dec 30, 2015 23:36

Yes by code. I need to add a note to the customer object much like a note can be added to the order object. So that the note will be viewable in the commers manger when you are looking at contat->notes.

Dec 31, 2015 18:14

As you want to see this field in Commerce Manager, therfore you can create a metafield (Notes) for Contact Object, Update that field in your code, pseudo code will be something like

customContact["NewMetafIeld"] = "customer notes"



Jan 03, 2016 18:01

There are 2 types of built-in notes for contact object: ordinary notes and order notes. code above adds new ordinary note to the contact and it's available for admins via Commerce Manager UI.

Jan 03, 2016 20:45
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.