Loading
The Trailblazer Community is now read-only Read More
Media Cloud
Set Up Custom Fields Using Quote Line Items for the Digital Media Type

Set Up Custom Fields Using Quote Line Items for the Digital Media Type

After adding new fields to the quote line item object, update Integration Procedures to add the custom columns to the media planning grid for digital placements.

Required Editions

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.

Available in: All Editions
User Permissions Needed
To access Media Cloud advanced features MediaCloudPlusRuntime
To create, read, update, and delete Flexcards Omnistudio Admin
  1. From Setup, in the Quick Find box, enter Object Manager, and then select Object Manager. Next, click Quote Line Item, and then select Fields & Relationships.
  2. Create a field.
    The field type, details for the field, and field-level security settings are specific to your business needs. In this example, assume that we're creating a picklist field with the API name CommonPicklist__c.
  3. From the App Launcher, find and select OmniStudio FlexCards.
  4. Select the sfiAdsDigitalGrid Flexcard.
    If the Flexcard is Active, you can't edit it. First deactivate the Flexcard and then edit it.
  5. Under Pagination Grid, select sfiAdsDataGrid.
  6. To include a new column for the CommonPicklistOptions field, under Properties, edit the value of the asmColumns attribute.
    Here's an example of the edited field.
    Note
    Note The fieldName for the picklist is the API Name without the appended "__c", and the label is the label or the name that you want to show in the grid header.

    The optionField value should be in the format <fieldName>Options.

    {
    "fieldName": "CommonPicklist", // API Name of the field without "__c"
    "label": "Custom Picklist", // Any label or name to show in grid header
    "Placeholder": "--",
    "searchable": false,
    "sortable": false,
    "type": "picklist",
    "editable": true,
    "displayEditIcon": "showCommonPicklistFlag",
    "visible": true,
    "userSelectable": true,
    "optionField": "CommonPicklistOptions", // For picklist field; It should be in the format "<fieldName>Options"
    "textAlign": "left",
    "columnWidth": "7.8%",
    "hasCellError": "hasCommonPicklistError",
    "hasSpinner": "true",
    "disableIfTrue": "isWrapper"
    }
    
  7. Save your changes and activate the Flexcard.
  8. From the App Launcher, find and select OmniStudio Integration Procedures.
  9. Open sfiAds/AddPlacement, and make these changes.
    If the Integration Procedure is Active, you can't edit it. First deactivate the Integration Procedure and then edit it.
    1. Rename fetchPaginationData to fetchPaginationDataOld.
    2. Add a component fetchPaginationData after fetchPaginationDataOld, with these values:
      Remote Class. MediaAdSalesCustomFieldHandlerUM

      Remote Method. getCustomFieldForMediaPlanPlacements

      Select Send Only Additional Input.

      Under Additional Input, set paginationResponse as %fetchPaginationDataOld:result% and fieldstoFetch as <comma_separated_custom_fields_API_Name>.

      Note
      Note Enter the custom fields API Name without the appended "__c".
  10. From OmniStudio Integration Procedures, open sfiAds/GetMediaPlanPlacements, and make these changes.
    If the Integration Procedure is Active, you can't edit it. First deactivate the Integration Procedure and then edit it.
    1. Rename fetchPaginationData to fetchPaginationDataOld.
    2. Add a component fetchPaginationData below fetchPaginationDataOld, with these values:
      Remote Class: MediaAdSalesCustomFieldHandlerUM

      Remote Method: getCustomFieldForMediaPlanPlacements

      Select Send Only Additional Input.

      Under Additional Input, set paginationResponse as %fetchPaginationDetailsOld:result% and fieldsToFetch as <comma_separated_custom_fields_API_Name>.

      Note
      Note Enter the custom fields API Name without the appended "__c".
  11. From OmniStudio Integration Procedures, open sfiAds/DigitalCloneLineItems, and make these changes:
    If the Integration Procedure is Active, you can't edit it. First deactivate the Integration Procedure and then edit it.
    1. Click CloneLineItems and update thefields under Additional Input to include the comma-separated custom field API names. In this case, add the appended __c.
    2. Add the fetchPaginationData component before fetchPaginationDataOld, with these values:
      Remote Class: MediaAdSalesCustomFieldHandlerUM

      Remote Method: getCustomFieldForMediaPlanPlacements

      Select Send Only Additional Input.

      Under Additional Input, set paginationResponse to %fetchPaginationDataOld:result% and fieldToFetch as <comma_separated_custom_fields_API_Name>.

      Note
      Note Enter the custom fields API Name without the appended __c.
  12. From the Omnistudio Integration Procedures, open vplAds/UpdateConfigurePlacements, and make these changes.
    If the Integration Procedure is Active, you can't edit it. First deactivate the Integration Procedure and then edit it.
    1. Add a Remote Action before fetchPaginationData with these details:
      Element Name: UpdateCustomColumn

      Remote Class: MediaAdSalesCustomFieldHandlerUM

      Remote Method: updateCustomFieldForMediaPlanPlacements

      Select Send Only Additional Inputs.

      Under Additional Inputs, set QuoteLineItemId to %ItemId%, fieldName as %updatedColumn%, and updatedValue as %updatedValue%.

    2. Rename fetchPaginationData to fetchPaginationDataOld.
    3. Add a remote action fetchPaginationData after fetchPaginationDataOld, with these values:
      Remote Class: MediaAdSalesCustomFieldHandlerUM

      Remote Method: getCustomFieldForMediaPlanPlacements

      Select Send Only Additional Input.

      Under Additional Input, set the value of paginationResponse to %fetchPaginationDataOld:result% and fieldsToFetch to <comma_separated_custom_fields_API_Name>.

      Note
      Note Enter the custom fields API Name without the appended __c.
  13. Add the custom column on the View Summary page.
    1. From the App Launcher, find and select OmniStudio FlexCards.
    2. Open sfiAdsDigitalViewSummaryPagination.
      If the Flexcard is Active, you can't edit it. First deactivate the Flexcard and then edit it.
    3. Click sfiAdsDataGrid.
    4. Under Properties, edit the value for the asmColumns attribute to include a new column for the CommonPicklistOptions field, with editable set to false.
      Here's an example of how the edited field looks.
      Note
      Note The fieldName for the picklist is the API Name without the appended __c, and the label is the label or the name that you want to show in the grid header.The optionField must be in the format <fieldName>Options.
      {
      "fieldName": "CommonPicklist", // API Name of the field without "__c"
      "label": "Custom Picklist", // Any label or name to show in grid header
      "Placeholder": "--",
      "searchable": false,
      "sortable": false,
      "type": "picklist",
      "editable": false,
      "displayEditIcon": "showCommonPicklistFlag",
      "visible": true,
      "userSelectable": true,
      "optionField": "CommonPicklistOptions", // For picklist field; It should be in the format "<fieldName>Options"
      "textAlign": "left",
      "columnWidth": "7.8%",
      "hasCellError": "hasCommonPicklistError",
      "hasSpinner": "true",
      "disableIfTrue": "isWrapper"
      }
      
    5. Save your changes and activate the Flexcard.
 
Loading
Salesforce Help | Article