---
schema_version: "1"
id: fd49241be8db20e39a4af0eddf6a89b84defe2b8ebdc8db8e13a98806250efe2
title: Create a Contact and Use a Formula (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_a_contact_and_use_a_formula.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_a_contact_and_use_a_formula.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ad1841685702c1c060fd112c35c5d278442983a2b6576181f2f070728a14160f
description: "For the managed package runtime, an Omnistudio Data Mapper Load creates a record in the Salesforce Contact object. A formula checks whether the contact is over 18 years old: if so, a custom Authorized field is set to true."
products:
  - Omnistudio
release: "264"
---
# Create a Contact and Use a Formula (Managed Package)

For the managed package runtime, an Omnistudio Data Mapper Load creates a record in the Salesforce Contact object. A formula checks whether the contact is over 18 years old: if so, a custom Authorized field is set to true.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

The input JSON for this Data Mapper Load contains the Contact details, for example:

```
{
   "ContactDetails": { 
      "Birthdate": "10/10/1954",
      "LastName": "Singh", 
      "Telephone": "5106345789", 
      "FirstName": "Sanjay" 
   } 
}
```

To create this example Data Mapper Load:

1. If your org Contact object does not have an Authorized field, add one (checkbox). In the following example, the authorized field is called Authorized\_\_c. Depending on your industry, you might need to add a vlocity\_cmt\_\_, vlocity\_ins\_\_, or vlocity\_ps\_\_ namespace prefix.
2. Navigate to the Data Mapper Designer tab and click **New**. The **Create: Data Mapper Interface** dialog is displayed.
3. Enter settings as follows and click **Save**:
    
    - **Data Mapper Interface Name**: A descriptive name of your choice
    - **Interface Type**: Load
    - **Input Type**: JSON
    - **Output Type**: SObject
4. On the Objects tab, click **Add Object** and choose **Contact**.
5. On the Fields tab, map fields from the JSON input to fields in the Salesforce Contact object as shown in the following table.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d76599e144">
                  <p style="margin-bottom:0;">Input JSON Path</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d76599e150">
                  <p style="margin-bottom:0;">Domain Object Field</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Input JSON Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e144 ">
                  <p style="margin-bottom:0;">ContactDetails:Authorized</p>
                </td>

                <td data-label="Domain Object Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e150 ">
                  <p>Authorized__c</p>
                  <p style="margin-bottom:0;">Depending on your industry, you might need to add a vlocity_cmt__, vlocity_ins__, or vlocity_ps__ namespace prefix.</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Input JSON Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e144 ">
                  <p style="margin-bottom:0;">ContactDetails:Birthdate</p>
                </td>

                <td data-label="Domain Object Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e150 ">
                  <p style="margin-bottom:0;">Birthdate</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Input JSON Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e144 ">
                  <p style="margin-bottom:0;">ContactDetails:FirstName</p>
                </td>

                <td data-label="Domain Object Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e150 ">
                  <p style="margin-bottom:0;">FirstName</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Input JSON Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e144 ">
                  <p style="margin-bottom:0;">ContactDetails:LastName</p>
                </td>

                <td data-label="Domain Object Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e150 ">
                  <p style="margin-bottom:0;">LastName</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Input JSON Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e144 ">
                  <p style="margin-bottom:0;">ContactDetails:Telephone</p>
                </td>

                <td data-label="Domain Object Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d76599e150 ">
                  <p style="margin-bottom:0;">Phone</p>
                </td>

              </tr>
            </tbody>
          </table>
6. On the Formulas tab, click **Add Formula** and enter a Formula of `IF(AGE(ContactDetails:Birthdate) > 18, "true", "false")` and a Formula Result Path of `ContactDetails:Authorized` as shown in the following figure.
    
    ![Figure is described in the preceding text.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/drload1_formula.png)
7. Go to the Preview tab.
8. Paste the following test data into the Input pane on the left.
    
    ```
    {
       "ContactDetails": { 
          "Birthdate": "10/10/1954",
          "LastName": "MyLastName", 
          "Telephone": "5106345789", 
          "FirstName": "MyFirstName" 
       } 
    }
    ```
9. Click **Execute**. If the load succeeds, a link to the object is displayed in the Objects Created pane, as shown in the following figure.
    
    ![The Objects Create pane lists 1-Contact followed by the Id of the new Contact.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/loading_data_into_salesforce_2.png)
10. Click the link and verify that the Authorized checkbox is checked only if the contact is over 18 years old.