The routing rules object

The routing rules object holds information for the routing rules you have created. You can retrieve a routing rule, as well as list all routing rules within a program.

Attributes


Id string

Unique identifier for the object referred to as the Routing Rules Item Object.


Name string

Name of the routing rule.


Condition array

Array of the various sub-conditions (which are listed as separate objects) that will trigger the routing rule.

View child attributes

SubConditions array

Array of objects that contain details (which are organized as separate objects) for each sub-condition.

View child attributes

Variable enum

What the sub-condition looks for.

Possible enum arguments
IP_ADDRESSIP Address registered to a device.
SHARED_IDA partner-controlled query string parameter used in reporting.
COUNTRYWhich country traffic is sourced from.
REGIONWhich geographical region traffic is sourced from.
AD_STATUSWhat state of use the associated ad is in.
SUB_ID1A partner-controlled query string parameter used in reporting.
SUB_ID2A partner-controlled query string parameter used in reporting.
SUB_ID3A partner-controlled query string parameter used in reporting.
MP_IDimpact.com's Id for the associated partner.
DEVICE_TYPEWhat type of device the customer used to perform the step.
REF_URLUrl of the website that referred the traffic.
LANDING_PAGEUrl of the website traffic is directed to.
SKUAn Id for the subject of the ad. This is usually assigned in the product catalog.
AD_IDimpact.com's Id for the associated ad.
CURRENT_DATEDate and time that traffic was rerouted. See ISO-8601
RANDOMRouting rule will randomly grab traffic to be rerouted.
MOBILE_FALLBACKIf an ad has mobile fallback configured, this routing rule can request to reroute them to their respective app store to download an app.

Operator enum

How the Variable is applied.

Possible enum arguments
CONTAINSThe argument is a substring of what's in the `variable`. This argument is case-sensitive.
STARTS_WITHThe variable begins with the argument. This argument is case-sensitive.
ENDS_WITHThe variable ends with the argument. This argument is case-sensitive.
EQUALSThe variable is exactly equal to the argument. This argument is case-sensitive..
MATCHESThis argument is only available for the Landing Page URL. The argument expression with wildcards (`*`) and named placeholders (`{name}`) that are pattern-matched against the variable. If a match is found, the corresponding placeholders are available as symbols for the matched part of the value to construct a replacement value.
IP_RANGE The argument is a comma-separated list of IP ranges, specified as any combination of:
  • CIDR (for example for IPv4: 192.168.15.0/24 or 64:ff9b:1::/48)
  • Start - end. For example 192.168.15.0-192.168.15.255
  • Simple IP addresses. For example 192.168.15.33
The result depends on whether the IP address of the user (could be IPv4 or IPv6) falls in either of those ranges.
INThe variable equals either of the values in the comma-separated list of the argument. This argument is case-sensitive.
NOT_CONTAINSThe variable will not appear in the argument.
NOT_STARTS_WITHThe variable does not begin with the argument. This argument is case-sensitive.
NOT_ENDS_WITHThe variable does not end with the argument. This argument is case-sensitive.
NOT_EQUALSThe variable does not exactly match the argument. This argument is case-sensitive.
NOT_INThe variable is not found in the argument.
REGEXThe argument is a valid Regular expression to be tested against the variable. Learn more about regular expression. Test a regular expression.
LTThe variable is less than the argument when the variable is numeric.
Before the argument, when the variable is CURRENT_DATE the argument must be formatted as an ISO 8601 datetime string yyyy-MM-dd'T'HH:mm:ssZZ where:
  • T is a literal T.
  • The other characters represent digits for the year, month day, hour (24), minute, and second.
  • ZZ is either Z for Zulu"/UTC/GMT, or '±HH:mm for UTC offset.
GTThe variable is greater than the argument when the variable is numeric.
After the argument, when the variable is CURRENT_DATE the argument must be formatted as an ISO 8601. See LT for the format of the date string.

Values array

An array of strings that the Variable will look for.


Action enum

What traffic will experience if the routing rule is triggered.

Possible enum arguments
REDIRECTTraffic will be redirected to another web page.
BLOCKTraffic will be blocked from viewing the web page.
INTERSTITIALAn interstitial screen will appear before traffic can view the web page.

RedirectUrl string

Which web page traffic will be sent to if the routing rule is triggered.


Interstitial object

Details about the screen that will load when traffic is blocked.

View child attributes

HeaderText string

Primary text that will appear on the interstitial page or page blocker.


BodyText string

Secondary text that will appear on the interstitial page or page blocker.


RequireUserAcknowledgement boolean

Whether the interstitial needs traffic to interact with it before they can continue being routed.

View child attributes

ButtonText string

What the button on the interstitial will say. Will only appear if RequreUserAcknowledgement: true.


ButtonColor string

Hex code for the color of the button that traffic would interact with. Will only appear if RequreUserAcknowledgement: true.


RequireUserInput boolean

Whether traffic needs to have a certain parameter passed in their browser to clear the redirect interstitial.

View child attributes

UserInputs array

Array of objects that contain details for each accepted parameter to bypass the interstitial.

View child attributes

Variable enum

What parameter needs to be passed for the interstitial to clear.

Possible enum arguments
SHARED_IDThe interstitial will look at the traffic's Shared Id value. Learn more about Shared Ids.
SUB_ID1The interstitial will look at the traffic's Sub Id1 value
SUB_ID2The interstitial will look at the traffic's Sub Id2 value
SUB_ID3The interstitial will look at the traffic's Sub Id3 value
PARAM1The interstitial will look at the traffic's Param parameter value. Learn more about Shared Ids.
PARAM2The interstitial will look at the traffic's Param parameter value. Learn more about Shared Ids.
PARAM3The interstitial will look at the traffic's Param parameter value. Learn more about Shared Ids.
CUSTOMER_IDThe interstitial will look at the traffic's Customer Id value.

DisplayValue string

What Variable needs to be filled with for the interstitial to clear. This is the UI-friendly version of the parameter that needs to be passed—it may not necessarily be the same as what is passed to impact.com's database.


RegularExpression string

What is passed in Variable must be a regex match of this string. Learn more about regular expression. Test a regular expression.


ErrorMessage string

If what is passed in Variable is not a regex match of RegularExpression, this error message will appear on the interstitial.


IncludeSkipOption boolean

Whether traffic can move through the interstitial before a minimum amount of time has passed on the interstitial screen.


ShowPageAtLeastOnce boolean

Whether traffic will need to see the interstitial screen at least once before they can be redirected.


CoBranded boolean

Whether the interstitial is cobranded with a specific partner (e.g., uses a partner's logo on the screen).


CustomizeCss boolean

Whether a custom CSS file is used on the interstitial screen.


CustomCss string

If CustomizeCSS: true, the CSS file will appear.


Rank enum

What priority level a routing rule has in relation to others. If more than one routing rule has the same Rank, the one with the lower Id will take priority.

Possible enum arguments
HIGHThis routing rule has a higher priority than other routing rules.
MEDIUMThis routing rule has average priority in relation to other routing rules.
LOWThis routing rule has a lower priority than other routing rules.

State enum

What state of use the routing rule is in.

Possible enum arguments
RUNNINGRouting rule is currently active.
PAUSEDRouting rule is not currently redirecting or blocking traffic.
ENDEDThe scheduled end date for the routing rule has passed.
ARCHIVEDRouting rule was deactivated. To reactivate a routing rule, use the impact.com web app.

Uri string

A Uri that directs to one specific routing rule.


More attributes

Click to view...

StartDate datetime

If the routing rule is scheduled for a specific time frame, this will be the start date and time of the routing rule.


EndDate datetime

If the routing rule is scheduled for a specific time frame, this will be the end date and time of the routing rule.


Source enum

From where the routing rule was created.

Possible enum arguments
GENERICRouting rule was created either with the create a routing rule endpoint or on the Blocking and Redirect Technical Settings screen.
ADRouting rule was created when its associated ad was created.
COMPLIANCERouting rule was created as the result of a Compliance violation.
TASKRouting rule was created from the web app's Task Management system.

DateCreated datetime

Date and time the routing rule was first created. See ISO 8601.


DateLastUpdated datetime

Date and time the routing rule was last updated. See ISO 8601.


CreatedBy string

Which account user created the routing rule.


LastUpdatedBy string

Which account user last updated the routing rule.

{
  "Id": "4000",
  "Name": "Redirect W/ Interstitial",
  "Condition": [
    {
      "SubConditions": [
        {
          "Variable": "COUNTRY",
          "Operator": "IN",
          "Values": [
            "US"
            ],
          ...
          },
        ...  
        ] 
      } 
    ],
  "Action": "REDIRECT",
  "RedirectUrl": "https://impact.com",
  "Interstitial": {
    "HeaderText": "This is header text.",
    "RequireUserAcknowledgement": true,
    "ButtonText": "Continue",
    "ButtonColor": "00a618",
    "RequireUserInput": true,
    "UserInputs": [
      {
        "Variable": "SHARED_ID",
        "DisplayValue": "DISPLAY",
        "RegularExpression": "REGEX",
        "ErrorMessage": "This is the invalid input message."
        },
      ...
      ],
    "IncludeSkipOption": true,
    "ShowPageAtLeastOnce": true,
    "CoBranded": true,
    "CustomizeCss": true,
    "CustomCss": "{A custom css file.}"
    },
  "StartDate": "2021-04-13T00:00:00-07:00",
  "EndDate": "2021-05-13T00:00:00-07:00",
  "Source": "GENERIC",
  "Rank": "HIGH",
  "State": "PAUSED",
  "DateCreated": "2021-03-30T14:56:10-07:00",
  "DateLastUpdated": "2021-03-30T14:56:10-07:00",
  "CreatedBy": "Brand Account User",
  "LastUpdatedBy": "Brand Account User",
  "Uri": "/Advertisers/<AccountSID>/Programs/1000/BlockRedirectRules"
}
{
  "Id": "67890",
  "Name": "Block 47",
  "Condition": [
    {
      "SubConditions": [
        {
          "Variable": "IP_ADDRESS",
          "Operator": "EQUALS",
          "Values": [
            "192.168.1.101"
            ]
          }
        ]
      }
    ],
  "Action": "BLOCK",
  "Interstitial": {
    "HeaderText": "This is header text.",
    "BodyText": "This is body text."
    },
  "StartDate": "2021-03-04T00:00:00-05:00",
  "EndDate": "2021-03-05T00:00:00-05:00",
  "Source": "GENERIC",
  "Rank": "LOW",
  "State": "PAUSED",
  "DateCreated": "2021-03-03T16:11:24-05:00",
  "DateLastUpdated": "2021-03-03T16:11:24-05:00",
  "CreatedBy": "ACME Corp",
  "LastUpdatedBy": "ACME Corp",
  "Uri": "/Advertisers/<AccountSID>/Programs/1000/BlockRedirectRules/67890"
        }
{
  "Id": "5000",
  "Name": "App interstitial 14",
  "Condition": [
    {
      "SubConditions": [
        {
          "Variable": "IP_ADDRESS",
          "Operator": "EQUALS",
          "Values": [
            "192.168.1.101"
            ]
          }
        ]
      }
    ],
  "Action": "INTERSTITIAL",
  "Interstitial": {
    "HeaderText": "This is header text.",
    "BodyText": "This is body text.",
    "RequireUserAcknowledgement": false,
    "CoBranded": false,
    "CustomizeCss": false
    },
  "StartDate": "2021-03-04T00:00:00-05:00",
  "EndDate": "2021-03-05T00:00:00-05:00",
  "Source": "GENERIC",
  "Rank": "HIGH",
  "State": "PAUSED",
  "DateCreated": "2021-03-03T16:10:53-05:00",
  "DateLastUpdated": "2021-03-03T16:10:53-05:00",
  "CreatedBy": "ACME Corp",
  "LastUpdatedBy": "ACME Corp",
  "Uri": "/Advertisers/<AccountSID>/Programs/1000/BlockRedirectRules/50000"
        }