9.4 How to set up the Self service components?

Challenge:

When using our Self Service, customers can face the challenge of customizing it according to their specific requirements. They need a way to configure various components and elements to create a tailored Self Service experience.

Solution:

To address this challenge, we have developed multiple components that can be reused in Flows. These components provide flexibility and allow customers to customize their Self Service to suit their needs. In the following section, we will explain all the configurable options available:

 

Version

2.135 and up

License

Self Service

Please find a full list of the components below:

Component

Purpose

Component

Purpose

Campaign creation

Set campaign parameters such as name, campaign goal, runtime and budget.

Audience selection

Define the audiences you would like to reach with your ads.

Result list

Receive products that fit to your search criteria and add them to your basket.

Shopping cart

Get an overview of your basket and make some last minute changes such as quantities or removing products from the basket.

Payment

Get an invoice in order to pay the invoice.

Create records / Save

Simplifying the save process and taking care of saving applied Commitment Conditions as well as Targeting Groups (audiences) which were matched.

 

You can start setting up your Self Service by creating a Digital Experience. Please find the steps right here: https://advendio.atlassian.net/wiki/spaces/SO/pages/388792547

Flow creation

After the Community is set up you will need to create a flow or you can choose to edit our flow template. You can do this by entering the Setup of your Salesforce org.

When you enter “Flows” in the Quick Search Bar you will be able to open that point under the section Process Automation.

If you do not know Flows well we recommend doing the following trailhead from Salesforce: https://trailhead.salesforce.com/content/learn/modules/flow-basics

Create a new flow and select the type screen flow. You can select a layout type. Choose whatever you prefer.

You can select the existing flow called “Self Service ADvendio Package Flow Version 1”.

Campaign creation

The first step is to add a new screen component to the flow.

On the left side under the section, Custom you will find the component Campaign Creation. Add it to the screen.

Sometimes you might need to cancel the component and add it again in order to see all components on the left side (only initially).

 

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

no

Budget Selection

Please select the budget selection mode that should be used in the campaign creation.

Possible values are:

  • Input

  • Slider

This will result in showing either a sliding bar or a text input field for you to specify your budget amount/impressions.

text

slider

Input

no

Budget Type

Please select the budget type that should be used in the campaign. You can take the decision for the user already or leave the choice to him.

Possible values are:

  • Impression

  • Revenue

  • Impression & Revenue

text

Revenue

Input

no

budgetMax

Set the maximum number of revenue budget that should be selectable.

number

20,000

Input

no

budgetMin

Set the minimum number of revenue budget that should be selectable.

number

500

Input

no

budgetStep

Set the step value for revenue budget that should be applied while using the slider.

number

500

Input

no

goals

Enter a custom setup of the Campaign Goals to customize them for your needs.

JSON string

please see below the table

Input

no

impressionsBudgetMax

Set the maximum number of impression budget that should be selectable.

number

20,000

Input

no

impressionsBudgetMin

Set the minimum number of impression budget that should be selectable.

number

500

Input

no

impressionsBudgetStep

Set the step value for impression budget that should be applied while using the slider.

number

500

Input

no

Info Text

Enter an info text that will be shown below the budget in order to give a hint to the user.

text

empty

Input

no

Media Campaign Id

If you are working with already saved campaigns please set the Media Campaign id here.

id of a Media Campaign

empty

Input

yes

mediaCampaign

Enter the variable of a Media Campaign that can be used for saving the Media Campaign to be configured virtually.

record variable of data type Media Campaign

empty

Output

yes

mediaCampaign

Enter the variable of the Media Campaign from above in order to hand over the entered parameters to the next component.

record variable of data type Media Campaign

empty

This Campaign Creation component uses input for goals in order to be more dynamic. This is the default configuration if no other input is provided in the setup of the component:

[ { "label":"Brand Awareness", "description":"Increase the awareness and visibility of a brand.", "iconName":"standard:catalog", "picklistValue":"brand awareness" }, { "label":"Conversion", "description":"Execute specific actions such as making a purchase.", "iconName":"custom:custom26", "picklistValue":"conversion" }, { "label":"Reach", "description":"Reach the maximum number of people in your target group.", "iconName":"standard:customers", "picklistValue":"reach" } ]

The format can be built like this:

  • label : Define how the goal name should be displayed.

  • description : Enter a description to let the users understand what this goal means.

  • iconName : Enter a name for the icon that fits to your goal. You can use all icons from this library: https://www.lightningdesignsystem.com/icons/
    Please keep in mind to add “standard:” or “custom:” in front of the icon name as you can see in the example above.

  • picklistValue : Enter the API name of the goal value in your Media Campaigns Campaign Goal field in order to match it later to the results.

  • translations : You can add translations for other languages to your setup. Please find below an example for a German translation. If you want to translate this for another language please replace “de” with the language code from this list: https://help.salesforce.com/articleView?id=faq_getstart_what_languages_does.htm&type=5

    "translations": { "de": { "label": "Markenbekanntheit", "description": "Ziel ist es die Bekanntheit je Zielgruppe zu erhöhen." } }

We recommend using a JSON online formatter to ensure a correct JSON string. For example you could use this one: https://jsonformatter.curiousconcept.com/#

After adding the component to your screen flow connect an arrow from the start object to the Campaign Creation component.


Audience

The second step is to add a new screen component to the flow.

On the left side under the section, Custom you will find the component Audience. Add it to the screen.

 

Available filters

There is a total of 5 available filters for your Audience. Available filters are Media Type, Formats, Ad Type, Impressions and Price.

Only 3 of these filters can be displayed on your result page. The combination of filters can be configured based on your selection. See the screenshot below:

 

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Use values from when the user last visited the screen”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

Media Campaign

Enter the variable of the Media Campaign from the first component to take over the Media Campaign parameters.

record variable of data type Media Campaign

empty

Input

yes

Selected Targeting Groups

Enter a variable for Targeting Groups in order to load the entered parameters when navigating between different screens.

collection (Allow multiple values) variable of data type Targeting Group

empty

Input

no

Media Campaign Id

If you are working with already saved campaigns please set the Media Campaign id here.

id of a Media Campaign

empty

Input

no

Targetings

Enter a custom setup of the Audience selection to customize it for your needs.

JSON string

please see below

Output

no

Media Campaign

Enter the variable of the Media Campaign from the first screen in order to hand over the parameters to the next component.

record variable of type Media Campaign → should be left empty

empty

Output

no

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Output

yes

Selected Targeting Groups

Enter a variable of Targeting Groups in order to hand over the entered parameters to the next component.

collection (Allow multiple values) variable of data type Targeting Group

empty

This Audience component uses an input for targetings in order to be more dynamic. This is the default configuration if no other input is provided in the setup of the component:

[{ "categories": "Geography - Country;Geography - City;Geography - Region", "header": "Where do your potential customers live?", "categoryText": "Countries", "type": "lookup" }, { "categories": "Age", "header": "What are the age cohorts you wish to target?", "categoryText": "Age", "type": "picker" }, { "categories": "Gender", "header": "What genders do you wish to target?", "categoryText": "Gender", "type": "checkbox" }, { "categories": "Interest", "header": "Do your potential customers have any of these interests?", "categoryText": "Interest", "type": "checkbox" } ]

The format can be built like this:

  • categories : Targeting Group category, it can be multiple ones, if thats the case they must be separated with a “;” like “category1;category2”.

  • header : The header that will be shown above the input. You can use it as a question to explain to the users what to enter here.

  • categoryText : A label that will be shown above the input field and below the header. Here you could use the category name.

  • type : The type of the input, currently there are 3 types accepted which you can use interchangeably:

    • checkbox

    • lookup

    • picker

We recommend using a JSON online formatter to ensure a correct JSON string. For example you could use this one: https://jsonformatter.curiousconcept.com/#

After adding the component to your screen flow connect an arrow from the Campaign Creation component to your newly created Audience component.


Select Products

The third step is to add another new screen component to the flow.

On the left side under the section, Custom you will find the component Result List. Add it to the screen.

Linear split

When the Linear split is enabled, it helps distribute the budget quantity evenly across campaign items, see Linear Split Enabled below:

 

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

campaignItems

Enter a variable to save the Campaign Items that will start to be created in this component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Input

no

Check Availability Enabled

Please enter a value that defines if an availability check should be done when starting the Result List or not.

boolean

false

Input

no

Items per Check Availability Job

This value defines how many items will be included in one availability job at the same time. The number affects the speed how fast results are coming in. The default of 10 is a well balanced value between not waiting too long but putting enough items together to not have too many jobs running in the end.

number

10

Input

yes

Media Campaign

Enter the variable of the Media Campaign from the first component to take over the Media Campaign parameters.

record variable of data type Media Campaign

empty

Input

no

Media Campaign Id

If you are working with already saved campaigns please set the Media Campaign id here.

id of a Media Campaign

empty

Input

yes

Targeting Group Ids

Enter the existing variable for Targeting Groups in order to load the entered parameters on this screen.

collection (Allow multiple values) variable of data type Targeting Group

empty

Output

yes

Campaign Item Related List

The variable to hold all the information about Campaign items with related records, e.g. applied Commitment Conditions, Contents or Targeting Groups.

text variable

empty

Output

yes

campaignItems

Enter the variable from the Input parameters again to hand over the Campaign Items in the basket to the next component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Output

yes

Media Campaign

Enter the variable of the Media Campaign from the first screen in order to hand over the parameters to the next component.

record variable of type Media Campaign

empty

Output

no

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Output

yes

Targeting Group Ids

Enter the existing variable of Targeting Groups in order to hand over the values to the next component.

collection (Allow multiple values) variable of data type Targeting Group

empty


Shopping cart

The fourth step is to add another new screen component to the flow.

On the left side under the section, Custom you will find the component Summary. Add it to the screen.

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

Campaign Item Related List

The variable to hold all the information about Campaign items with related records, e.g. applied Commitment Conditions, Contents or Targeting Groups.

text variable

empty

Input

yes

Campaign Items

Enter the variable from the third screen to load the basket items into this component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Input

yes

Media Campaign

Enter the variable of the Media Campaign from the first component to take over the Media Campaign parameters.

record variable of data type Media Campaign

empty

Input

no

Media Campaign Id

If you are working with already saved campaigns please set the Media Campaign id here.

id of a Media Campaign

empty

Input

yes

Targeting Group Ids

Enter the existing variable for Targeting Groups in order to load the entered parameters on this screen.

collection (Allow multiple values) variable of data type Targeting Group

empty

Output

yes

Campaign Item Related List

The variable to hold all the information about Campaign items with related records, e.g. applied Commitment Conditions, Contents or Targeting Groups.

text variable

empty

Output

yes

campaignItems

Enter the variable from the third screen to hand over the Campaign Items in the basket to the next component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Output

yes

Media Campaign

Enter the variable of the Media Campaign from the first screen in order to hand over the parameters to the next component.

record variable of type Media Campaign

empty

Output

no

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Output

yes

Targeting Group Ids

Enter the existing variable of Targeting Groups in order to hand over the values to the next component.

collection (Allow multiple values) variable of data type Targeting Group

empty

The Summary component will calculate the VAT values based on the Media Campaign information. To calculate VAT rates please keep in mind to

  • either set manually the needed information in the virtual Media Campaign by using an assignment component (Fields to be set then are the debtor and depending on your VAT set up the following: VAT Rate % Type 1A, Type 1B, Type 2A and Type 2B).

  • or you could also receive the relevant details by creating the Media Campaign before getting to the screen and then query the calculated details for the VAT calculation before starting the summary screen. You would still need to define the debtor to be set in the Media Campaign before creation.


Creating records

Now you might want to create the records in order to prepare everything for the payment.

To save all the rest of the configured records we created the Save component for records. We recommend you use this after the summary component and before the Payment and Creative components.

Add a new screen component to the flow.

On the left side under the section, Custom you will find the component selfSave. Add it to the screen.

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

Campaign Item Related List

The variable to hold all the information about Campaign items with related records, e.g. applied Commitment Conditions, Contents or Targeting Groups.

text variable

empty

Input

yes

campaignItems

Enter the variable from the third screen to load the basket items into this component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Input

yes

Media Campaign

Enter the variable of the Media Campaign from the first component to take over the Media Campaign parameters.

If you are working with already saved campaigns please make sure to have the record id field filled in the Media Campaign variable.

record variable of data type Media Campaign

empty

Output

yes

Media Campaign

Enter the variable of the Media Campaign from the first screen in order to hand over the parameters to the next component.

record variable of type Media Campaign

empty

Output

yes

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Output

yes

saved Campaign Items

Enter the variable from the third screen to update the basket items which were saved in component.

collection (Allow multiple values) variable of data type Campaign Item

empty

The Save component will

  • Save the Media Campaign (if not done before)

  • Save the Campaign Items related to the Media Campaign

  • Save related Targeting Groups (and their connected Contents if applicable)

  • Save related Commitments conditions (if applicable)


Payment

The next step is to add another new screen component to the flow.

On the left side under the section, Custom you will find the component Payment. Add it to the screen.

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

Campaign Items

Enter the variable from the third screen to load the basket items into this component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Input

yes

Media Campaign

Enter the variable of the Media Campaign from the first component to take over the Media Campaign parameters.

record variable of data type Media Campaign

empty

Input

no

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Input

yes

Targeting Group Ids

Enter the existing variable for Targeting Groups in order to load the entered parameters on this screen.

collection (Allow multiple values) variable of data type Targeting Group

empty

Output

yes

Campaign Items

Enter the variable from the third screen to hand over the Campaign Items in the basket to the next component.

collection (Allow multiple values) variable of data type Campaign Item

empty

Output

no

Debtor Account

In case you needed to complete the billing address in the component this will deliver the updated debtor account that will need to be updated in the flow directly afterwards.

record variable of data type Account

empty

Output

yes

Media Campaign

Enter the variable of the Media Campaign from the first screen in order to hand over the parameters to the next component.

record variable of type Media Campaign

empty

Output

no

Media Campaign Id

(not relevant for now)

id of a Media Campaign

empty

Output

yes

Targeting Group Ids

Enter the existing variable of Targeting Groups in order to hand over the values to the next component.

collection (Allow multiple values) variable of data type Targeting Group

empty


Create Invoices

After the user decided how he wants to pay in the next step the invoices need to be created so that the user receives the invoice via mail and can download it directly into the system.

To set this up a few new elements are needed in the flow.

The first one needed is an action (not a screen). In the search, you will need to enter “FlowInvocableProcess“. The parameters for the action are explained below. You can define the input parameter by checking the toggle next to parameters to true. The output parameters need to be defined by setting the checkbox “Manually assign variables” to true in the Advanced section for the component. For the transaction control you can select the recommended value (Let the flow decide).

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

action

Enter the action that will be called to create the invoices: “CreateInvoices”

string, “CreateInvoices“

empty

Input

yes

parameters

Enter the variable that holds the Media Campaign Ids to be invoiced.

collection (Allow multiple values) variable of data type text

empty

Output

no

message

Enter a text variable to hold possible messages.

text variable

empty

Output

yes

results

Enter a collection variable for data type text that can hold the invoice ids after creating the Pre-Invoices.

collection (Allow multiple values) variable of data type text

empty

Output

no

status

Enter a text variable to hold the status.

text variable

empty

After creating this element the next step is to loop through the Pre-Invoice Ids (received from the previous component) in order to start the Billing Run job.

For each item of the collection, a new screen will be called that needs to be added. The component is called Billing Run Initiator.

The parameters on the right-hand side of the component are explained below. The output parameters need to be defined by setting the checkbox “Manually assign variables (advanced)” to true in the Advanced section for the component. You should also set the radio button in the “Revisit Screen Values” section to true saying “Refresh inputs to incorporate changes elsewhere in the flow”.

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input/Output

Required?

Parameter

Meaning

Value format

Default value

Input

yes

preInvoiceId

Enter the variable that holds the current item from the loop.

current item from the loop

empty

Output

no

Error Messages

Enter a text variable to hold possible messages.

text variable

empty

Output

yes

preInvoiceId

Enter the variable that hold the current item from the loop.

current item from the loop

empty

Output

no

Status

Enter a text variable to hold the status.

text variable

empty

After adding the Billing Run Initiator screen to your flow you can use an assignment element to collect the Invoice Ids that were created. You can use those Ids or the Media Campaign Id for example to show a success screen to your user with the link to see the created Campaign or Invoice.


Please find below a screenshot of how your setup could look now. This flow overview does not contain error-handling elements yet. To add it please read further below.

 

After this, you can simply save and activate your flow. Now the last step is to place your flow in your Self Service portal (Site) at the right place.


Error Handling

A good user experience is essential to keep your users on the page. Good error handling is needed to give the customer a good feeling when using the Self Service. In order to enable good error handling we suggest the improvements which are pointed out below for your flow. We ensure good error handling while using the screens. Nevertheless, you might need to work with enhancements, e.g. to validate given inputs.

Validate inputs

Some fields may be marked as required but the navigation to the next page is still possible. In order to disable this you will need to use decision elements that guide the user back to the original screen showing an error at the top or bottom of the page.

Faults for DML operations

For the creation of records, Salesforce offers by default to add a second “fault” path for your element (Create, Update or Delete records). You should use this in order to show validation rules or similar errors a user could run into.

Faults in the Invoicing Process

The invoicing process can throw a few errors when the given data are not complete as expected. In these cases, you should use the status output as well as the message/error outputs in order to decide if an error message is needed or if the user can proceed with the flow.

Component

Error Status

Output variable holding the status

Output variable holding the error message

Component

Error Status

Output variable holding the status

Output variable holding the error message

FlowInvocableProcess (CreateInvoices)

ERROR

status

message

flowBillingRunInitiator

failure

Status

Error Messages