---
schema_version: "1"
id: bd87b06a747aee1b0dd22766cf2756939bfc95d292818a02a537c14724ebcc60
title: UserEmailCalendarSync
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_useremailcalendarsync.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_useremailcalendarsync.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f791bc5dabcc96c3313612669f2d55ff5554c6c1594261d07cb2c8d8ac8525fe
description: Represents the user assignments of an Einstein Activity Capture configuration. This object is available in API version 49.0 and later.
---
# UserEmailCalendarSync

Represents the user assignments of an Einstein Activity Capture configuration. This object is available in API version 49.0 and later.

## Supported Calls

create(), describeSObjects(), query(), update(), upsert()

## Special Access Rules

To access this object, enable Einstein Activity Capture in your org.

## Fields

| Field | Details |
| --- | --- |
| AssignedId | 
Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the user or profile. Only Einstein Activity users can be added to a configuration.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

When an org is in the process of migrating from Lightning Sync to Einstein Activity Capture via the migration tool, the API can assign Lightning Sync users to EAC configurations. See [Working with Lightning Sync Migration Tool](https://help.salesforce.com/s/articleView?id=sales.lightning_sync_move_how_work.htm&type=5&language=en_US).















 |
| ConfigurationId | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the Einstein Activity Capture configuration. The configuration is created in Salesforce Setup. After the configuration is created, the autogenerated ID is visible on the Configurations tab. From Setup, in the Quick Find box, enter Einstein Activity Capture, and then select **Settings**. Click the Configurations tab.



 |

## Usage

Use UserEmailCalendarSync to add and remove users to an Einstein Activity Capture configuration. You can add users to a configuration via a user ID or a profile ID. You can add a profile to only one configuration and assign a profile to only one user.

This example adds two users to an Einstein Activity Capture configuration.

// Create a list of UserEmailCalendarSync records
List<UserEmailCalendarSync> usersToAdd = new ArrayList<>();

// Populate the UserEmailCalendarSync record with the ID of
// the user or profile, and with the ID of the Activity Capture configuration you are adding them to
UserEmailCalendarSync user1 = new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', AssignedId = '005xxxxxxxxxxxx');

UserEmailCalendarSync user2= new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', AssignedId = '005xxxxxxxxxxxx');

// add the UserEmailCalendarSync users to your list 
usersToAdd.add(user1);
usersToAdd.add(user2);

// Insert the list of UserEmailCalendarSync into the database
Database.SaveResult\[\] results = Database.insertImmediate(usersToAdd);

This example removes a user from an Einstein Activity Capture configuration.

To remove a user, call UserEmailCalendarSync(), passing in null for ConfigurationId.

UserEmailCalendarSync user2Remove= new UserEmailCalendarSync(ConfigurationId = "", AssignedId ='005xxxxxxxxxxxx');
Database.SaveResult results =Database.insertImmediate(user2Remove);