I'm using sitecore 9.1.1.
I need to insert custom contact facet and custom interaction facet using below pipeline processor. I have already added custom values successfully in the same processor.
Personal() and WebVisit() are null hence getting error(object reference not set).
is there any other way around to get it done by injecting into args object.
public class ConvertInteractionFacet : ConvertToXConnectInteractionProcessorBase
{
public override void Process(ConvertToXConnectInteractionPipelineArgs args)
{
if (args != null)
{
//contact facet
args.XConnectContact.Personal().FirstName = "myfirstnametest";
args.XConnectContact.Personal().LastName = "mylastnametest";
//interaction facet
args.XConnectInteraction.WebVisit().SearchKeywords = "mytesting123";
}
}
}