Loading
Salesforce Help 사이트 “Help Agent powered by Fin” 도입 안내더 많이 읽기
Tableau 고객 대상: Tableau를 이용하는 고객이 Help 사이트에서 사례(케이스)를 등록할 수 없는 경우의 대체 수단더 많이 읽기
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Redirect to Thank You Pages Based on Account Engagement Form Field Values

게시 일자: Sep 30, 2025
상세 설명

You can redirect a prospect to a different page based on the value they submit for a field in the form.

NOTE: The examples in the article use Account Engagement's PML variable tags. If your account has upgraded to HML, you'll want to replace the PML tags below with the corresponding HML tags found here.
This process requires custom Javascript and assumes a working knowledge of coding. This process is not officially supported and Account Engagement Support will be unable to help troubleshoot the contents of this article. 

솔루션
By placing the following code in the "thank you code" for the form (found in tab 4 "Completion Actions" in the Account Engagement form editor), we can redirect based on a field value:

<script type="text/javascript">
  switch('%%Free_Trial{js}%%') {
  case 'Free Trial':
  document.location='http://www.yoursite.com/thank-you-free-trial/';
  break;
  case 'Live Demo':
  document.location='http://www.yoursite.com/thank-you-live-demo/';
  break;
  }
</script>


This example will redirect to one location if the value is Free Trial, and another if the value is Live Demo

Notes:
○ %%Free_Trial{js}%% is the form field variable tag (JavaScript encoded).
○ Free Trial is the first value in the field we're looking for, Live Demo is the second.
○ document.location is the redirect location.

Considerations:
○ We recommend JavaScript-encoding your variable tags using {js}. This will prevent special characters from breaking your variable tag's output, and prevent arbitrary code from executing.
○ If you are using an Account Engagement form through an iframe and want to redirect the whole page, change document.location to parent.location.
○ You can add more values if needed. Just add another snippet:
case 'Subscription':
document.location='http://www.yoursite.com/thank-you-subscription/';
break;

○ In order for the script to work correctly, you must have "allow for multiple responses" unchecked in the field set-up.
Knowledge 기사 번호

000383490

 
로드 중
Salesforce Help | Article