Versions Compared

Key

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

Version

Integrations supported

ADvendio (2.168 and up)

Broadsign

Challenge

Is there a way to simplify the process for users to access and manage bookings in external systems from ADvendio? Specifically, the process should be based on the Media Campaign or Campaign Items that are selected. It would be optimal if users could interact with an external system without having to manually search for specific bookings. Is there a solution that will allow users to handle everything themselves with ease?

...

The goal is to make it easy for users to access external systems bookings through ADvendio by selecting a Media Campaign or Campaign Item. (We are using Broadsign as a use case example here). This will enable users to perform tasks that aren't available within ADvendio. To achieve this, we suggest embedding the external system UI within ADvendio (we are using Broadsign as a use case example here) using methods such as iFrame or deep links. By doing so, users won't have to manually search for specific bookings, making their process simpler and more efficient.

Table of Contents
minLevel2
maxLevel6
outlinefalse
typelist
printablefalse

...

  • After activating the domain in CSP Trusted Sites, you can proceed to input the URL into the testing component.

Possible challenges

It is not unusual to encounter further challenges. You may come across the following problems:

Challenge 1

One potential challenge is the need for explicit permission within the sandbox input to ensure proper iFrame functionality. Failure to provide this permission, such as leaving the sandbox input empty, can result in the following console error:

Warning

Blocked script execution in '<URL>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Info

It is necessary to include the 'allow-scripts' permission in the sandbox input.

Challenge 2

However, upon adding the 'allow-scripts' permission, a new issue may arise. You might encounter the following error:

Warning

Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.

Info

It is important to include the 'allow-same-origin' permission in the sandbox input.

...

  • .

...

The sandbox input provides the flexibility to dynamically incorporate sandbox permissions based on the specific requirements of external websites for better functionality.

Info

Multiple permissions can be added to the sandbox input, but each should be separated by a space.

External System URL Components

...

This will display the component in the campaign builderCampaign Builder:

...

An example of externalSystemUrlCell is below:

Code Block
[{"name":"Period",
"columns":[{"fieldpath":"from_until"},
{"fieldpath":"ADvendio__ManualDateRange__c"},{"fieldpath":"publication_dates"},
{"fieldpath":"external_system_url"},{"fieldpath":"ADvendio__LineDescription__c"}]}
,{"name":"Pricing","columns":[{"fieldpath":"ADvendio__Quantity__c"},
{"fieldpath":"ADvendio__Frequency__c"},{"fieldpath":"ADvendio__Sales_Price__c"},
{"fieldpath":"ADvendio__SurchargeSalesPrice__c"},
{"fieldpath":"ADvendio__SurchargeSalesPricePct__c"},
{"fieldpath":"ADvendio__Amount_B3__c"}]},{"name":"Surcharges",
"columns":[{"fieldpath":"advendio__amount_b3__c"},
{"fieldpath":"advendio__surchargeb3__c"},
{"fieldpath":"advendio__surchargeb3abs__c"},{"fieldpath":"advendio__amount_b2__c"},
{"fieldpath":"advendio__surchargeb2__c"},{"fieldpath":"advendio__surchargeb2abs__c"},
{"fieldpath":"advendio__amount__c"}]}
,{"name":"Discounts",
"columns":[{"fieldpath":"ADvendio__Quantity_Discount_custom__c"},
{"fieldpath":"ADvendio__RateDiscount1AbsCustom__c"},
{"fieldpath":"advendio__rate_discount_2_custom__c"},
{"fieldpath":"advendio__ratediscount2abscustom__c"},
{"fieldpath":"advendio__rate_discount_3_custom__c"},
{"fieldpath":"advendio__ratediscount3abscustom__c"},
{"fieldpath":"advendio__rate_discount_4_name__c"},
{"fieldpath":"advendio__rate_discount_4__c"},
{"fieldpath":"advendio__ratediscount4abscustom__c"},
{"fieldpath":"advendio__amount_net__c"}]},{ "name":"Targeting",
"columns":[ {"fieldpath":"ADvendio__RequestedContents__c"},
{ "fieldpath":"targeting" } ] },{ "name":"Price Rules", "columns":[
{ "fieldpath":"price_rules" } ] }]

...

Component 2

The second component called externalSystemUrl, plays an important role in this integration. It is responsible for displaying the URL generated through the urlFieldpath configuration within the designated feature setting named ExternalSystemURL. This component can be added to a layout, enhancing user interaction and accessibility.

Important to note that the proper functioning of this component needs a valid Campaign Item ID, ensuring the smooth integration between ADvendio and external systems.

...

...

You can customize the behaviour of the iframe by adjusting the following settings:

  1. Resize the iframe to your desired dimensions.

  2. Specify a different URL for the content to be loaded.

  3. Set the referrer policy, controlling how the original page's URL is disclosed.

  4. Utilize the sandbox attribute to establish a secure browsing context for the content.

...

Both of these components require a specific feature setting to be properly configured in order for the iFrame integration to function properly. Please ensure the below values are incorporated:

Feature Setting Name

ExternalSystemURL

Feature Name

Campaign Builder

Value

{
"urlFieldpath": "ADvendio__External_System_URL__c",
"sandboxValue": "allow-scripts allow-same-origin",
"iFrameHeight": "500px",
"iFrameWidth": "100%"

}

Field Value Name

Field Value explanation

urlFieldpath

Is a field within the Campaign Item that holds the URL required for integration.

It

For your use in the Campaign Builder it's important to choose a field that is visible in the

campaign builder

Campaign Builder meaning that the value needs to be part of tabs and columns, or static columns in the item configuration. If necessary, you can even use logical fields that remain hidden from users but serve the purpose of making the URL accessible for the campaign builder.

sandboxValue

This value allows you to define sandbox permissions for the iFrame, with each permission separated by a white space. More information about sandbox values: here

iFrameHeight

This parameter specifies the height of the iFrame within the campaign builder.

Info

Note: changes to this value will not impact the layout of the externalSystemUrl component in the layouts.

iFrameWidth

This parameter specifies the width of the iFrame in the campaign builder.

Info

Note: adjustments to this value will not affect the externalSystemUrl component in the layouts.

Info

Important Note: In order for an iframe to function correctly, you must include the domain of the URL you intend to use within in SF set up and in CSP Trusted Sites settings.

...

Salesforce official documentation LWS Distortion Viewer - Salesforce Lightning Component Library highlights security concerns related to the use of windows.open method. Specifically, it warns that the method could potentially allow a user to open any URL, including URLs containing malicious code. As a result, Salesforce takes precautions to distort or modify the behaviour of the windows object to prevent any unintended or harmful actions from occurring.

...

Once you have successfully logged into the system, whether you choose to use the iFrame or windows.open method to open external content such as Broadsign. The session within Broadsign remains active.

...

Possible challenges

It is not unusual to encounter further challenges. You may come across the following problems:

Challenge 1

One potential challenge is the need for explicit permission within the sandbox input to ensure proper iFrame functionality. Failure to provide this permission, such as leaving the sandbox input empty, can result in the following console error:

Warning

Blocked script execution in '<URL>' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Info

It is necessary to include the 'allow-scripts' permission in the sandbox input.

Challenge 2

However, upon adding the 'allow-scripts' permission, a new issue may arise. You might encounter the following error:

Warning

Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.

Info

It is important to include the 'allow-same-origin' permission in the sandbox input.

Once this step is taken, the iFrame functionality should be fully restored.

...

The sandbox input provides the flexibility to dynamically incorporate sandbox permissions based on the specific requirements of external websites for better functionality.

Info

Multiple permissions can be added to the sandbox input, but each should be separated by a space.

Setup

Possible iFrame modifications

You can customize the behaviour of the iframe by adjusting the following settings:

  1. Resize the iframe to your desired dimensions.

  2. Specify a different URL for the content to be loaded.

  3. Set the referrer policy, controlling how the original page's URL is disclosed.

  4. Utilize the sandbox attribute to establish a secure browsing context for the content.

...