Creating a basic restriction in SmartConnect is an easy process that I will cover in this article. You may want to create a restriction if you want some of your data to be ignored when sending to a destination.
Continue reading the article below, or watch the video here:
- Find the integration you want to apply the restriction. Locate the nodes at the bottom of the window
- Select and edit the node you want to restrict out. If you have multiple nodes, you may need to apply the restriction to all the nodes to avoid receiving errors when running the integration.
- Once you are in mappings of the integration find the restriction button at the top of the window.
- I will demonstrate a simple example of a condition you could use with data from your Source Columns. In this calculation, I am returning ‘False’ if the Customer Number is blank. If you return ‘False’ in a restriction, that record will be skipped and the process moves on to the next record. If you return ‘True’ the record will be processed normally.
You must use the value from the Source Columns field and always have a return condition. - Press the OK button and the Save button on the integration to save the progress you just made.
- If you followed all the steps above, you should notice that it skips all the documents that didn’t have a Customer Number when you run the integration. This can be used for many types of integrations to help send only the data that you want.
SmartConnect Web Version
- Creating a restriction for the web version of SmartConnect will be a very similar process with a few changes in the syntax and locations of some of the elements. To get started, Find the integration you want to edit and open it.
- Navigate to the Integration Tab and select the target line you would like to restrict out. Then find the Restriction button right below it.
- Here is a simple example of a condition you could use with data from your Source Columns: in this calculation, I’m returning ‘false’ if the Line Number is blank. If you return ‘false’ in a restriction, that record will be skipped and it will move on to the next record. If you return ‘true’ the record will be processed normally.
You must use the value from the Source Columns field, have an underscore [_] before the source column, and use three equals signs. This will ensure the JavaScript code is correct.
To ensure your JavaScript code is valid, use this site playcode.io/javascript as a sandbox to test JavaScript.
Have questions about using restrictions in SmartConnect or other solutions? Feel free to send us an email at support@eonesolutions.com
Did this answer your question?