You are here:
Customize Integration Procedure Settings to Apply Filters to Products (Recommended)
To apply filters to the list of product coming from the Vlocity Integration Procedure (VIP), add custom settings in the VIP for the Digital, TV, and Print media types.
This is an Advertising Sales Management on Managed Package feature. For Advertising Sales
Management on Salesforce Platform, see Advertising
Sales Management on Salesforce Platform.
| REQUIRED EDITIONS AND USER PERMISSIONS |
|---|
| Available in: Lightning Experience |
| Available in: all editions |
| REQUIRED USER PERMISSIONS | |
|---|---|
| To access Media Cloud advanced features | MediaCloudPlus Runtime |
| To create, read, update, and delete Flexcards | Omnistudio Admin |
- Create an Apex Class.
-
To implement the logic for filtering products, use this format:
public class <Name_of_Apex_Class> implements devopsimpkg19.VlocityOpenInterface, Callable { public Boolean call(String action, Map<String, Object> args) { Map<String, Object> inputMap = (Map<String, Object>) args.get('input'); Map<String, Object> outputMap = (Map<String, Object>) args.get('output'); Map<String, Object> options = (Map<String, Object>) args.get('options'); List<Object> filteredProducts = new List<Object>(); // ////////////////////////////////////////////////// // Implement the business logic here // let's say the list of products are stored in // variable `filteredProducts` // // MAKE SURE THE OUTPUT INCLUDES // "records": [] // ////////////////////////////////////////////////// outputMap.put('records', filteredProducts); return true; } } - Save your changes.
- From the App Launcher, find and select Omnistudio Integration Procedures.
-
To add a remote action and update the execution conditional formula for these media types, click the active integration procedure:
Media Types Integration Procedure Digital vplAds-GetCartProducts TV sfiAds-ExtractLinearProducts Radio sfiAds-ExtractRadioProducts Print sfiAds-ExtractPrintProducts -
After GetCachedProducts element, add a Remote Action with these details:
- For element name, enter FilterCachedProducts.
- For remote class, enter <Name_of_the_Apex_Class>.
- For remote method, enter filterCachedProducts.
- Select Send only Additional Input.
- For Additional Input, enter Product: %GetCachedProducts%.
- Click SuccessCachedResponse .
- In Execution Conditional Formula, replace GetCachedProducts to FilterCachedProducts.
