Post Processor
    • PDF

    Post Processor

    • PDF

    Article summary

    The navigation point Post Processor contains the following elements:

    The Post Processor area is used to edit global fields, questionnaire fields and product recommendations.

    • add-global-field: Element with which a field is created. The content of the field can be displayed on the result page in the top, bottom and product section.

    • get-question-value: Is used in combination with the Select a question element from the Fields navigation item. The platform uses this to check if a specific question in the questionnaire has been answered (i.e. if the input is not empty ). The result of the expression is always a text (string).

    • is-selected: Is used in combination with the Select an answer element from the Fields navigation item. The platform uses this to check whether a specific answer has been selected in the questionnaire.

    • remove-recommendation: Element, with which products are removed from the recommendation.

    ⚠️ Note on the configuration of the following examples

    The following examples show exemplary rules. In order to display the result of a rule (i.e. the content of a created field) on the result page, the field must always also be configured via the Result Page workbench navigation item. For the sake of clarity, we do not show this step in the examples. Please refer to the related article.


    Example 1: Checking the condition whether a specific answer has been selected

    Rule: IF the answer brush (= "Pinsel") is selected, THEN the platform generates the text field Text-Pinsel with the content You need brushes. (= "Sie brauchen Pinsel.")

    1. Open Logic in the right-hand navigation and drag the if-do element into the workspace.

    2. Switch to Post Processor and drag is-selected next to if-do.

    3. Switch to Fields, drag Select to answer next to is-selected and select the answer from the dropdown (example: brush).

    4. Switch to Post Processor, drag add global field next to do and enter a name for the field (example: Text-Pinsel).

    5. Switch to Text, drag My text next to add global field and enter the text to be displayed on the result page (example: You need brushes).


    Example 2: Checking the condition whether a Number Input Field contains a value (= is not empty)

    Rule: IF the number field Add amount (= "Anzahl eintragen") contains a value (i.e. if the user enters a value there in the questionnaire), THEN any action is carried out. The action is not further defined here.

    1. Open Logic in the right-hand navigation and drag the if-do element into the workspace.

    2. Switch to Post Processor and drag is-selected next to if-do.

    3. Switch to Fields, drag Select an answer next to is-selected and select the Number Input Field from the dropdown (example: enter the number).


    Example 3: Converting values from number input fields to numbers

    Rule: The value entered by the user in the user input field of the question How many brushes do you need ? is interpreted by the platform as a numerical value.

    1. Open Math in the right-hand navigation and drag the num element into the workspace.

    2. Switch to Post Processor and drag get-question-value next to num.

    3. Switch to Fields, drag Select a question next to is-selected and select the question from the dropdown (example: How many brushes do you need ?).


    Example 4: Delete products with a specific attribute from the recommendation

    In the following example, we want to ensure that all products containing the value white (= "weiß") in the attribute color (= "Farbe") are removed from the recommendation. The color attribute is part of the imported product data.

    Rule:

    All products from the list of product data are checked in a loop.

    IF the product attribute color contains the value white, THEN all products that contain this value are removed from the recommendation (in other words: no more recommendations for white color appear on the result page).

    1. Open the Loop navigation item and drag the for-each-item element into the workspace.

    2. Click in the item field and type in product.

    3. Switch to the Variables navigation item and drag the get element next to for-each-product. Enter products in the empty field (so that the loop runs through all products).

    4. Switch to the Logic navigation point and drag the do-if element next to the do element.

    5. Drag the contains element next to the if element.

    6. Switch to the Fields navigation item and drag the get-of element next to the contains element. In the free field, enter the name of the attribute that the platform should search for the value (example: color; = Farbe).

    7. Switch to the Variables navigation point and drag the get element next to the get-of element. Enter the same value in the free field as in the loop element (example: product).

    8. Switch to the navigation point Text and drag the element My text below the element get-color-of-get product. Type in the value you are looking for (example: white; = "weiß").

    9. Switch to the navigation point Post Processor and drag the element remove-recommendation next to the element do.

    10. Right-click to copy the element get-products from the first line and paste it next to remove-recommendation.


    Was this article helpful?

    What's Next