Query Manipulation Server 25.4
Query Manipulation Server Help

# Example Dynamic Promotion Rule

The following QMS rule returns when you send a query for promotions that contains one or more of the terms orange, melon, or fruit in the query text. QMS then returns the results of a Content component query for the text pumpkin from the `food` database.

    #DREREFERENCE dynamic_promotion
    #DRETITLE dynamic_promo_1
    #DREDBNAME ACTIVATED
    #DREFIELD QMSAGENTBOOL="orange OR melon OR fruit"
    #DREFIELD DYNAMIC_DATABASEMATCH="food"
    #DREFIELD PROMOTION_NAME="Top promotions"
    #DREFIELD QMSTYPE="3"
    #DREFIELD DYNAMIC_QUERY_TEXT="pumpkin"
    #DREFIELD FIELDTEXTRESTRICTION="MATCH{fruit}:TYPE"
    #DREFIELD ALWAYSACTIVE="True"
    #DRECONTENT
    ORANGE MELON FRUIT
    #DREENDDOC

For example, the following query to QMS returns this promotion:

    action=Query&Text=melon&Promotions=True

It sends the following query to Content to retrieve the promotion documents:

    action=Query&Text=pumpkin&FieldText=MATCH{fruit}:TYPE&DatabaseMatch=food

NOTE: For queries where a synonym rule database restriction applies, you can specify multiple databases in the `DatabaseMatch` request parameter by separating them with a plus symbol or a space.

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Query Manipulation Server 25.4

Topic Title: Example Dynamic Promotion Rule