--- title: "Targeting Rules Usage Notes" slug: "targeting-rules-usage-notes" updated: 2026-09-21T14:44:58Z published: 2026-09-21T14:44:58Z canonical: "help.tritondigital.com/targeting-rules-usage-notes" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.tritondigital.com/llms.txt > Use this file to discover all available pages before exploring further. # Targeting Rules Usage Notes The usage notes below should help you understand targeting rules in TAP. > [!NOTE] > Also see: > > - [Content Targeting and Content Access](/user/docs/content-targeting-and-content-access) Use caution and good logic when creating composite targeting rules; there are no validation checks to ensure your rules do not contradict each other. When matching and not matching items, bear in mind the differences between all listed items and all possible items that could exist. For example, if you want to include all device families except smart speakers, there are three ways to approach this: - Option (a): Select **Match** for all device families except **Smart speaker**. - Option (b): Select **Not match** for **Smart speaker**. This is the recommended approach. - Option (c): A combination of both that selects **Match** for all device families except **Smart speaker**, and another rule that selects **Not match** for **Smart speaker**. ![](https://cdn.document360.io/7124b381-0a94-401a-abbd-9df9c4ea5dff/Images/Documentation/image-1684388999985.png?sv=2026-02-06&spr=https&st=2026-10-14T16%3A51%3A36Z&se=2026-10-14T17%3A51%3A36Z&sr=c&sp=r&sig=5ij65deVasTXG1wl6lGDB7PqHHBFNp9uPMgaCIEDFik%3D) Here's why: - Option (a): Selecting Match for all device families except **Smart speaker** means the targeting engine will only target the selected items, which in this case includes **Unspecified**. It will not target unknown devices that are not included in the list of **Match** items. And it will not target any new device family items that are added to the system after the rule is created. Since your goal is to only exclude smart speakers, which by extension means include everything else, this rule does not meet your needs. - Option (b): Selecting **Not match** for **Smart speaker** has no affect on what is included. All device families that the targeting engine encounters, even ones it does not recognize, are included except for smart speakers. - Option (c): Combining both rules is unnecessarily complicated and redundant, and it comes with the same problems as described in option (a). ## Use the JSON Editor The JSON editor is intended for experienced API developers and practitioners. Do not attempt to use the JSON editor if you are not familiar with [JSON](https://en.wikipedia.org/wiki/JSON) formatting and [formatting targeting rules](/user/docs/formatting-targeting-rules). The JSON editor provides direct access to the underlying JSON (JavaScript Object Notation) code that defines targeting rules in the Triton Digital Booking API. This can be useful for seeing the underlying values and dimensions, such as when you want to discover a specific program or episode ID. It can also be used by experienced coders to insert rules from their own templates. To access a rule's JSON code, select **Switch to JSON editor** in the **⋯** options menu. ![](https://cdn.document360.io/7124b381-0a94-401a-abbd-9df9c4ea5dff/Images/Documentation/image-1684389202039.png?sv=2026-02-06&spr=https&st=2026-10-14T16%3A51%3A36Z&se=2026-10-14T17%3A51%3A36Z&sr=c&sp=r&sig=5ij65deVasTXG1wl6lGDB7PqHHBFNp9uPMgaCIEDFik%3D) The rule opens in the JSON editor. If you have not already created a rule, the JSON editor window will be empty. To switch back, select **Switch to UI editor** in the **⋯** options menu. ![](https://cdn.document360.io/7124b381-0a94-401a-abbd-9df9c4ea5dff/Images/Documentation/image-1684389220392.png?sv=2026-02-06&spr=https&st=2026-10-14T16%3A51%3A36Z&se=2026-10-14T17%3A51%3A36Z&sr=c&sp=r&sig=5ij65deVasTXG1wl6lGDB7PqHHBFNp9uPMgaCIEDFik%3D) ### Edit JSON - Changes to the JSON code are validated as you type. - Valid JSON does not necessarily mean the rule is valid. - If you enter invalid JSON, a warning appears at the top of the JSON editor. You cannot return to the UI editor until you have fixed the JSON error. - If you cannot resolve the JSON error, you can abandon the rule by returning to the Flights list, or to the Campaigns list. You are asked to confirm you want to leave the page. When you leave the page, changes to your targeting rule after your last save are abandoned. - If you create an invalid rule that uses valid JSON, then switch back to the UI editor before you save the flight, the result is unpredictable. You will likely see a blank screen; refresh the page to return to the flight. You might end up with a rule that prevents delivery, or the invalid rule might be deleted. - If you create an invalid rule that uses valid JSON, then try to save the flight while still in the JSON editor, in most cases the invalid rule is flagged and the flight is not saved. - TAP catches rule errors such as using invalid values, but it won't necessarily catch logical errors such as matching or not matching the same value. Use caution when coding targeting rules in JSON. ![](https://cdn.document360.io/7124b381-0a94-401a-abbd-9df9c4ea5dff/Images/Documentation/image-1684389269363.png?sv=2026-02-06&spr=https&st=2026-10-14T16%3A51%3A36Z&se=2026-10-14T17%3A51%3A36Z&sr=c&sp=r&sig=5ij65deVasTXG1wl6lGDB7PqHHBFNp9uPMgaCIEDFik%3D)