Integrating Feedback Campaign

Feedback campaigns allow you to return text or products to the shop in the form of “feedback”. These campaigns are of the type (or flavour) FEEDBACK.

Feedback Text

Previous versions of FACT-Finder managed this sort of variable content using numbers. The integration project stipulated the position in the shop page at which specific feedback text numbers were to appear. The user then knew, for example, when creating feedback text number 3 that this text would appear in a specific location, such as above the search results [1]. Since version 6.7, names for the feedback text have been created and returned. For current integrations, the names of the feedback text should be used as identifiers.

The names are agreed with the shop operator during the integration project and configured accordingly in FACT-Finder. In the user interface, users can select from the predefined names.
In addition, you can specify whether or not each feedback text is able to contain HTML code. This characteristic is also returned by FACT-Finder along with the feedback text. It allows you to decide easily during the integration whether the text that is to be displayed should be html-escaped or not [2].

XML

<ff xsi:noNamespaceSchemaLocation="schema/7.2/ffresult.xsd">
  ...
  <campaigns>
    <campaign nr="0" name="feed" category="Advisors" flavour="FEEDBACK">
      <feedback>
        <text nr="0">Feedbacktext ohne HTML und ohne Bezeichner.</text>
        <text nr="3" label="above ASN" html="true">&lt;div class="message"&gt;Feedbacktext mit HTML&lt;/div&gt;</text>
      </feedback>
    </campaign>
  </campaigns>
  ...
</ff>

JSON

{"searchResult":{
  ...
  "campaigns":[
    {
      "activeQuestions":[],
      "advisorTree":[],
      "category": "",
      "feedbackTexts":[
        {
          "html":false,
          "id":0,
          "label":null,
          "text":"Feedbacktext ohne HTML und ohne Bezeichner."
        },
        {
          "html":true,
          "id":3,
          "label":"above ASN",
          "text":"<div class=\"message\">Feedbacktext mit HTML</div>"
        }
      ],
      "flavour":"FEEDBACK",
      "id":"6",
      "name":"feed",
      "pushedProductsRecords":[],
      "target":{"destination":"","name":""}
    }
  ],
  ...
} ... }

Webservice / SOAP

class FeedbackText {
int        id;
String      text;
String      label;
boolean     html;
}

Pushed Products

You can also select products for feedback campaigns. FACT-Finder returns the products list along with the campaign.

XML

<ff xsi:noNamespaceSchemaLocation="schema/7.1/ffresult.xsd">
  ...
  <campaigns>
    <campaign nr="0" name="Top-Seller" category="Products" flavour="FEEDBACK">
      <target><name/><destination/></target>
      <pushedProducts count="5">
        <product nr="0" id="247900">...</product>
        <product nr="1" id="241107">...</product>
        <product nr="2" id="247724">...</product>
        <product nr="3" id="247897">...</product>
        <product nr="4" id="247355">...</product>
      </pushedProducts>
    </campaign>
  </campaigns>
  ...
</ff>

JSON

{"searchResult":{
  ...
  "campaigns":
    [
      {
        "activeQuestions":[],
        "advisorTree":[],
        "category": "",
        "feedbackTexts":[],
        "flavour":"FEEDBACK",
        "id":"7",
        "name":"Top-Seller",
        "pushedProductsRecords":
          [
            ...
          ],
        "target":{"destination":"","name":""}
      },
    ],
  ...
} ... }

Webservice / SOAP

class Campaign {
  ...
  List<Record>           pushedProductsRecordList;
  ...
}
class Record {
  Map<String, String> record;
  String                id;
  short                simiMalusAdd;
  float                simiMalusMul;
}

The product list entries each contain the complete field list from the product record in the FACT-Finder database. However, in order to save bandwidth you can also pass the parameters idsOnly=true with the search request. In this case the content of the records is omitted.

It is possible for campaigns to be returned that contain 0 products. The user can select the option to integrate campaign products into the search results. In this case, no specific campaign product list is returned. However, a campaign is returned in order to indicate to the shop that a campaign has triggered on the search query.


[1] “Above the search results” in this instance really is simply an example. The position of the feedback text can be selected by the shop operator in the integration project.

[2] The default value for the HTML attribute is false. If the HTML attribute is not specified, this means that the feedback text may not contain HTML and must therefore be escaped.

Page Contents