1

I have created custom token using steps provided by Sitecore. when I have send an email it will not replace token value

https://doc.sitecore.com/developers/exm/90/email-experience-manager/en/create-a-custom-personalization-token.html

https://doc.sitecore.com/users/90/sitecore-experience-platform/en/configure-the-import-contacts-wizard-to-include-custom-contact-facets.html

Token NAME : $typeofcustomer$

enter image description here

1

Seems like "typeofcustomer" is your custom facet, make sure you've configured everything correctly for custom facets. I've explained in below blogs. https://sitecorehacks.wordpress.com/2020/08/02/sitecore-xconnect-custom-facets-part-i/ https://sitecorehacks.wordpress.com/2020/08/22/sitecore-xconnect-custom-facets-part-ii/

Once you're sure, your custom facet is set up correctly and values are being saved against that facet. Follow below steps for custom token:

1.Create a custom dispatch task:

  • Create a custom dispatch task class Eg. CustomerDispatchTask.cs -> In this class, in the GetContacts method, return your custom facet along with default facets.enter image description here
  • Update the Sitecore.EmailExperience.ContentManagement.config enter image description here
  1. Override the default token map:
  • Create your custom token map by adding your custom token. Eg. CustomerPropertyTokenMap.cs
  • Replace the recipients/recipientPropertyTokenMap element in App_Config\Sitecore\EmailExperience\Sitecore.EmailExperience.Core.config file with your custom token map. enter image description here

Refer to this post: https://sitecorehacks.wordpress.com/2021/01/10/sitecore-exm-custom-tokens/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.