Open topic with navigation

# 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 an IDOL Server 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 IDOL Server 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.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm