I have a custom activity type in Marketing Automation
that is being processed correctly in the MA journey, however I am unable to retrieve a custom facet from the IContactProcessingContext
in the Invoke()
method.
The custom facet is configured in xConnect
and, as far as I can tell, the relevant JSON models and DLLs are deployed. xConnect
collects and stores the facet with no issues and I can see the custom facet data in an xConnect ODATA
query.
On the Automation Engine I have:
- Model DLL in automation root
- Activity type DLL in automation root
- Activity type registration XML in
{root}\App_Data\Config\sitecore\MarketingAutomation
- Collection Model registration XML in
{root}\App_Data\Config\sitecore
Both of the XML files have the filename format sc.xxxx.xml
as per here
The model registration XML is being picked up by the engine because I made a change and it errored on startup.
Sitecore version 9.1 initial release. Running local dev environment.
Model registration is as per below:
<Settings>
<Sitecore>
<XConnect>
<Services>
<XConnect.Client.Configuration>
<Options>
<Models>
<CustomModel>
<TypeName>Foo.Foundation.Models.xConnectModels.CollectionModel, Foo.Foundation.Models</TypeName>
</CustomModel>
</Models>
</Options>
</XConnect.Client.Configuration>
</Services>
</XConnect>
</Sitecore>
</Settings>
Facet retrieval in Activity Type:
string memberFacetKey = Foo.Foundation.Models.xConnectModels.MemberInfo.DefaultFacetKey;
string personalInfoFacetKey = PersonalInformation.DefaultFacetKey;
//Null result:
MemberInfo memberInfoFacet = context.Contact.GetFacet<MemberInfo>(memberFacetKey);
//Results returned:
PersonalInformation personalInfoFacet = context.Contact.GetFacet<PersonalInformation>(personalInfoFacetKey);
Any suggestions as to what I need to do in order to get the Automation Engine to find the custom facet ?