Pre-select static content source
Here you can optionally preselect your data source using a JSONPath. This allows you to filter out meta tags and other information from your data source that is not relevant for use in the mailing.
Step by step
-
Open the "Pre-select" workflow step in the
"Static content" navigation item. -
Activate the "Use pre-selection" check box and enter a JSONPath.
Need support? Contact your Inxmail representative or Care-Consulting@inxmail.de so we can help you develop the right JSONPath for your data source.
Examples: JSONPath
Sample data source
Copy<?xml version="1.0"?>
<root>
<products>
<meta_data>
<date>2022-07-08 12:34</date>
<user>Max Mustermann</user>
</meta_data>
<product>
<meta>
<ID>0001</ID>
<onStock>true</onStock>
</meta>
<commondata>
<title>Produktname 1</title>
<description>Lorem ipsum dolor sit amet</description>
<img_url>http://www.url-to-image.de/product01.jpg</img_url>
<link_url>http://www.url-to-shop.de/product01</link_url>
<buttontext>Klick hier</buttontext>
<attributes>
<color>red</color>
<size>XL</size>
<rating>5</rating>
</attributes>
</commondata>
<prices>
<prefix>ab</prefix>
<value>123</value>
<currency>€</currency>
</prices>
</product>
<product>
<meta>
<ID>0002</ID>
<onStock>false</onStock>
</meta>
<commondata>
<title>Produktname 2</title>
<description>Lorem ipsum dolor sit amet</description>
<img_url>http://www.url-to-image.de/product03.jpg</img_url>
<link_url>http://www.url-to-shop.de/product03</link_url>
<buttontext>Jetzt kaufen</buttontext>
<attributes>
<color>green</color>
<size>L</size>
<rating>2</rating>
</attributes>
</commondata>
<prices>
<prefix>nur</prefix>
<value>99</value>
<currency>€</currency>
</prices>
</product>
<product>
<meta>
<ID>0003</ID>
<onStock>true</onStock>
</meta>
<commondata>
<title>Produktname 3</title>
<description>Lorem ipsum dolor sit amet</description>
<img_url>http://www.url-to-image.de/product03.jpg</img_url>
<link_url>http://www.url-to-shop.de/product03</link_url>
<buttontext>KAUFEN</buttontext>
<attributes>
<color>blue</color>
<size>S</size>
<rating>1</rating>
</attributes>
</commondata>
<prices>
<prefix>jetzt nur</prefix>
<value>13</value>
<currency>€</currency>
</prices>
</product>
</products>
</root>
JSON Path Examples
Desired selection
JSONPath
Narrowing down subnodes: Only one subnode is selected; the rest are ignored $..['commondata'] Several subnodes are selected; the rest are ignored $..['commondata','prices'] Filtering entries:
Note: Filtering entries is possible via JSONPath or using the software interface.
For filtering via software interface use:
Only the entries for a specific parameter value are displayed.
Here: Only entries for product "0001."
$..['product'][?(@.meta.ID=='0001')] Previous example – with placeholder instead of a specific product ID.
$..['product'][?(@.meta.ID=='{ID}')] Only the entries for a specific parameter value are displayed.
Here: Only products that are available ("onStock").
$..['product'][?(@.meta.onStock==true)] Combination of narrowing down the subnodes and filtering the entries: Only the entries for a specific parameter value (here: only for product) "0001") are displayed.
For this product, only entries from the "commondata" sub-node are displayed; the rest are ignored.
$..['product'][?(@.meta.ID=='0001')]['commondata'] -
Click and check the preview to see if Inxmail is correctly narrowing down your data source based on the JSONPath.
-
Once again, you can define placeholders in this step to represent different variants of your data source.
-
Save
Don't forget to save: Save your changes before moving to another workflow step.
- You've pre-selected your content source and narrowed it down to the relevant content.
Next steps
- Filter your data using selectors.
- Use the external content in your mailings.
Can’t see your current navigation item?
Check your profile to see the rights you have or get in touch with your account manager.
Did you not find what you were looking for?
-
Send us your feedback.
