| Deleted: <p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/map.png?w=1500&ssl=1" alt="Map Icon" /> The Map function was introduced in Summer ’19 and gives us a lot more flexibility in working with the Recommendations. With the Map function we manipulate Recommendation Fields inside the Strategy, or can set custom inputs for the flow that is linked to the Recommendation.</p><p>Let’s first look an example on how to update Recommendations fields using the Map step. In this example we will change the description of the Recommendation with the Case Subject. We go back to the Branch Selector example and place the Map step behind the Branch Selector (no need to perform work on Recommendations that might never make it past the Branch Selector):</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot1.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>In the Map step we can then append the Subject of the Case to the Description in the following way:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot2.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The map step does offer the option to manipulate multiple fields in one go by adding them with the Add Field button.</p><p>The result then looks, for example, like this:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot3.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /><br /><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot4.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>You can also use this to personalise the description based on the user who is using the application. If we change the map to this:</p><p><img src="https://i2.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot5.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>Then the end-result looks like:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot6.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>You can also get access to related objects this way, if for example we append the following at the end of the map definition:</p><p><img src="https://i1.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot7.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The result looks like:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot8.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The other thing that we can do using the Map step is define a custom input argument for the flow related to the Recommendation. Let’s assume that we have a custom input variable varAccountType and we want to set this from the Strategy. On the flow, that variable is define like this:</p><p><img src="https://i2.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot9.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>Make sure that you tick the ‘Available for Input’ checkbox otherwise it can’t act as an input parameter for the flow.</p><p>Now on the Map step in Strategy we simply specify the input parameter name and specify the value:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot10.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>When we run the flow, we see that the Account Type is correctly passed to the flow:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot11.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p>
| Added: <p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/map.png?w=1500&ssl=1" alt="Map Icon" /> The Map function was introduced in Summer ’19 and gives us a lot more flexibility in working with the Recommendations. With the Map function we manipulate Recommendation Fields inside the Strategy, or can set custom inputs for the flow that is linked to the Recommendation.</p><p>Let’s first look an example on how to update Recommendations fields using the Map step. In this example we will change the description of the Recommendation with the Case Subject. We go back to the Branch Selector example and place the Map step behind the Branch Selector (no need to perform work on Recommendations that might never make it past the Branch Selector):</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot1.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>In the Map step we can then append the Subject of the Case to the Description in the following way:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot2.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The map step does offer the option to manipulate multiple fields in one go by adding them with the Add Field button.</p><p>The result then looks, for example, like this:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot3.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /><br /><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot4.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>You can also use this to personalise the description based on the user who is using the application. If we change the map to this:</p><p><img src="https://i2.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot5.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>Then the end-result looks like:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot6.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>You can also get access to related objects this way, if for example we append the following at the end of the map definition:</p><p><img src="https://i1.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot7.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The result looks like:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot8.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>The other thing that we can do using the Map step is define a custom input argument for the flow related to the Recommendation. Let’s assume that we have a custom input variable varAccountType and we want to set this from the Strategy. On the flow, that variable is define like this:</p><p><img src="https://i2.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot9.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>Make sure that you tick the ‘Available for Input’ checkbox otherwise it can’t act as an input parameter for the flow.</p><p>Now on the Map step in Strategy we simply specify the input parameter name and specify the value:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot10.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p>When we run the flow, we see that the Account Type is correctly passed to the flow:</p><p><img src="https://i0.wp.com/www.jackvandijk.nl/NBA/NBA101/mapscreenshot11.png?w=1500&ssl=1" alt="Map Screenshot" data-recalc-dims="1" /></p><p><a href="https://unofficialsf.com/the-salesforce-automation-and-decisioning-wiki/elements-3/">Back to Elements</a></p>
|