Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow these instructions if you want to use a WIT donation page on an external website, for example Wordpress or Joomla.

Step A: Add External URL to white list

...

<div id="AS_WITForLightningOutContainer"></div>

<script src="https://alphasys-a.my.salesforce.com/lightning/lightning.out.js"></script>

<script>
$Lightning.use("c:AS_WITForLightningOut",

...

3. Also provide the exact name of the Lightning Component which holds the flow
a. As shown below and in the sample code snippet, the lightning component is ASFundraisingFlow

Make sure to have a unique id for <div> element which will serve as a container of the Lightning App that is going to be rendered and must match the third parameter of the component creation method.

a. <div id="AS_WITForLightningOutContainer"></div>
b. Must match the third parameter of the method createComponent.

Make sure to provide the right domain of the org to call on the lightning.out.js resource. As shown below the domain is https://alphasys-a.my.salesforce.com.

a. <script src="https://alphasys-a.my.salesforce.com/lightning/lightning.out.js"></script>

...

needed. We now mush add the AS_Campaign_Id parameter on the URL with the campaign Id value. For this example, the URL is https://webforceconnect.alphasys.com/wit-lightning- out/?AS_Campaign_Id=7015g000000xNl6AAE

As shown below the flow is successfully rendered on the created WordPress page.

...

  1. After logging in to the site, go to Content -> Articles -> Add New Article.

  2. Provide a title of the article.

  3. Apply the constructed code snippet for lightning out on the content editor and click Save button to save.

  4. Test the flow if its rendering.

    1. Our flow requires a campaign ID as reference to all the data and configurations needed. We now add the AS_Campaign_Id parameter on the URL with the campaign Id value. For this example, the URL is https://joomla-demo.alphasys.com/wit-lightning- out?AS_Campaign_Id=7015g000000xNl6AAE

...

needed. We now mush add the AS_Campaign_Id parameter on the URL with the campaign Id value. For this example, the URL is
https://drupal- demo.alphasys.com/node/1?AS_Campaign_Id=7015g000000xNl6AAE

...