Use Time based operators to pull information for a specific timeframe within a Query.

Examples of API Calls for Create Query by using various time-based operators.

Example Calls

Contains “on today” new query criteria

<Envelope>
  <Body>
    <CreateQuery>
    <PARENT_LIST_ID>348328</PARENT_LIST_ID>
    <QUERY_NAME>xli_test_create_Q10</QUERY_NAME>
    <VISIBILITY>1</VISIBILITY>
    <CRITERIA>
      <EXPRESSION criteria_type="behavior">
        <CONJUNCTION>AND</CONJUNCTION>
        <OPERATOR>has visited web page</OPERATOR>
        <WEB_PAGE>http://www.ibm.com</WEB_PAGE>
        <TIMEFRAME>on today</TIMEFRAME>
      </EXPRESSION>
    </CRITERIA>
    <CreateQuery>
  </Body>
</Envelope>

Contains “Less Than or More Than” new query criteria

<Envelope>
  <Body>
    <CreateQuery>
    <PARENT_LIST_ID>348328</PARENT_LIST_ID>
    <QUERY_NAME>xli_test_create_Q10</QUERY_NAME>
    <VISIBILITY>1</VISIBILITY>
    <CRITERIA>
      <EXPRESSION criteria_type="behavior">
        <CONJUNCTION>AND</CONJUNCTION>
        <OPERATOR>has visited web page</OPERATOR>
        <WEB_PAGE>http://www.ibm.com</WEB_PAGE>
        <TIMEFRAME>less than</TIMEFRAME>
        <VALUE>80</VALUE>
        <TIME_UNIT>days</TIME_UNIT>
      </EXPRESSION>
    </CRITERIA>
    <CreateQuery>
  </Body>
</Envelope>

Contains “Within the last” new query criteria

<Envelope>
  <Body>
    <CreateQuery>
    <PARENT_LIST_ID>348328</PARENT_LIST_ID>
    <QUERY_NAME>xli_test_create_Q10</QUERY_NAME>
    <VISIBILITY>1</VISIBILITY>
    <CRITERIA>
      <EXPRESSION criteria_type="behavior">
        <CONJUNCTION>AND</CONJUNCTION>
        <OPERATOR>has visited web page</OPERATOR>
        <WEB_PAGE>http://www.ibm.com</WEB_PAGE>
        <TIMEFRAME>within the last</TIMEFRAME>
        <VALUE>80</VALUE>
        <TIME_UNIT>days</TIME_UNIT>
      </EXPRESSION>
    </CRITERIA>
    <CreateQuery>
  </Body>
</Envelope>

Contains “Before Today” new query criteria

<Envelope>
  <Body>
    <CreateQuery>
    <PARENT_LIST_ID>348328</PARENT_LIST_ID>
    <QUERY_NAME>xli_test_create_Q10</QUERY_NAME>
    <VISIBILITY>1</VISIBILITY>
    <CRITERIA>
      <EXPRESSION criteria_type="behavior">
        <CONJUNCTION>AND</CONJUNCTION>
        <OPERATOR>has visited web page</OPERATOR>
        <WEB_PAGE>http://www.ibm.com</WEB_PAGE>
        <TIMEFRAME>before today</TIMEFRAME>
      </EXPRESSION>
    </CRITERIA>
    <CreateQuery>
  </Body>
</Envelope>

Join The Discussion

Your email address will not be published. Required fields are marked *