---
schema_version: "1"
id: 498286bdd0d421b5de060777dc3a6327f11dfb0cfeaab56d6a66edbcb25c7ec4
title: Abstraction Framework Methods and Patterns (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_abstraction_framework_methods_and_patterns_81432.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_abstraction_framework_methods_and_patterns_81432.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b41aebe2f2910fe3ead23b5002cd48158fc94c4641eca63fded82fdfcb861a41
description: The abstraction framework is implemented using Integration Procedures and Apex classes. The Apex classes include several methods and patterns that are used to fetch data from a specified order, match the input expected to the input received from the workflow, and then update the data based on the input received from the workflow.
products:
  - Communications
release: "264"
---
# Abstraction Framework Methods and Patterns (Managed Package)

The abstraction framework is implemented using Integration Procedures and Apex classes. The Apex classes include several methods and patterns that are used to fetch data from a specified order, match the input expected to the input received from the workflow, and then update the data based on the input received from the workflow.

![Managed Package Icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-communications-264-0-0-production-enus/444efb86-ea1e-477e-afbc-56eaac192eaf/communications/images/media_package_icon.png) _This feature is part of the Communications Cloud managed package._

Updates to data can include adding or removing a product, setting a field, or updating an attribute. The abstraction framework also provides methods to run pricing on the order.

The abstraction framework provides the following methods and patterns:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20096e56">
              <p style="margin-bottom:0;">Method</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20096e62">
              <p style="margin-bottom:0;">Pattern</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d20096e68">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Method" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e56 ">
              <p style="margin-bottom:0;">GetData</p>
            </td>

            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e62 ">
              <p style="margin-bottom:0;">None</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e68 ">
              <p style="margin-bottom:0;">The GetData method takes the input received from the workflow
                and queries the custom metadata table. Based on the input, it
                returns either a specific row or a set of rows from the custom
                metadata table.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Method" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e56 ">
              <p style="margin-bottom:0;">MatchData</p>
            </td>

            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e62 ">
              <p style="margin-bottom:0;">None</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e68 ">
              <p style="margin-bottom:0;">The&nbsp;MatchData&nbsp;method maps the target from the custom metadata
                to the values that are passed to the abstraction framework from the
                workflow. &nbsp;</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Method" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e56 ">
              <p style="margin-bottom:0;">PostData</p>
            </td>

            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e62 ">
              <ul>
                <li>
                  <p>AddProduct</p>
                </li>

                <li>
                  <p>DisconnectProduct</p>
                </li>

                <li>
                  <p>SetAttributes</p>
                </li>

                <li>
                  <p>SetAttributesTech</p>
                </li>

                <li>
                  <p>SetField</p>
                </li>

                <li>
                  <p>SetFieldTech</p>
                </li>

                <li>
                  <p>SetFieldAndAttributeTech</p>
                </li>

              </ul>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e68 ">
              <p>The&nbsp;PostData&nbsp;method performs specific operations on the
                underlying product model, based on the input received from the
                workflow. The PostData method includes various patterns to perform
                the following actions:</p>
              <ul>
                <li>
                  <p>Add a product</p>
                </li>

                <li>
                  <p>Remove a product</p>
                </li>

                <li>
                  <p>Set attributes</p>
                </li>

                <li>
                  <p>Set attributes technically - in this case, the abstraction
                    framework doesn't use an API to set an attribute but directly
                    updates an object. No validation is performed. This method can
                    be used, for example, to quickly update a description. Using
                    this pattern provides significant performance improvement
                    compared to SetAttributes.</p>
                </li>

                <li>
                  <p>Set a field &nbsp;</p>
                </li>

                <li>
                  <p>Set a field technically - in this case, the abstraction
                    framework doesn't use an API to set a field but directly updates
                    the field. No validation is performed. Using this pattern
                    provides significant performance improvement compared to
                    SetField.</p>
                </li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Method" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e56 ">
              <p style="margin-bottom:0;">Pricing</p>
            </td>

            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e62 ">
              <p style="margin-bottom:0;">None</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d20096e68 ">
              <p style="margin-bottom:0;">The Pricing method can be called after a&nbsp;PostData&nbsp;method such
                as SetAttributes, AddProduct, or Disconnect Product. This method
                runs the pricing API.&nbsp;This is useful when various changes have been
                made to the order using PostData methods without running pricing.
                Running PostData methods without pricing improves performance and
                can also help you to avoid hitting Salesforce governor limits per
                transaction. Pricing can be run either for the entire order using
                the getCartsItems API, or for a specified line item using the
                getCartsItemsById API.</p>
            </td>

          </tr>
        </tbody>
      </table>