Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          OdinAttributeFormatter Interface

          OdinAttributeFormatter Interface

          Formats an input attribute value and returns the formatted value in an output map.

          Namespace

          vlocity_cmt

          Signature

          Loosely typed

          public Boolean invokeMethod(String methodName, Map<String, Object> input, Map<String, Object> output, Map<String, Object> options)

          Default Implementation

          DefaultOdinAttributeFormatterImpl Class

          Other Implementations

          None

          Usage

          This interface is triggered when preparing a submit request payload to be sent to Vlocity Order Management.

          Methods

          Method

          Description

          DefaultOdinFormatterImpl:getFormattedAttributeValue Method

          Gets the formatted value of the input attribute.

          Example Implementation

          This example changes the attribute value of attribute data type DATE. If the date is in GMT timezone, it formats the date to the user's timezone.

          global class SampleOdinAttributeFormatterImpl implements vlocity_cmt.VlocityOpenInterface {
            public Boolean invokeMethod(String methodName,
              Map < String, Object > input,
              Map < String, Object > output,
              Map < String, Object > options) {
              if (methodName == 'getFormattedAttributeValue') {
                getFormattedAttributeValue(input, output, options);
                return true;
              }
              return false;
            }
          
            private void getFormattedAttributeValue(Map < String, Object > input,
              Map < String, Object > output,
              Map < String, Object > options) {
              //write your own logic
            }
          }
           
          Loading
          Salesforce Help | Article