---
schema_version: "1"
id: 98db10a1876bb1aa77532a8c4125790ade9a74ef119cd76d21a121aab776ed2b
title: AiVisitRecommendation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/industries_einstein_objects_aivisitrecommendation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/industries_einstein_objects_aivisitrecommendation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 229b2b520e35c642db83b760e73b9eacf9f10693ef162f59be71be752971ad2f
description: Represents the details of a visit recommendation. This object is available in API version 50.0 and later.
---
# AiVisitRecommendation

Represents the details of a visit recommendation. This object is available in API version 50.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Fields

### AggregatedScore

- **Type**: double
- **Properties**: Create, Filter, Nillable, Sort
- **Description**: Aggregate score for this visit recommendation. Based on the rule score and the model score.

### AiVisitRecommendRequestId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort
- **Description**: ID of the visit recommendation request associated with this record.

### IsLatest

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort
- **Description**: Indicates if the recommendation is the latest recommendation.

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed a record related to this record.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed this record.

### ModelScore

- **Type**: textarea
- **Properties**: Create, Nillable
- **Description**: The score provided by the machine-learning model.

### Name

- **Type**: string
- **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort
- **Description**: Name of the visit recommendation.

### OwnerId

- **Type**: reference
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: ID of the user associated with this record.

### RecommendationDecision

- **Type**: picklist
- **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
- **Description**: Status of the recommendation request.
- **Possible values**:
    - ACCEPTED—Scheduled
    - ACCEPTED\_FAILED—Failed to Schedule
    - ACCEPTED\_PENDING—Scheduling In Progress
    - RECOMMENDED—Recommended
    - REJECTED—Ignored

### RecommendationDecisionComment

- **Type**: textarea
- **Properties**: Create, Nillable, Update
- **Description**: Details about why a recommendation was accepted or rejected.

### RecommendationReason

- **Type**: textarea
- **Properties**: Create, Nillable
- **Description**: Details about why this visit is recommended.

### RuleScore

- **Type**: double
- **Properties**: Create, Filter, Nillable, Sort
- **Description**: The score provided by the recommendation strategy.

### VisitDate

- **Type**: date
- **Properties**: Create, Filter, Group, Sort
- **Description**: Recommended date on which the site must be visited.

### VisitSiteId

- **Type**: reference
- **Properties**: Create, Filter, Group, Nillable, Sort
- **Description**: ID of the location for which visit is recommended.