---
schema_version: "1"
id: 2ab64447254ddef33956d0c317ea5fa7d3b1050399db18dd024a4ada1b2b8bee
title: Intelligence Action for Integration Procedures (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_intelligence_action_for_integration_procedures.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_intelligence_action_for_integration_procedures.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fd9def0f50859625028bfaf5092ddb0fbad28e78cdfc339b6226674f690ba171
description: For the managed package runtime, the Intelligence Action provides input to and runs a Vlocity Intelligence Machine.
products:
  - Omnistudio
release: "264"
---
# Intelligence Action for Integration Procedures (Managed Package)

For the managed package runtime, the Intelligence Action provides input to and runs a Vlocity Intelligence Machine.

![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).

<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="d98489e51">
                <p style="margin-bottom:0;">Property</p>
              </th>
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d98489e57">
                <p style="margin-bottom:0;">Description</p>
              </th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e51 ">
                <p style="margin-bottom:0;">Machine Developer Name</p>
              </td>

              <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e57 ">
                <p style="margin-bottom:0;">Specifies the name of the Intelligence Machine.</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e51 ">
                <p style="margin-bottom:0;">Input Data</p>
              </td>

              <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e57 ">
                <p>Specifies values for the Input Parameters of the Intelligence Machine. Typically these are:</p>
                <ul>
                  <li>
                    <p>ContextId — The Id of the person to whom the Intelligence Resources are directed. This is typically a Contact, but it can be any sObject that supports Profile Attributes.</p>
                  </li>

                  <li>
                    <p>pageSize — The number of Intelligence Resources to present to the person. This is optional. The default is 2.</p>
                  </li>

                </ul>
              </td>

            </tr>
            <tr class="">
              <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e51 ">
                <p style="margin-bottom:0;">Items to Rank Path</p>
              </td>

              <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d98489e57 ">
                <p style="margin-bottom:0;">Specifies the JSON path to the list of Intelligence Resources that the Intelligence Machine can offer the user. This is optional. By default all applicable Intelligence Resources are presented.</p>
              </td>

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

- **[Example: Create an Intelligence Machine and an Integration Procedure to Run It (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_intelligence_action_for_integration_procedures.htm&release=264.0.0&type=5)**  
    For the managed package runtime, to download DataPacks for this example:

## Example: Create an Intelligence Machine and an Integration Procedure to Run It (Managed Package)

For the managed package runtime, to download DataPacks for this example:

![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).

- Click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uTs/Tx7V5P3QUs0IG.w9exUFY7pk1SHT8K8aWrLvatX2Y70) for the Intelligence Machine, Intelligence Resource, Attribute Category, and Attribute
- Click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uIz/0ZC5EGmIdTYBgZAsHV3gsaNLcQnJIQzEauxkUvnrgQY) for the Omnistudio Data Mapper Load
- Click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uTn/64AAUP.Rl0ziqR7TOimIzgmAtlkEpJ8tB86O1q8XPGM) for the Integration Procedure

The following example presents a discount coupon to Gold Star Accounts. The high-level steps to build this example are:

1. Create a Profile Attribute Category and Attribute.
2. Create a Data Mapper Load and apply the Attribute to an Account.
3. Create an Intelligence Resource and reference the Attribute.
4. Create an Intelligence Machine and assign weights to the Attribute Category.
5. Create an Integration Procedure and retrieve the Resource for the Account.

What’s next: To perform the first two steps above, see the third example in [Omnistudio Data Mapper Load Examples (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_dataraptor_load_examples.htm&release=264.0.0&type=5 "For the managed package runtime, Data Mapper Load examples demonstrate formulas and object relationships, and working with attributes.").

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_important.png)

Important Be sure to Preview the Data Mapper Load with a GoldStarAcct value of On and save the Account Id you use. You will need this Id to test the Integration Procedure.

- **[Create an Intelligence Resource (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_intelligence_action_for_integration_procedures.htm&release=264.0.0&type=5)**  
    For the managed package runtime, create an Intelligence Resource for the Intelligence Action.
- **[Create an Intelligence Machine (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_intelligence_action_for_integration_procedures.htm&release=264.0.0&type=5)**  
    For the managed package runtime, create an Intelligence Machine for the Intelligence Action.
- **[Create an Intelligence Procedure (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_intelligence_action_for_integration_procedures.htm&release=264.0.0&type=5)**  
    For the managed package runtime, create an Intelligence Procedure for the Intelligence Action.

### Create an Intelligence Resource (Managed Package)

For the managed package runtime, create an Intelligence Resource for the Intelligence Action.

![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).

1. Create a file and name it DiscountCoupon. The extension doesn't matter.
    
    This can be an image, text, or PDF file. Making it look like a coupon is optional.
2. Go to the Vlocity Intelligence Resources tab and click **New**.
3. Give the new resource the following settings:
    
    - **Name** — Discount Coupon
    - **Is Active** — checked
    - **Effective Date** — Today's date
4. Click **Save**.
5. On the Discount Coupon page, in the Headline field, type Discount Coupon.
6. Under Training Attributes, click **ACCOUNTLEVEL**, then click **GoldStarAcct**.
7. Click **Upload Image**.
8. Browse for the file you created and click **Open**. When the Edit window appears, click **Save**.

### Create an Intelligence Machine (Managed Package)

For the managed package runtime, create an Intelligence Machine for the Intelligence Action.

![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).

1. Go to the Vlocity Intelligence Machines tab and click **New**.
2. For the **Intelligence Machine Name** and the **REST Resource Name**, type Gold Account Offers.
3. Click **Save**.
4. On the Gold Account Offers page, click in the **Select a Resource** field.
5. Select **Discount Coupon** from the list and click the **+** icon to add it.
6. Go to the WEIGHTINGS tab.
7. Click in the **Select a Category** field and select **AccountLevel** from the list.
8. Use the sliders to assign the following activity weights: View **80**, Accept **60**, Reject **40**, Decay **20**.

### Create an Intelligence Procedure (Managed Package)

For the managed package runtime, create an Intelligence Procedure for the Intelligence Action.

![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).

1. Go to the Vlocity Integration Procedures tab and click **New**.
2. Provide an **Integration Procedure Name**, a **Type**, and a **SubType**, and click **Save**.
3. Drag an Intelligence Action component into the Structure panel.
4. In the Intelligence Action, specify a **Machine Developer Name** of Gold Account Offers.
5. Under Input Data, click **Add Key/Value Pair**. Specify a **Key** of ContextId and a **Value** of %AccountId%.
6. Drag a Response Action into the Structure panel. Set the **Send JSON Path** to IntelligenceAction1.
7. Go to the Preview tab.
8. Under Input Parameters, click **Add New Key/Value Pair**. Specify a **Key** of AccountId.
9. For the **Value**, specify the Id of the Account to which you applied the GoldStarAcct Attribute.
10. Click **Execute**. The Response should look something like this:
    
    ```
    [
      {
        "targetObjectType": null,
        "targetObjectKey": null,
        "virtualResourceId": null,
        "virtualResourceData": null,
        "rejectLast": null,
        "rejectDecay": 0,
        "acceptLast": null,
        "acceptDecay": 0,
        "viewLast": null,
        "viewDecay": 0,
        "currentMachine": "Gold Star Offers",
        "contextId": "0016g00000BtNb1AAF",
        "info": null,
        "attachment": {
          "DiscountCoupon": "00P6g000002TJnlEAG"
        },
        "scaledRawScore": 0,
        "formattedAggregatedScore": 0,
        "aggregatedScore": 0,
        "componentScores": [
          {
            "scoreParameters": [],
            "scaledScore": 0,
            "normalizedScore": 0,
            "rawMaxScore": 0,
            "rawMinScore": 0,
            "scaledRawScore": 0,
            "rawMultiplier": 1,
            "rawScore": 0,
            "scoringComponentName": "VqScoringImplProfileMatch"
          }
        ],
        "resource": {
          "vlocity_ins__IsActive__c": true,
          "vlocity_ins__Headline__c": "Discount Coupon",
          "vlocity_ins__EffectiveDate__c": "2020-02-10T08:00:00.000Z",
          "SystemModstamp": "2020-02-11T22:07:37.000Z",
          "LastModifiedById": "0056g000003eBMaAAM",
          "LastModifiedDate": "2020-02-11T22:07:37.000Z",
          "CreatedById": "0056g000003eBMaAAM",
          "CreatedDate": "2020-02-11T22:07:23.000Z",
          "Name": "Discount Coupon",
          "IsDeleted": false,
          "OwnerId": "0056g000003eBMaAAM",
          "Id": "a5o6g000000MOd5AAG"
        }
      }
    ]
    ```