Loading
Connect in real time with the Trailblazer Community in Slack Open BetaRead More
Media Cloud
Customize Integration Procedure Settings to Apply Filters to Products (Recommended)

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.

Managed Package Icon 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
  1. Create an Apex Class.
  2. 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;
    }
    }
    
  3. Save your changes.
  4. From the App Launcher, find and select Omnistudio Integration Procedures.
  5. 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
  6. 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%.
  7. Click SuccessCachedResponse .
  8. In Execution Conditional Formula, replace GetCachedProducts to FilterCachedProducts.
 
Loading
Salesforce Help | Article