November Happy Hour will be moved to Thursday December 5th.

Callback or event mechanism on Contact creation and updates

Vote:
 

Hi, 

Is there a way to subscribe to updates on contact creation and changes? We need to synchronize new contacts and changes to another system realtime, but I haven't found any documentation on such mechanism as of yet.

#331433
Edited, Oct 14, 2024 20:44
Vote:
 
#331535
Oct 16, 2024 8:58
Vote:
 

Hi Quan Mai, 

This might be a stupid question, but where should Configs\baf.data.manager.config be located? Is this some old configuration from Commerce 13? 

#331619
Oct 18, 2024 7:13
Vote:
 

The settings were moved to Mediachase.BusinessFoundation.Data.Business.Configuration.BusinessManagerOptions (optimizely.com) 

so they are now part of appSettings.json (and in JSON format of course). you can also add one like this

            services.Configure<BusinessManagerOptions>(options =>
            {
                options.Plugins.Add(
                    new RequestPlugin()
                    {
                        MetaClass = "List",
                        Method = "CustomPage",
                        EventStage = EventPipeLineStage.PostMainOperationInsideTranasaction,
                        TypeName = "Mediachase.Commerce.Customization.Plugins.CustomPageNormalizationPlugin, Mediachase.Commerce"
                    });
            });

#331620
Oct 18, 2024 8:12
Vote:
 

Hi Quan Mai,

Thanks for the info. Could you clarify how we would implement this? I expect that we create a class like public class CustomerContactHandler : IPlugin from your blog. But how do we configure commerce to use the CustomerContactHandler? Is it the MetaClass or Method or TypeName fields in the RequestPlugin? I can't figure out what the values are supposed to be of those. 

I appreciate your guidance on how to set this up.

#331622
Oct 18, 2024 8:31
Vote:
 

metaclass = the class you want to listen, in this case, Contact

Method = the method you want to listen to, usually List, Delete 

#331623
Oct 18, 2024 9:02
Quan Mai - Oct 18, 2024 9:03
that was explained in my blogpost. I was lazy and grab the next thing available to me
Vote:
 

And is typename = the namespace of the class implementing IPlugin or what is the supposed value here?

#331625
Oct 18, 2024 9:16
Quan Mai - Oct 18, 2024 9:43
yes, "typename, assemblyname"
* 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.