SAP Knowledge Base Article - Public

3234823 - CMT : CPQ: Cannot write CTX SFDC Query Tag in Email Notification Template


CPQ: Cannot write CTX SFDC Query Tag in Email Notification Template


Applies To:  


This article will inform you that CPQ does not support CTX Query Tag in Email Notification.

The following tags did not work in Email Notification as they will return no values since email notification does not hold a SFDC session:

  • <*CTX( SFDC.Opportunity.tfcrmOpportunityId__c )*>
  • <*CTX( SFDC.Account.AccountNumber )*>
  • <*CTX(SFDC.Opportunity.Account_Owner__c )*>
  • <*CTX( SFDC.Query(SELECT AccountNumber FROM Account WHERE ID IN ( SELECT ACCOUNTID FROM OPPORTUNITY WHERE ID ='<*CTX( Quote.Opportunity.Id )*>')) )*>

Workaround for this issue is to use a custom field to pull in the SFDC value and parse that custom field value into the desire email notification.

1. Since email notification does not hold a SFDC session to send information, you will need to create a custom field containing a CTX SFDC Query Tag that will pull in your desire SFDC value. Click here to find out how to create one.

For this example, we have already created a CPQ Custom Field, Jason1, to pull in the amount field from SFDC.






2. Once custom field is created, paste the custom field tag into email notification.

In this example, our custom field name is "Jason1" and we're using a CTX tag to pull in this custom field value (i.e. <*CTX( Quote.CustomField(Jason1) )*>).


3. Trigger the email notification and you should see your value being displayed in the email:




  • If value is not displaying within your email notification, check to see if CTX tag is valid.
  • If value is not displaying in your Custom Field, check to see if SFDC query is valid.



KBA , CEC-SAL-CPQ , Sales Cloud CPQ , How To


SAP CPQ all versions