---
schema_version: "1"
id: a1ff2e8725083c163442ef0f627e2bf15cd9716078eb66ae3eec7c5ac9e49d47
title: ConnectApi.ScheduledRecommendationInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_scheduled_recommendation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_scheduled_recommendation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 340e25d713915dad09f9c842a298e163644721118a3e472df1d1e72bafd00b41
description: A scheduled custom recommendation.
---
# ConnectApi.ScheduledRecommendationInput

A scheduled custom recommendation.

<table class="featureTable sort_table" summary="">




          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d726617e36">Property</th>

              <th class="featureTableHeader vertical-align-top " id="d726617e39">Type</th>

              <th class="featureTableHeader vertical-align-top " id="d726617e42">Description</th>

              <th class="featureTableHeader vertical-align-top " id="d726617e45">Required or Optional</th>

              <th class="featureTableHeader vertical-align-top " id="d726617e48">Available Version</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d726617e36 d726617e48" data-title="Property"><samp class="codeph apex_code">channel</samp></td>

              <td class="entry" headers="d726617e39" data-title="Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/connectAPI_enums.htm#RecommendationChannelEnum"><samp class="codeph apex_code" id="RecommendationChannelEnum">ConnectApi.​Recommendation​Channel</samp></a></td>

              <td class="entry" headers="d726617e42" data-title="Description">A way to tie custom recommendations together. For example, display
                recommendations in specific places in the UI or show recommendations based on time
                of day or geographic locations. Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph apex_code">CustomChannel1</samp>—<span class="ph" id="customChannelDesc"><a name="customChannelDesc"><!-- --></a>Custom recommendation channel. Not used by default.
                      Work with your community manager to define custom channels.</span> For example,
                    community managers can use Experience Builder to determine where recommendations
                    appear.
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">CustomChannel2</samp>—Custom recommendation
                    channel. Not used by default. Work with your community manager to define custom
                    channels.
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">CustomChannel3</samp>—Custom recommendation
                    channel. Not used by default. Work with your community manager to define custom
                    channels.
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">CustomChannel4</samp>—Custom recommendation
                    channel. Not used by default. Work with your community manager to define custom
                    channels.
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">CustomChannel5</samp>—Custom recommendation
                    channel. Not used by default. Work with your community manager to define custom
                    channels.
                  </li>

                  <li class="li">
                    <samp class="codeph apex_code">DefaultChannel</samp>—Default recommendation
                    channel. Recommendations appear by default on the Home and Question Detail pages
                    of Customer Service and Partner Central Experience Builder templates. They also
                    appear in the feed in the Salesforce mobile web and anywhere community managers
                    add recommendations using Experience Builder.
                  </li>

                </ul>
                Use these channel values; you can’t rename or create other channels.</td>

              <td class="entry" headers="d726617e45" data-title="Required or Optional">Optional for creating a scheduled recommendation<p class="p">If not specified, defaults
                  to <samp class="codeph apex_code">DefaultChannel</samp>.</p>
                <p class="p">Don’t use when
                  updating a scheduled recommendation</p>
              </td>

              <td class="entry" headers="d726617e36 d726617e48" data-title="Property">36.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d726617e36 d726617e48" data-title="Property"><samp class="codeph apex_code">enabled</samp></td>

              <td class="entry" headers="d726617e39" data-title="Type">Boolean</td>

              <td class="entry" headers="d726617e42" data-title="Description">Indicates whether scheduling is enabled. If <samp class="codeph nolang">true</samp>, the custom recommendation is enabled and appears in Experience Cloud sites. If <samp class="codeph nolang">false</samp>, custom recommendations in feeds in Salesforce mobile web aren’t removed, but no new custom recommendations appear. In Customer Service and Partner Central sites, disabled custom recommendations no longer appear.</td>

              <td class="entry" headers="d726617e45" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d726617e36 d726617e48" data-title="Property">35.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d726617e36 d726617e48" data-title="Property"><samp class="codeph apex_code">rank</samp></td>

              <td class="entry" headers="d726617e39" data-title="Type">Integer</td>

              <td class="entry" headers="d726617e42" data-title="Description">Relative rank of the scheduled custom recommendation indicated by ascending whole numbers starting with 1.<p class="p">Setting the rank is comparable to an insertion into an ordered list. The
                  scheduled custom recommendation is inserted into the position specified by the
                  <samp class="codeph nolang">rank</samp>. The <samp class="codeph nolang">rank</samp> of all the scheduled custom recommendations after it is pushed
                  down. See <a class="xref" href="#ReorderSchedRecsEx">Ranking scheduled custom
                    recommendations example</a>.
                </p>
                <p class="p">If the specified <samp class="codeph nolang">rank</samp> is larger than
                  the size of the list, the scheduled custom recommendation is put at the end
                  of the list. The <samp class="codeph nolang">rank</samp> of the scheduled
                  custom recommendation is the size of the list, instead of the one
                  specified.</p>
                <p class="p">If a <samp class="codeph nolang">rank</samp> is not specified, the scheduled custom recommendation is
                  put at the end of the list.</p>
              </td>

              <td class="entry" headers="d726617e45" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d726617e36 d726617e48" data-title="Property">35.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d726617e36 d726617e48" data-title="Property"><samp class="codeph apex_code">recommendation​AudienceId</samp></td>

              <td class="entry" headers="d726617e39" data-title="Type">String</td>

              <td class="entry" headers="d726617e42" data-title="Description">ID of the audience for this scheduled custom recommendation.When updating a scheduled custom recommendation, specify <samp class="codeph nolang">ALL</samp> to remove the association between a custom recommendation audience and a scheduled custom recommendation.</td>

              <td class="entry" headers="d726617e45" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d726617e36 d726617e48" data-title="Property">35.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d726617e36 d726617e48" data-title="Property"><samp class="codeph apex_code">recommendation​DefinitionId</samp></td>

              <td class="entry" headers="d726617e39" data-title="Type">String</td>

              <td class="entry" headers="d726617e42" data-title="Description">ID of the custom recommendation definition that this scheduled recommendation schedules.</td>

              <td class="entry" headers="d726617e45" data-title="Required or Optional">Required to create a scheduled recommendation<p class="p">You can’t specify a <samp class="codeph nolang">recommendation​DefinitionId</samp> when updating a
                  scheduled recommendation.</p>
              </td>

              <td class="entry" headers="d726617e36 d726617e48" data-title="Property">35.0</td>

            </tr>

          </tbody>

        </table>

## Ranking scheduled custom recommendations example

If you have these scheduled custom recommendations:

| Scheduled Recommendations | Rank |
| --- | --- |
| ScheduledRecommendationA | 1 |
| ScheduledRecommendationB | 2 |
| ScheduledRecommendationC | 3 |

And you include this information in the Scheduled Custom Recommendation Input:

| Scheduled Recommendation | Rank |
| --- | --- |
| ScheduledRecommendationD | 2 |

The result is:

| Scheduled Recommendation | Rank |
| --- | --- |
| ScheduledRecommendationA | 1 |
| ScheduledRecommendationD | 2 |
| ScheduledRecommendationB | 3 |
| ScheduledRecommendationC | 4 |

#### See Also

- [createScheduledRecommendation(communityId, scheduledRecommendation)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_Recommendations_static_methods.htm#apex_ConnectAPI_Recommendations_createScheduledRecommendation_2 "Create a scheduled custom recommendation.")