Skip to content

The open alternative to Salesforce, designed for AI.

Email campaigns 1/4: give each delivery its own row (#25122)

neo773edf80bc37b27
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1788200700000-create-campaign-delivery.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1788200700000-create-campaign-delivery.ts
new file mode 100644
index 00000000000..b8cf475336d
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1788200700000-create-campaign-delivery.ts
@@ -0,0 +1,27 @@
+import { QueryRunner } from 'typeorm';
+
+import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator';
+import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
+
+@RegisteredInstanceCommand('2.38.0', 1788200700000)
+export class CreateCampaignDeliveryFastInstanceCommand implements FastInstanceCommand {
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query('CREATE TABLE "core"."campaignDelivery" ("workspaceId" uuid NOT NULL, "id" uuid NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "campaignId" uuid NOT NULL, "personId" uuid NOT NULL, "recipientEmail" character varying NOT NULL, "state" character varying NOT NULL DEFAULT \'QUEUED\', "skipReason" character varying, "failureReason" character varying, "claimToken" uuid, "claimExpiresAt" TIMESTAMP WITH TIME ZONE, "providerMessageId" character varying, "sentAt" TIMESTAMP WITH TIME ZONE, "deliveredAt" TIMESTAMP WITH TIME ZONE, "bouncedAt" TIMESTAMP WITH TIME ZONE, "complainedAt" TIMESTAMP WITH TIME ZONE, "rejectedAt" TIMESTAMP WITH TIME ZONE, "renderingFailedAt" TIMESTAMP WITH TIME ZONE, CONSTRAINT "CHK_CAMPAIGN_DELIVERY_CLAIM_HAS_LEASE" CHECK ("state" <> \'SENDING\' OR "claimExpiresAt" IS NOT NULL), CONSTRAINT "CHK_CAMPAIGN_DELIVERY_CLAIM_IS_WHOLE" CHECK (("claimToken" IS NULL) = ("claimExpiresAt" IS NULL)), CONSTRAINT "PK_ceb21bdf267212ad5d7e0c3ce75" PRIMARY KEY ("id"))');
+ await queryRunner.query('CREATE UNIQUE INDEX "IDX_CAMPAIGN_DELIVERY_PROVIDER_MESSAGE_ID" ON "core"."campaignDelivery" ("workspaceId", "providerMessageId") WHERE "providerMessageId" IS NOT NULL');
+ await queryRunner.query('CREATE INDEX "IDX_CAMPAIGN_DELIVERY_COUNTS" ON "core"."campaignDelivery" ("workspaceId", "campaignId", "state") ');
+ await queryRunner.query('CREATE INDEX "IDX_CAMPAIGN_DELIVERY_EXPIRED_CLAIM" ON "core"."campaignDelivery" ("claimExpiresAt") WHERE "state" = \'SENDING\'');
+ await queryRunner.query('CREATE INDEX "IDX_CAMPAIGN_DELIVERY_UNFINISHED" ON "core"."campaignDelivery" ("campaignId") WHERE "state" IN (\'QUEUED\', \'SENDING\')');
+ await queryRunner.query('CREATE UNIQUE INDEX "IDX_CAMPAIGN_DELIVERY_UNIQUE" ON "core"."campaignDelivery" ("campaignId", "personId") ');
+ await queryRunner.query('ALTER TABLE "core"."campaignDelivery" ADD CONSTRAINT "FK_9121b71f743c6f44efa2357021c" FOREIGN KEY ("workspaceId") REFERENCES "core"."workspace"("id") ON DELETE CASCADE ON UPDATE NO ACTION');
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query('ALTER TABLE "core"."campaignDelivery" DROP CONSTRAINT "FK_9121b71f743c6f44efa2357021c"');
+ await queryRunner.query('DROP INDEX "core"."IDX_CAMPAIGN_DELIVERY_UNIQUE"');
+ await queryRunner.query('DROP INDEX "core"."IDX_CAMPAIGN_DELIVERY_UNFINISHED"');
+ await queryRunner.query('DROP INDEX "core"."IDX_CAMPAIGN_DELIVERY_EXPIRED_CLAIM"');
+ await queryRunner.query('DROP INDEX "core"."IDX_CAMPAIGN_DELIVERY_COUNTS"');
+ await queryRunner.query('DROP INDEX "core"."IDX_CAMPAIGN_DELIVERY_PROVIDER_MESSAGE_ID"');
+ await queryRunner.query('DROP TABLE "core"."campaignDelivery"');
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-upgrade-version-command.module.ts
index 4030e4ba14b..a240e2d0e8c 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-upgrade-version-command.module.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-upgrade-version-command.module.ts
@@ -9,6 +9,7 @@ import { EnableEditLayoutAcrossAppCommand } from 'src/database/commands/upgrade-
import { BackfillLinkedTimelineActivityHappensAtCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1787914663665-backfill-linked-timeline-activity-happens-at.command';
import { ConfigureTimelineActivityHappensAtCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1787918663365-configure-timeline-activity-happens-at.command';
import { PinAskAiCommandMenuItemCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1787938100000-pin-ask-ai-command-menu-item.command';
+import { SyncMessageCampaignSchemaCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788200701000-sync-message-campaign-schema.command';
import { ReownObjectNavigationCommandMenuItemsCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788166853000-reown-object-navigation-command-menu-items.command';
import { ProvisionMissingObjectNavigationCommandMenuItemsCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788181550000-provision-missing-object-navigation-command-menu-items.command';
import { EnableStandardActivityTargetFieldsCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788197000000-enable-standard-activity-target-fields.command';
@@ -37,6 +38,7 @@ import { WorkspaceMigrationModule } from 'src/engine/workspace-manager/workspace
BackfillLinkedTimelineActivityHappensAtCommand,
ConfigureTimelineActivityHappensAtCommand,
PinAskAiCommandMenuItemCommand,
+ SyncMessageCampaignSchemaCommand,
ReownObjectNavigationCommandMenuItemsCommand,
ProvisionMissingObjectNavigationCommandMenuItemsCommand,
EnableStandardActivityTargetFieldsCommand,
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788200701000-sync-message-campaign-schema.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788200701000-sync-message-campaign-schema.command.ts
new file mode 100644
index 00000000000..761f73f30e7
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/2-38-workspace-command-1788200701000-sync-message-campaign-schema.command.ts
@@ -0,0 +1,568 @@
+import { Command } from 'nest-commander';
+
+
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { FieldMetadataType, MessageCampaignStatus } from 'twenty-shared/types';
+import { MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'src/database/commands/upgrade-version-command/2-38/constants/message-campaign-standard-object-universal-identifiers.constant';
+import { ProvisionedWorkspaceCommandRunner } from 'src/database/commands/command-runners/provisioned-workspace.command-runner';
+import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator';
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
+import { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+import { buildNavigationCommandMenuItemOperationsOrThrow } from 'src/database/commands/upgrade-version-command/2-10/utils/build-navigation-command-menu-item-operations-or-throw.util';
+import { collectMessageCampaignStandardUniversalIdentifiers } from 'src/database/commands/upgrade-version-command/2-38/utils/collect-message-campaign-standard-universal-identifiers.util';
+import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
+import { findFlatEntityByUniversalIdentifier } from 'src/engine/metadata-modules/flat-entity/utils/find-flat-entity-by-universal-identifier.util';
+import { getExistingOrStandardFlatEntityOrThrow, getStandardFlatEntitiesToCreateOrThrow } from 'src/database/commands/upgrade-version-command/2-10/utils/get-standard-flat-entities-to-create-or-throw.util';
+import { isDefined } from 'twenty-shared/utils';
+import { type FlatCommandMenuItem } from 'src/engine/metadata-modules/flat-command-menu-item/types/flat-command-menu-item.type';
+import { type FlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/types/flat-entity-maps.type';
+import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
+import { type FlatIndexMetadata } from 'src/engine/metadata-modules/flat-index-metadata/types/flat-index-metadata.type';
+import { type FlatObjectMetadata } from 'src/engine/metadata-modules/flat-object-metadata/types/flat-object-metadata.type';
+import { type FlatPageLayout } from 'src/engine/metadata-modules/flat-page-layout/types/flat-page-layout.type';
+import { type FlatPageLayoutTab } from 'src/engine/metadata-modules/flat-page-layout-tab/types/flat-page-layout-tab.type';
+import { type FlatPageLayoutWidget } from 'src/engine/metadata-modules/flat-page-layout-widget/types/flat-page-layout-widget.type';
+import { type FlatSearchFieldMetadata } from 'src/engine/metadata-modules/flat-search-field-metadata/types/flat-search-field-metadata.type';
+import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
+import { type FlatViewField } from 'src/engine/metadata-modules/flat-view-field/types/flat-view-field.type';
+import { type FlatViewFieldGroup } from 'src/engine/metadata-modules/flat-view-field-group/types/flat-view-field-group.type';
+import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
+
+const MESSAGE_CAMPAIGN = STANDARD_OBJECTS.messageCampaign;
+const CAMPAIGN_STATUS_FIELD = MESSAGE_CAMPAIGN.fields.status;
+
+@RegisteredWorkspaceCommand('2.38.0', 1788200701000)
+@Command({
+ name: 'upgrade:2-38:sync-message-campaign-schema',
+ description:
+ 'Bring existing workspaces to the MessageCampaign schema: standard objects, search, campaign metadata and message delivery metadata',
+})
+export class SyncMessageCampaignSchemaCommand extends ProvisionedWorkspaceCommandRunner {
+ constructor(
+ protected readonly workspaceIteratorService: WorkspaceIteratorService,
+ private readonly applicationService: ApplicationService,
+ private readonly workspaceCacheService: WorkspaceCacheService,
+ private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
+ ) {
+ super(workspaceIteratorService);
+ }
+
+ override async runOnWorkspace(args: RunOnWorkspaceArgs): Promise<void> {
+ await this.syncStandardObjects(args);
+ await this.makeCampaignSearchable(args);
+ await this.syncCampaignMetadata(args);
+ }
+
+ private async syncStandardObjects({
+ workspaceId,
+ options,
+ }: RunOnWorkspaceArgs): Promise<void> {
+ const isDryRun = options.dryRun ?? false;
+
+ const {
+ flatObjectMetadataMaps,
+ flatFieldMetadataMaps,
+ flatIndexMaps,
+ flatSearchFieldMetadataMaps,
+ flatViewMaps,
+ flatViewFieldMaps,
+ flatViewFieldGroupMaps,
+ flatPageLayoutMaps,
+ flatPageLayoutTabMaps,
+ flatPageLayoutWidgetMaps,
+ flatCommandMenuItemMaps,
+ } = await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatObjectMetadataMaps',
+ 'flatFieldMetadataMaps',
+ 'flatIndexMaps',
+ 'flatSearchFieldMetadataMaps',
+ 'flatViewMaps',
+ 'flatViewFieldMaps',
+ 'flatViewFieldGroupMaps',
+ 'flatPageLayoutMaps',
+ 'flatPageLayoutTabMaps',
+ 'flatPageLayoutWidgetMaps',
+ 'flatCommandMenuItemMaps',
+ ]);
+
+ const personObjectMetadata =
+ flatObjectMetadataMaps.byUniversalIdentifier[
+ STANDARD_OBJECTS.person.universalIdentifier
+ ];
+
+ if (!isDefined(personObjectMetadata)) {
+ this.logger.warn(
+ `person object not found for workspace ${workspaceId}, skipping MessageCampaign standard metadata sync`,
+ );
+
+ return;
+ }
+
+ const { twentyStandardFlatApplication } =
+ await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
+ { workspaceId },
+ );
+
+ const now = new Date().toISOString();
+
+ const { allFlatEntityMaps: standardAllFlatEntityMaps } =
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now,
+ workspaceId,
+ twentyStandardApplicationId: twentyStandardFlatApplication.id,
+ });
+
+ const universalIdentifiers =
+ collectMessageCampaignStandardUniversalIdentifiers({
+ standardAllFlatEntityMaps,
+ });
+
+ const objectMetadatasForNavigation =
+ MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.map(
+ (universalIdentifier) =>
+ getExistingOrStandardFlatEntityOrThrow<FlatObjectMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatObjectMetadataMaps,
+ existingFlatEntityMaps: flatObjectMetadataMaps,
+ universalIdentifier,
+ }),
+ );
+
+ const navigationCommandMenuItemOperations =
+ buildNavigationCommandMenuItemOperationsOrThrow({
+ existingFlatCommandMenuItemMaps: flatCommandMenuItemMaps,
+ objectMetadatasForNavigation,
+ applicationId: twentyStandardFlatApplication.id,
+ workspaceId,
+ now,
+ renamedCollisionObjectMetadatas: [],
+ });
+
+ const allFlatEntityOperationByMetadataName = {
+ objectMetadata: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatObjectMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatObjectMetadataMaps,
+ existingFlatEntityMaps: flatObjectMetadataMaps,
+ universalIdentifiers: universalIdentifiers.objectMetadata,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ fieldMetadata: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatFieldMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatFieldMetadataMaps,
+ existingFlatEntityMaps: flatFieldMetadataMaps,
+ universalIdentifiers: universalIdentifiers.fieldMetadata,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ index: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatIndexMetadata>({
+ standardFlatEntityMaps: standardAllFlatEntityMaps.flatIndexMaps,
+ existingFlatEntityMaps: flatIndexMaps,
+ universalIdentifiers: universalIdentifiers.index,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ searchFieldMetadata: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatSearchFieldMetadata>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatSearchFieldMetadataMaps,
+ existingFlatEntityMaps: flatSearchFieldMetadataMaps,
+ universalIdentifiers: universalIdentifiers.searchFieldMetadata,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ view: {
+ flatEntityToCreate: getStandardFlatEntitiesToCreateOrThrow<FlatView>({
+ standardFlatEntityMaps: standardAllFlatEntityMaps.flatViewMaps,
+ existingFlatEntityMaps: flatViewMaps,
+ universalIdentifiers: universalIdentifiers.view,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ viewFieldGroup: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatViewFieldGroup>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatViewFieldGroupMaps,
+ existingFlatEntityMaps: flatViewFieldGroupMaps,
+ universalIdentifiers: universalIdentifiers.viewFieldGroup,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ viewField: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatViewField>({
+ standardFlatEntityMaps: standardAllFlatEntityMaps.flatViewFieldMaps,
+ existingFlatEntityMaps: flatViewFieldMaps,
+ universalIdentifiers: universalIdentifiers.viewField,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ pageLayout: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatPageLayout>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatPageLayoutMaps,
+ existingFlatEntityMaps: flatPageLayoutMaps,
+ universalIdentifiers: universalIdentifiers.pageLayout,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ pageLayoutTab: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatPageLayoutTab>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatPageLayoutTabMaps,
+ existingFlatEntityMaps: flatPageLayoutTabMaps,
+ universalIdentifiers: universalIdentifiers.pageLayoutTab,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ pageLayoutWidget: {
+ flatEntityToCreate:
+ getStandardFlatEntitiesToCreateOrThrow<FlatPageLayoutWidget>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatPageLayoutWidgetMaps,
+ existingFlatEntityMaps: flatPageLayoutWidgetMaps,
+ universalIdentifiers: universalIdentifiers.pageLayoutWidget,
+ }),
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [],
+ },
+ commandMenuItem: {
+ flatEntityToCreate: [
+ ...getStandardFlatEntitiesToCreateOrThrow<FlatCommandMenuItem>({
+ standardFlatEntityMaps:
+ standardAllFlatEntityMaps.flatCommandMenuItemMaps,
+ existingFlatEntityMaps: flatCommandMenuItemMaps,
+ universalIdentifiers: universalIdentifiers.commandMenuItem,
+ }),
+ ...navigationCommandMenuItemOperations.flatEntityToCreate,
+ ],
+ flatEntityToDelete: [],
+ flatEntityToUpdate:
+ navigationCommandMenuItemOperations.flatEntityToUpdate,
+ },
+ };
+
+ const totalOperationCount = Object.values(
+ allFlatEntityOperationByMetadataName,
+ ).reduce(
+ (total, operations) =>
+ total +
+ operations.flatEntityToCreate.length +
+ operations.flatEntityToUpdate.length,
+ 0,
+ );
+
+ if (totalOperationCount === 0) {
+ this.logger.log(
+ `MessageCampaign standard metadata already exists for workspace ${workspaceId}, skipping`,
+ );
+
+ return;
+ }
+
+ this.logger.log(
+ `${isDryRun ? '[DRY RUN] ' : ''}Applying ${totalOperationCount} MessageCampaign standard metadata operation(s) for workspace ${workspaceId}`,
+ );
+
+ if (isDryRun) {
+ return;
+ }
+
+ const validateAndBuildResult =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
+ {
+ isSystemBuild: true,
+ applicationUniversalIdentifier:
+ twentyStandardFlatApplication.universalIdentifier,
+ workspaceId,
+ allFlatEntityOperationByMetadataName,
+ },
+ );
+
+ if (validateAndBuildResult.status === 'fail') {
+ throw new Error(
+ `Failed to create the MessageCampaign standard objects for workspace ${workspaceId}: ${JSON.stringify(
+ validateAndBuildResult,
+ null,
+ 2,
+ )}`,
+ );
+ }
+
+ this.logger.log(
+ `Applied ${totalOperationCount} MessageCampaign standard metadata operation(s) for workspace ${workspaceId}`,
+ );
+ }
+
+ private async makeCampaignSearchable({
+ workspaceId,
+ options,
+ }: RunOnWorkspaceArgs): Promise<void> {
+ const isDryRun = options.dryRun ?? false;
+
+ const { flatObjectMetadataMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatObjectMetadataMaps',
+ ]);
+
+ const messageCampaignObjectMetadata =
+ flatObjectMetadataMaps.byUniversalIdentifier[
+ STANDARD_OBJECTS.messageCampaign.universalIdentifier
+ ];
+
+ if (!isDefined(messageCampaignObjectMetadata)) {
+ this.logger.log(
+ `messageCampaign object not found for workspace ${workspaceId}, skipping`,
+ );
+
+ return;
+ }
+
+ if (messageCampaignObjectMetadata.isSearchable) {
+ this.logger.log(
+ `messageCampaign is already searchable for workspace ${workspaceId}, skipping`,
+ );
+
+ return;
+ }
+
+ this.logger.log(
+ `${isDryRun ? '[DRY RUN] ' : ''}Making messageCampaign searchable for workspace ${workspaceId}`,
+ );
+
+ if (isDryRun) {
+ return;
+ }
+
+ const { twentyStandardFlatApplication } =
+ await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
+ { workspaceId },
+ );
+
+ const validateAndBuildResult =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunWorkspaceMigration(
+ {
+ isSystemBuild: true,
+ applicationUniversalIdentifier:
+ twentyStandardFlatApplication.universalIdentifier,
+ workspaceId,
+ allFlatEntityOperationByMetadataName: {
+ objectMetadata: {
+ flatEntityToCreate: [],
+ flatEntityToDelete: [],
+ flatEntityToUpdate: [
+ {
+ ...messageCampaignObjectMetadata,
+ isSearchable: true,
+ updatedAt: new Date().toISOString(),
+ },
+ ],
+ },
+ },
+ },
+ );
+
+ if (validateAndBuildResult.status === 'fail') {
+ throw new Error(
+ `Failed to make messageCampaign searchable for workspace ${workspaceId}: ${JSON.stringify(
+ validateAndBuildResult,
+ null,
+ 2,
+ )}`,
+ );
+ }
+
+ this.logger.log(
+ `Made messageCampaign searchable for workspace ${workspaceId}`,
+ );
+ }
+
+ private async syncCampaignMetadata({
+ workspaceId,
+ options,
+ }: RunOnWorkspaceArgs): Promise<void> {
+ const { flatFieldMetadataMaps, flatObjectMetadataMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatFieldMetadataMaps',
+ 'flatObjectMetadataMaps',
+ ]);
+
+ const messageCampaignObject =
+ findFlatEntityByUniversalIdentifier<FlatObjectMetadata>({
+ flatEntityMaps: flatObjectMetadataMaps,
+ universalIdentifier: MESSAGE_CAMPAIGN.universalIdentifier,
+ });
+
+ if (!isDefined(messageCampaignObject)) {
+ this.logger.log(
+ `messageCampaign object does not exist for workspace ${workspaceId}, skipping`,
+ );
+
+ return;
+ }
+
+ const { twentyStandardFlatApplication } =
+ await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
+ { workspaceId },
+ );
+
+ const { allFlatEntityMaps: standardAllFlatEntityMaps } =
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now: new Date().toISOString(),
+ workspaceId,
+ twentyStandardApplicationId: twentyStandardFlatApplication.id,
+ });
+ const standardFieldMaps = standardAllFlatEntityMaps.flatFieldMetadataMaps;
+
+ const flatEntityToCreate: FlatFieldMetadata[] = [];
+ const flatEntityToUpdate: FlatFieldMetadata[] = [];
+ const plannedChanges: string[] = [];
+
+ const selectOptionsToSync = [
+ {
+ label: 'CANCELED messageCampaign status',
+ universalIdentifier: CAMPAIGN_STATUS_FIELD.universalIdentifier,
+ expectedValue: MessageCampaignStatus.CANCELED,
+ },
+ ];
+
+ for (const selectOption of selectOptionsToSync) {
+ const fieldToUpdate = this.buildSelectOptionsUpdate({
+ workspaceId,
+ workspaceFieldMaps: flatFieldMetadataMaps,
+ standardFieldMaps,
+ ...selectOption,
+ });
+
+ if (isDefined(fieldToUpdate)) {
+ flatEntityToUpdate.push(fieldToUpdate);
+ plannedChanges.push(selectOption.label);
+ }
+ }
+
+ if (plannedChanges.length === 0) {
+ return;
+ }
+
+ const isDryRun = options.dryRun ?? false;
+
+ if (isDryRun) {
+ this.logger.log(
+ `[DRY RUN] Would add ${plannedChanges.join(', ')} for workspace ${workspaceId}`,
+ );
+
+ return;
+ }
+
+ const result =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
+ {
+ isSystemBuild: true,
+ workspaceId,
+ applicationUniversalIdentifier:
+ twentyStandardFlatApplication.universalIdentifier,
+ allFlatEntityOperationByMetadataName: {
+ fieldMetadata: {
+ flatEntityToCreate,
+ flatEntityToDelete: [],
+ flatEntityToUpdate,
+ },
+ },
+ },
+ );
+
+ if (result.status === 'fail') {
+ this.logger.error(
+ `Failed to sync message campaign metadata:\n${JSON.stringify(result, null, 2)}`,
+ );
+
+ throw new Error(
+ `Failed to sync message campaign metadata for workspace ${workspaceId}`,
+ );
+ }
+
+ this.logger.log(
+ `Added ${plannedChanges.join(', ')} for workspace ${workspaceId}`,
+ );
+ }
+
+ private buildSelectOptionsUpdate({
+ workspaceId,
+ workspaceFieldMaps,
+ standardFieldMaps,
+ universalIdentifier,
+ expectedValue,
+ label,
+ }: {
+ workspaceId: string;
+ workspaceFieldMaps: FlatEntityMaps<FlatFieldMetadata>;
+ standardFieldMaps: FlatEntityMaps<FlatFieldMetadata>;
+ universalIdentifier: string;
+ expectedValue: string;
+ label: string;
+ }): FlatFieldMetadata | undefined {
+ const workspaceField = findFlatEntityByUniversalIdentifier<FlatFieldMetadata>(
+ { flatEntityMaps: workspaceFieldMaps, universalIdentifier },
+ );
+
+ if (!isDefined(workspaceField)) {
+ this.logger.log(
+ `${label} select does not exist for workspace ${workspaceId}, skipping that option`,
+ );
+
+ return undefined;
+ }
+
+ if (workspaceField.type !== FieldMetadataType.SELECT) {
+ throw new Error(
+ `${label} is not a SELECT field for workspace ${workspaceId}`,
+ );
+ }
+
+ const hasOption = (workspaceField.options ?? []).some(
+ (option) => option.value === expectedValue,
+ );
+
+ if (hasOption) {
+ return undefined;
+ }
+
+ const standardField = findFlatEntityByUniversalIdentifier<FlatFieldMetadata>(
+ { flatEntityMaps: standardFieldMaps, universalIdentifier },
+ );
+
+ if (
+ !isDefined(standardField) ||
+ standardField.type !== FieldMetadataType.SELECT
+ ) {
+ throw new Error(`Standard application is missing the ${label} select`);
+ }
+
+ return {
+ ...workspaceField,
+ options: standardField.options,
+ updatedAt: new Date().toISOString(),
+ };
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-message-index-universal-identifiers.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-message-index-universal-identifiers.constant.ts
new file mode 100644
index 00000000000..1fd00905116
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-message-index-universal-identifiers.constant.ts
@@ -0,0 +1,6 @@
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+
+export const MESSAGE_CAMPAIGN_MESSAGE_INDEX_UNIVERSAL_IDENTIFIERS: string[] = [
+ STANDARD_OBJECTS.message.indexes.messageCampaignIdIndex.universalIdentifier,
+ STANDARD_OBJECTS.message.indexes.headerMessageIdIndex.universalIdentifier,
+];
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-standard-object-universal-identifiers.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-standard-object-universal-identifiers.constant.ts
new file mode 100644
index 00000000000..dee9e51e017
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/constants/message-campaign-standard-object-universal-identifiers.constant.ts
@@ -0,0 +1,7 @@
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+
+export const MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS: string[] = [
+ STANDARD_OBJECTS.messageCampaign.universalIdentifier,
+ STANDARD_OBJECTS.messageList.universalIdentifier,
+ STANDARD_OBJECTS.messageListMember.universalIdentifier,
+];
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/types/message-campaign-standard-universal-identifiers.type.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/types/message-campaign-standard-universal-identifiers.type.ts
new file mode 100644
index 00000000000..9ae05ce7079
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/types/message-campaign-standard-universal-identifiers.type.ts
@@ -0,0 +1,13 @@
+export type MessageCampaignStandardUniversalIdentifiers = {
+ objectMetadata: string[];
+ fieldMetadata: string[];
+ index: string[];
+ searchFieldMetadata: string[];
+ view: string[];
+ viewFieldGroup: string[];
+ viewField: string[];
+ pageLayout: string[];
+ pageLayoutTab: string[];
+ pageLayoutWidget: string[];
+ commandMenuItem: string[];
+};
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/__tests__/collect-message-campaign-standard-universal-identifiers.util.spec.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/__tests__/collect-message-campaign-standard-universal-identifiers.util.spec.ts
new file mode 100644
index 00000000000..c8bb43e16fb
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/__tests__/collect-message-campaign-standard-universal-identifiers.util.spec.ts
@@ -0,0 +1,93 @@
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+import { isDefined } from 'twenty-shared/utils';
+import { v4 } from 'uuid';
+
+import { collectMessageCampaignStandardUniversalIdentifiers } from 'src/database/commands/upgrade-version-command/2-38/utils/collect-message-campaign-standard-universal-identifiers.util';
+import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
+import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
+
+describe('collectMessageCampaignStandardUniversalIdentifiers', () => {
+ const { allFlatEntityMaps: standardAllFlatEntityMaps } =
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now: new Date().toISOString(),
+ workspaceId: v4(),
+ twentyStandardApplicationId: v4(),
+ });
+
+ const universalIdentifiers =
+ collectMessageCampaignStandardUniversalIdentifiers({
+ standardAllFlatEntityMaps,
+ });
+
+ it('should collect the three campaign standard objects', () => {
+ expect(universalIdentifiers.objectMetadata).toEqual([
+ STANDARD_OBJECTS.messageCampaign.universalIdentifier,
+ STANDARD_OBJECTS.messageList.universalIdentifier,
+ STANDARD_OBJECTS.messageListMember.universalIdentifier,
+ ]);
+ });
+
+ it('should collect the campaign fields and the inverse relation fields living on other objects', () => {
+ expect(universalIdentifiers.fieldMetadata).toContain(
+ STANDARD_OBJECTS.messageCampaign.fields.name.universalIdentifier,
+ );
+ expect(universalIdentifiers.fieldMetadata).toContain(
+ STANDARD_OBJECTS.person.fields.listMemberships.universalIdentifier,
+ );
+ });
+
+ it('should collect the campaign index view and its view fields', () => {
+ const allMessageCampaignsViewUniversalIdentifier =
+ STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns
+ .universalIdentifier;
+
+ expect(universalIdentifiers.view).toContain(
+ allMessageCampaignsViewUniversalIdentifier,
+ );
+ expect(universalIdentifiers.viewField).toContain(
+ STANDARD_OBJECTS.messageCampaign.views.allMessageCampaigns.viewFields
+ .status.universalIdentifier,
+ );
+ });
+
+ it('should collect the campaign search field metadata and every campaign index', () => {
+ expect(universalIdentifiers.index).toContain(
+ STANDARD_OBJECTS.messageCampaign.indexes.listIdIndex.universalIdentifier,
+ );
+ expect(universalIdentifiers.index).toContain(
+ STANDARD_OBJECTS.messageListMember.indexes.personListUniqueIndex
+ .universalIdentifier,
+ );
+ expect(universalIdentifiers.searchFieldMetadata.length).toBeGreaterThan(0);
+ });
+
+ it('should collect the campaign command menu items including the global compose campaign entry', () => {
+ expect(universalIdentifiers.commandMenuItem).toContain(
+ STANDARD_COMMAND_MENU_ITEMS.composeCampaign.universalIdentifier,
+ );
+ expect(universalIdentifiers.commandMenuItem).toContain(
+ STANDARD_COMMAND_MENU_ITEMS.sendMessageCampaign.universalIdentifier,
+ );
+ });
+
+ it('should not collect metadata belonging to unrelated standard objects', () => {
+ const companyFieldUniversalIdentifiers = Object.values(
+ standardAllFlatEntityMaps.flatFieldMetadataMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatFieldMetadata) =>
+ flatFieldMetadata.objectMetadataUniversalIdentifier ===
+ STANDARD_OBJECTS.company.universalIdentifier &&
+ !isDefined(
+ flatFieldMetadata.relationTargetObjectMetadataUniversalIdentifier,
+ ),
+ )
+ .map((flatFieldMetadata) => flatFieldMetadata.universalIdentifier);
+
+ expect(companyFieldUniversalIdentifiers.length).toBeGreaterThan(0);
+ expect(universalIdentifiers.fieldMetadata).toEqual(
+ expect.not.arrayContaining(companyFieldUniversalIdentifiers),
+ );
+ });
+});
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/collect-message-campaign-standard-universal-identifiers.util.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/collect-message-campaign-standard-universal-identifiers.util.ts
new file mode 100644
index 00000000000..1955cda38ea
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-38/utils/collect-message-campaign-standard-universal-identifiers.util.ts
@@ -0,0 +1,177 @@
+import { isDefined } from 'twenty-shared/utils';
+
+import { MESSAGE_CAMPAIGN_MESSAGE_INDEX_UNIVERSAL_IDENTIFIERS } from 'src/database/commands/upgrade-version-command/2-38/constants/message-campaign-message-index-universal-identifiers.constant';
+import { MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'src/database/commands/upgrade-version-command/2-38/constants/message-campaign-standard-object-universal-identifiers.constant';
+import { type MessageCampaignStandardUniversalIdentifiers } from 'src/database/commands/upgrade-version-command/2-38/types/message-campaign-standard-universal-identifiers.type';
+import { STANDARD_COMMAND_MENU_ITEMS } from 'src/engine/workspace-manager/twenty-standard-application/constants/standard-command-menu-item.constant';
+import { type TwentyStandardAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/types/twenty-standard-all-flat-entity-maps.type';
+
+export const collectMessageCampaignStandardUniversalIdentifiers = ({
+ standardAllFlatEntityMaps,
+}: {
+ standardAllFlatEntityMaps: TwentyStandardAllFlatEntityMaps;
+}): MessageCampaignStandardUniversalIdentifiers => {
+ const objectUniversalIdentifiers = new Set(
+ MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
+ );
+
+ const fieldMetadata = Object.values(
+ standardAllFlatEntityMaps.flatFieldMetadataMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatFieldMetadata) =>
+ objectUniversalIdentifiers.has(
+ flatFieldMetadata.objectMetadataUniversalIdentifier,
+ ) ||
+ (isDefined(
+ flatFieldMetadata.relationTargetObjectMetadataUniversalIdentifier,
+ ) &&
+ objectUniversalIdentifiers.has(
+ flatFieldMetadata.relationTargetObjectMetadataUniversalIdentifier,
+ )),
+ )
+ .map((flatFieldMetadata) => flatFieldMetadata.universalIdentifier);
+
+ const messageIndexUniversalIdentifiers = new Set(
+ MESSAGE_CAMPAIGN_MESSAGE_INDEX_UNIVERSAL_IDENTIFIERS,
+ );
+
+ const index = Object.values(
+ standardAllFlatEntityMaps.flatIndexMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatIndexMetadata) =>
+ objectUniversalIdentifiers.has(
+ flatIndexMetadata.objectMetadataUniversalIdentifier,
+ ) ||
+ messageIndexUniversalIdentifiers.has(
+ flatIndexMetadata.universalIdentifier,
+ ),
+ )
+ .map((flatIndexMetadata) => flatIndexMetadata.universalIdentifier);
+
+ const searchFieldMetadata = Object.values(
+ standardAllFlatEntityMaps.flatSearchFieldMetadataMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter((flatSearchFieldMetadata) =>
+ objectUniversalIdentifiers.has(
+ flatSearchFieldMetadata.objectMetadataUniversalIdentifier,
+ ),
+ )
+ .map(
+ (flatSearchFieldMetadata) => flatSearchFieldMetadata.universalIdentifier,
+ );
+
+ const flatViews = Object.values(
+ standardAllFlatEntityMaps.flatViewMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatView) =>
+ isDefined(flatView.objectMetadataUniversalIdentifier) &&
+ objectUniversalIdentifiers.has(
+ flatView.objectMetadataUniversalIdentifier,
+ ),
+ );
+ const viewUniversalIdentifiers = new Set(
+ flatViews.map((flatView) => flatView.universalIdentifier),
+ );
+
+ const viewFieldGroup = Object.values(
+ standardAllFlatEntityMaps.flatViewFieldGroupMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter((flatViewFieldGroup) =>
+ viewUniversalIdentifiers.has(flatViewFieldGroup.viewUniversalIdentifier),
+ )
+ .map((flatViewFieldGroup) => flatViewFieldGroup.universalIdentifier);
+
+ const viewField = Object.values(
+ standardAllFlatEntityMaps.flatViewFieldMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter((flatViewField) =>
+ viewUniversalIdentifiers.has(flatViewField.viewUniversalIdentifier),
+ )
+ .map((flatViewField) => flatViewField.universalIdentifier);
+
+ const flatPageLayouts = Object.values(
+ standardAllFlatEntityMaps.flatPageLayoutMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatPageLayout) =>
+ isDefined(flatPageLayout.objectMetadataUniversalIdentifier) &&
+ objectUniversalIdentifiers.has(
+ flatPageLayout.objectMetadataUniversalIdentifier,
+ ),
+ );
+ const pageLayoutUniversalIdentifiers = new Set(
+ flatPageLayouts.map((flatPageLayout) => flatPageLayout.universalIdentifier),
+ );
+
+ const flatPageLayoutTabs = Object.values(
+ standardAllFlatEntityMaps.flatPageLayoutTabMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter((flatPageLayoutTab) =>
+ pageLayoutUniversalIdentifiers.has(
+ flatPageLayoutTab.pageLayoutUniversalIdentifier,
+ ),
+ );
+ const pageLayoutTabUniversalIdentifiers = new Set(
+ flatPageLayoutTabs.map(
+ (flatPageLayoutTab) => flatPageLayoutTab.universalIdentifier,
+ ),
+ );
+
+ const pageLayoutWidget = Object.values(
+ standardAllFlatEntityMaps.flatPageLayoutWidgetMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter((flatPageLayoutWidget) =>
+ pageLayoutTabUniversalIdentifiers.has(
+ flatPageLayoutWidget.pageLayoutTabUniversalIdentifier,
+ ),
+ )
+ .map((flatPageLayoutWidget) => flatPageLayoutWidget.universalIdentifier);
+
+ const objectScopedCommandMenuItems = Object.values(
+ standardAllFlatEntityMaps.flatCommandMenuItemMaps.byUniversalIdentifier,
+ )
+ .filter(isDefined)
+ .filter(
+ (flatCommandMenuItem) =>
+ isDefined(
+ flatCommandMenuItem.availabilityObjectMetadataUniversalIdentifier,
+ ) &&
+ objectUniversalIdentifiers.has(
+ flatCommandMenuItem.availabilityObjectMetadataUniversalIdentifier,
+ ),
+ )
+ .map((flatCommandMenuItem) => flatCommandMenuItem.universalIdentifier);
+
+ return {
+ objectMetadata: MESSAGE_CAMPAIGN_STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
+ fieldMetadata,
+ index,
+ searchFieldMetadata,
+ view: flatViews.map((flatView) => flatView.universalIdentifier),
+ viewFieldGroup,
+ viewField,
+ pageLayout: flatPageLayouts.map(
+ (flatPageLayout) => flatPageLayout.universalIdentifier,
+ ),
+ pageLayoutTab: flatPageLayoutTabs.map(
+ (flatPageLayoutTab) => flatPageLayoutTab.universalIdentifier,
+ ),
+ pageLayoutWidget,
+ commandMenuItem: [
+ ...objectScopedCommandMenuItems,
+ STANDARD_COMMAND_MENU_ITEMS.composeCampaign.universalIdentifier,
+ ],
+ };
+};
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
index 2da82d628ad..ac8aa7a601d 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
@@ -166,6 +166,7 @@ import { DropBillingCustomerCreditBalanceMicroFastInstanceCommand } from 'src/da
import { DropHasReachedCurrentPeriodCapFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1787906740819-drop-has-reached-current-period-cap';
import { AddTimelineActivityHappensAtFieldFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1787918663364-add-timeline-activity-happens-at-field';
import { AddPageLayoutIsFirstTabPinnedFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1787929843737-add-page-layout-is-first-tab-pinned';
+import { CreateCampaignDeliveryFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-38/2-38-instance-command-fast-1788200700000-create-campaign-delivery';
export const INSTANCE_COMMANDS = [
AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand,
@@ -334,4 +335,5 @@ export const INSTANCE_COMMANDS = [
DropHasReachedCurrentPeriodCapFastInstanceCommand,
AddTimelineActivityHappensAtFieldFastInstanceCommand,
AddPageLayoutIsFirstTabPinnedFastInstanceCommand,
+ CreateCampaignDeliveryFastInstanceCommand,
];
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/campaign-delivery.entity.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/campaign-delivery.entity.ts
new file mode 100644
index 00000000000..0a8090d95da
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/campaign-delivery.entity.ts
@@ -0,0 +1,94 @@
+import {
+ Check,
+ Column,
+ CreateDateColumn,
+ Entity,
+ Index,
+ PrimaryColumn,
+ UpdateDateColumn,
+} from 'typeorm';
+
+import { type CampaignFailureReason } from 'src/engine/core-modules/emailing-domain/types/campaign-failure-reason.type';
+import { type CampaignDeliveryState } from 'src/engine/core-modules/emailing-domain/types/campaign-delivery-state.type';
+import { type CampaignSkipReason } from 'src/engine/core-modules/emailing-domain/types/campaign-skip-reason.type';
+import { WorkspaceRelatedEntity } from 'src/engine/workspace-manager/types/workspace-related-entity';
+
+@Entity({ name: 'campaignDelivery', schema: 'core' })
+@Check(
+ 'CHK_CAMPAIGN_DELIVERY_CLAIM_HAS_LEASE',
+ `"state" <> 'SENDING' OR "claimExpiresAt" IS NOT NULL`,
+)
+@Check(
+ 'CHK_CAMPAIGN_DELIVERY_CLAIM_IS_WHOLE',
+ `("claimToken" IS NULL) = ("claimExpiresAt" IS NULL)`,
+)
+@Index('IDX_CAMPAIGN_DELIVERY_UNIQUE', ['campaignId', 'personId'], {
+ unique: true,
+})
+@Index('IDX_CAMPAIGN_DELIVERY_UNFINISHED', ['campaignId'], {
+ where: `"state" IN ('QUEUED', 'SENDING')`,
+})
+@Index('IDX_CAMPAIGN_DELIVERY_EXPIRED_CLAIM', ['claimExpiresAt'], {
+ where: `"state" = 'SENDING'`,
+})
+@Index('IDX_CAMPAIGN_DELIVERY_COUNTS', ['workspaceId', 'campaignId', 'state'])
+@Index(
+ 'IDX_CAMPAIGN_DELIVERY_PROVIDER_MESSAGE_ID',
+ ['workspaceId', 'providerMessageId'],
+ { unique: true, where: '"providerMessageId" IS NOT NULL' },
+)
+export class CampaignDeliveryEntity extends WorkspaceRelatedEntity {
+ @PrimaryColumn({ type: 'uuid' })
+ id: string;
+
+ @CreateDateColumn({ type: 'timestamptz' })
+ createdAt: Date;
+
+ @UpdateDateColumn({ type: 'timestamptz' })
+ updatedAt: Date;
+
+ @Column({ type: 'uuid', nullable: false })
+ campaignId: string;
+
+ @Column({ type: 'uuid', nullable: false })
+ personId: string;
+
+ @Column({ type: 'varchar', nullable: false })
+ recipientEmail: string;
+
+ @Column({ type: 'varchar', nullable: false, default: 'QUEUED' })
+ state: CampaignDeliveryState;
+
+ @Column({ type: 'varchar', nullable: true })
+ skipReason: CampaignSkipReason | null;
+
+ @Column({ type: 'varchar', nullable: true })
+ failureReason: CampaignFailureReason | null;
+
+ @Column({ type: 'uuid', nullable: true })
+ claimToken: string | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ claimExpiresAt: Date | null;
+
+ @Column({ type: 'varchar', nullable: true })
+ providerMessageId: string | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ sentAt: Date | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ deliveredAt: Date | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ bouncedAt: Date | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ complainedAt: Date | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ rejectedAt: Date | null;
+
+ @Column({ type: 'timestamptz', nullable: true })
+ renderingFailedAt: Date | null;
+}
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-claim-ttl-ms.constant.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-claim-ttl-ms.constant.ts
new file mode 100644
index 00000000000..c57cbd6c3d9
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-claim-ttl-ms.constant.ts
@@ -0,0 +1 @@
+export const CAMPAIGN_DELIVERY_CLAIM_TTL_MS = 15 * 60 * 1000;
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-state.constant.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-state.constant.ts
new file mode 100644
index 00000000000..f2f52365a1f
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-delivery-state.constant.ts
@@ -0,0 +1,8 @@
+export const CAMPAIGN_DELIVERY_STATE = {
+ QUEUED: 'QUEUED',
+ SENDING: 'SENDING',
+ SENT: 'SENT',
+ FAILED: 'FAILED',
+ SKIPPED: 'SKIPPED',
+ UNCERTAIN: 'UNCERTAIN',
+} as const;
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-failure-reason.constant.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-failure-reason.constant.ts
new file mode 100644
index 00000000000..60b66437ed8
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-failure-reason.constant.ts
@@ -0,0 +1,14 @@
+export const CAMPAIGN_FAILURE_REASON = {
+ TEMPORARY_ERROR: 'TEMPORARY_ERROR',
+ CONFIGURATION_ERROR: 'CONFIGURATION_ERROR',
+ INSUFFICIENT_PERMISSIONS: 'INSUFFICIENT_PERMISSIONS',
+ SANDBOX_ACCOUNT: 'SANDBOX_ACCOUNT',
+ SENDING_SUSPENDED: 'SENDING_SUSPENDED',
+ UNSUBSCRIBE_NOT_READY: 'UNSUBSCRIBE_NOT_READY',
+ UNSUBSCRIBE_MULTIPLE_RECIPIENTS: 'UNSUBSCRIBE_MULTIPLE_RECIPIENTS',
+ REJECTED: 'REJECTED',
+ RENDERING_FAILED: 'RENDERING_FAILED',
+ RETRY_EXHAUSTED: 'RETRY_EXHAUSTED',
+ CLAIM_EXPIRED: 'CLAIM_EXPIRED',
+ UNKNOWN: 'UNKNOWN',
+} as const;
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-skip-reason.constant.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-skip-reason.constant.ts
new file mode 100644
index 00000000000..06a686e687f
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/constants/campaign-skip-reason.constant.ts
@@ -0,0 +1,7 @@
+export const CAMPAIGN_SKIP_REASON = {
+ SUPPRESSED: 'SUPPRESSED',
+ OUT_OF_CREDITS: 'OUT_OF_CREDITS',
+ CAMPAIGN_CANCELED: 'CAMPAIGN_CANCELED',
+ REPUTATION_BLOCKED: 'REPUTATION_BLOCKED',
+ NO_EMAIL_ADDRESS: 'NO_EMAIL_ADDRESS',
+} as const;
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/exceptions/emailing-domain.exception.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/exceptions/emailing-domain.exception.ts
index 5a34fce243d..9bf845d3c16 100644
--- a/packages/twenty-server/src/engine/core-modules/emailing-domain/exceptions/emailing-domain.exception.ts
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/exceptions/emailing-domain.exception.ts
@@ -7,10 +7,14 @@ import { CustomException } from 'src/utils/custom-exception';
export enum EmailingDomainExceptionCode {
EMAILING_DOMAIN_ALREADY_REGISTERED = 'EMAILING_DOMAIN_ALREADY_REGISTERED',
EMAILING_DOMAIN_NOT_VERIFIED = 'EMAILING_DOMAIN_NOT_VERIFIED',
+ EMAILING_DOMAIN_UNSUBSCRIBE_NOT_READY = 'EMAILING_DOMAIN_UNSUBSCRIBE_NOT_READY',
MESSAGE_SUPPRESSION_NOT_FOUND = 'MESSAGE_SUPPRESSION_NOT_FOUND',
MESSAGE_SUPPRESSION_NOT_REMOVABLE = 'MESSAGE_SUPPRESSION_NOT_REMOVABLE',
MESSAGE_CAMPAIGN_NOT_FOUND = 'MESSAGE_CAMPAIGN_NOT_FOUND',
MESSAGE_CAMPAIGN_NOT_SENDABLE = 'MESSAGE_CAMPAIGN_NOT_SENDABLE',
+ MESSAGE_CAMPAIGN_INSUFFICIENT_CREDITS = 'MESSAGE_CAMPAIGN_INSUFFICIENT_CREDITS',
+ MESSAGE_CAMPAIGN_NOT_CANCELABLE = 'MESSAGE_CAMPAIGN_NOT_CANCELABLE',
+ MESSAGE_CAMPAIGN_SENDING_REPUTATION_TOO_LOW = 'MESSAGE_CAMPAIGN_SENDING_REPUTATION_TOO_LOW',
}
const getEmailingDomainExceptionUserFriendlyMessage = (
@@ -21,14 +25,22 @@ const getEmailingDomainExceptionUserFriendlyMessage = (
return msg`This domain is already registered.`;
case EmailingDomainExceptionCode.EMAILING_DOMAIN_NOT_VERIFIED:
return msg`No verified sending domain matches this from address.`;
+ case EmailingDomainExceptionCode.EMAILING_DOMAIN_UNSUBSCRIBE_NOT_READY:
+ return msg`Marketing sending is on hold until the unsubscribe domain is verified.`;
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_FOUND:
return msg`This suppressed address no longer exists.`;
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_REMOVABLE:
return msg`This address cannot be removed from the suppression list.`;
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_FOUND:
return msg`This campaign no longer exists.`;
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_INSUFFICIENT_CREDITS:
+ return msg`This campaign needs more email credits than your workspace has left. Top up your credits or send to a smaller list.`;
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_SENDABLE:
return msg`This campaign cannot be sent. It may be missing a sender, subject or recipient list, or it was already sent.`;
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_CANCELABLE:
+ return msg`Only a campaign that is currently sending can be canceled.`;
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_SENDING_REPUTATION_TOO_LOW:
+ return msg`Too many of your recent emails bounced or were marked as spam. Sending is paused so your domain keeps its reputation. Clean up your recipient lists before sending again.`;
default:
assertUnreachable(code);
}
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/filters/emailing-domain-graphql-api-exception.filter.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/filters/emailing-domain-graphql-api-exception.filter.ts
index 2839b4d1beb..512430876e8 100644
--- a/packages/twenty-server/src/engine/core-modules/emailing-domain/filters/emailing-domain-graphql-api-exception.filter.ts
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/filters/emailing-domain-graphql-api-exception.filter.ts
@@ -22,10 +22,14 @@ export class EmailingDomainGraphqlApiExceptionFilter implements ExceptionFilter
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_FOUND:
throw new NotFoundError(exception);
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_REMOVABLE:
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_SENDING_REPUTATION_TOO_LOW:
throw new ForbiddenError(exception);
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_FOUND:
throw new NotFoundError(exception);
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_INSUFFICIENT_CREDITS:
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_SENDABLE:
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_CANCELABLE:
+ case EmailingDomainExceptionCode.EMAILING_DOMAIN_UNSUBSCRIBE_NOT_READY:
case EmailingDomainExceptionCode.EMAILING_DOMAIN_NOT_VERIFIED:
throw new UserInputError(exception);
default: {
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-delivery-state.type.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-delivery-state.type.ts
new file mode 100644
index 00000000000..33507e91651
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-delivery-state.type.ts
@@ -0,0 +1,4 @@
+import { type CAMPAIGN_DELIVERY_STATE } from 'src/engine/core-modules/emailing-domain/constants/campaign-delivery-state.constant';
+
+export type CampaignDeliveryState =
+ (typeof CAMPAIGN_DELIVERY_STATE)[keyof typeof CAMPAIGN_DELIVERY_STATE];
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-failure-reason.type.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-failure-reason.type.ts
new file mode 100644
index 00000000000..3a7f500e127
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-failure-reason.type.ts
@@ -0,0 +1,4 @@
+import { type CAMPAIGN_FAILURE_REASON } from 'src/engine/core-modules/emailing-domain/constants/campaign-failure-reason.constant';
+
+export type CampaignFailureReason =
+ (typeof CAMPAIGN_FAILURE_REASON)[keyof typeof CAMPAIGN_FAILURE_REASON];
diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-skip-reason.type.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-skip-reason.type.ts
new file mode 100644
index 00000000000..e285ab1c159
--- /dev/null
+++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/types/campaign-skip-reason.type.ts
@@ -0,0 +1,4 @@
+import { type CAMPAIGN_SKIP_REASON } from 'src/engine/core-modules/emailing-domain/constants/campaign-skip-reason.constant';
+
+export type CampaignSkipReason =
+ (typeof CAMPAIGN_SKIP_REASON)[keyof typeof CAMPAIGN_SKIP_REASON];
diff --git a/packages/twenty-server/src/engine/metadata-modules/message-channel/utils/message-channel-graphql-api-exception-handler.util.ts b/packages/twenty-server/src/engine/metadata-modules/message-channel/utils/message-channel-graphql-api-exception-handler.util.ts
index 1495b46bfa2..ac468a847f4 100644
--- a/packages/twenty-server/src/engine/metadata-modules/message-channel/utils/message-channel-graphql-api-exception-handler.util.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/message-channel/utils/message-channel-graphql-api-exception-handler.util.ts
@@ -44,10 +44,14 @@ export const messageChannelGraphqlApiExceptionHandler = (error: Error) => {
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_FOUND:
throw new NotFoundError(error);
case EmailingDomainExceptionCode.MESSAGE_SUPPRESSION_NOT_REMOVABLE:
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_SENDING_REPUTATION_TOO_LOW:
throw new ForbiddenError(error);
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_FOUND:
throw new NotFoundError(error);
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_INSUFFICIENT_CREDITS:
case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_SENDABLE:
+ case EmailingDomainExceptionCode.MESSAGE_CAMPAIGN_NOT_CANCELABLE:
+ case EmailingDomainExceptionCode.EMAILING_DOMAIN_UNSUBSCRIBE_NOT_READY:
case EmailingDomainExceptionCode.EMAILING_DOMAIN_NOT_VERIFIED:
throw new UserInputError(error);
default: {
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap
index bb705cec31e..00d768f5017 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/__tests__/__snapshots__/get-standard-object-metadata-related-entity-ids.util.spec.ts.snap
@@ -969,86 +969,86 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"message": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000485",
+ "id": "00000000-0000-0000-0000-000000000491",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000488",
+ "id": "00000000-0000-0000-0000-000000000494",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000487",
+ "id": "00000000-0000-0000-0000-000000000493",
},
"deliveryStatus": {
- "id": "00000000-0000-0000-0000-000000000500",
+ "id": "00000000-0000-0000-0000-000000000506",
},
"headerMessageId": {
- "id": "00000000-0000-0000-0000-000000000492",
+ "id": "00000000-0000-0000-0000-000000000498",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000484",
+ "id": "00000000-0000-0000-0000-000000000490",
},
"isDraft": {
- "id": "00000000-0000-0000-0000-000000000501",
+ "id": "00000000-0000-0000-0000-000000000507",
},
"messageCampaign": {
- "id": "00000000-0000-0000-0000-000000000499",
+ "id": "00000000-0000-0000-0000-000000000505",
},
"messageChannelMessageAssociations": {
- "id": "00000000-0000-0000-0000-000000000498",
+ "id": "00000000-0000-0000-0000-000000000504",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000000497",
+ "id": "00000000-0000-0000-0000-000000000503",
},
"messageThread": {
- "id": "00000000-0000-0000-0000-000000000493",
+ "id": "00000000-0000-0000-0000-000000000499",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000490",
+ "id": "00000000-0000-0000-0000-000000000496",
},
"receivedAt": {
- "id": "00000000-0000-0000-0000-000000000496",
+ "id": "00000000-0000-0000-0000-000000000502",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000491",
+ "id": "00000000-0000-0000-0000-000000000497",
},
"subject": {
- "id": "00000000-0000-0000-0000-000000000494",
+ "id": "00000000-0000-0000-0000-000000000500",
},
"text": {
- "id": "00000000-0000-0000-0000-000000000495",
+ "id": "00000000-0000-0000-0000-000000000501",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000486",
+ "id": "00000000-0000-0000-0000-000000000492",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000489",
+ "id": "00000000-0000-0000-0000-000000000495",
},
},
- "id": "00000000-0000-0000-0000-000000000510",
+ "id": "00000000-0000-0000-0000-000000000516",
"views": {
"allMessages": {
- "id": "00000000-0000-0000-0000-000000000509",
+ "id": "00000000-0000-0000-0000-000000000515",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000508",
+ "id": "00000000-0000-0000-0000-000000000514",
},
"headerMessageId": {
- "id": "00000000-0000-0000-0000-000000000506",
+ "id": "00000000-0000-0000-0000-000000000512",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000000504",
+ "id": "00000000-0000-0000-0000-000000000510",
},
"messageThread": {
- "id": "00000000-0000-0000-0000-000000000503",
+ "id": "00000000-0000-0000-0000-000000000509",
},
"receivedAt": {
- "id": "00000000-0000-0000-0000-000000000505",
+ "id": "00000000-0000-0000-0000-000000000511",
},
"subject": {
- "id": "00000000-0000-0000-0000-000000000502",
+ "id": "00000000-0000-0000-0000-000000000508",
},
"text": {
- "id": "00000000-0000-0000-0000-000000000507",
+ "id": "00000000-0000-0000-0000-000000000513",
},
},
"viewGroups": {},
@@ -1061,10 +1061,10 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"id": "00000000-0000-0000-0000-000000000300",
},
"bouncedCount": {
- "id": "00000000-0000-0000-0000-000000000306",
+ "id": "00000000-0000-0000-0000-000000000307",
},
"complainedCount": {
- "id": "00000000-0000-0000-0000-000000000307",
+ "id": "00000000-0000-0000-0000-000000000308",
},
"createdAt": {
"id": "00000000-0000-0000-0000-000000000291",
@@ -1075,9 +1075,12 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"deletedAt": {
"id": "00000000-0000-0000-0000-000000000293",
},
- "failedCount": {
+ "deliveredCount": {
"id": "00000000-0000-0000-0000-000000000305",
},
+ "failedCount": {
+ "id": "00000000-0000-0000-0000-000000000306",
+ },
"fromAddress": {
"id": "00000000-0000-0000-0000-000000000301",
},
@@ -1085,10 +1088,10 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"id": "00000000-0000-0000-0000-000000000290",
},
"list": {
- "id": "00000000-0000-0000-0000-000000000309",
+ "id": "00000000-0000-0000-0000-000000000311",
},
"messages": {
- "id": "00000000-0000-0000-0000-000000000311",
+ "id": "00000000-0000-0000-0000-000000000313",
},
"name": {
"id": "00000000-0000-0000-0000-000000000298",
@@ -1097,7 +1100,7 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"id": "00000000-0000-0000-0000-000000000296",
},
"recipients": {
- "id": "00000000-0000-0000-0000-000000000312",
+ "id": "00000000-0000-0000-0000-000000000314",
},
"searchVector": {
"id": "00000000-0000-0000-0000-000000000297",
@@ -1108,6 +1111,9 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"sentCount": {
"id": "00000000-0000-0000-0000-000000000304",
},
+ "skippedCount": {
+ "id": "00000000-0000-0000-0000-000000000309",
+ },
"status": {
"id": "00000000-0000-0000-0000-000000000302",
},
@@ -1115,10 +1121,10 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"id": "00000000-0000-0000-0000-000000000299",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000310",
+ "id": "00000000-0000-0000-0000-000000000312",
},
"unsubscribeTopicId": {
- "id": "00000000-0000-0000-0000-000000000308",
+ "id": "00000000-0000-0000-0000-000000000310",
},
"updatedAt": {
"id": "00000000-0000-0000-0000-000000000292",
@@ -1127,76 +1133,88 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"id": "00000000-0000-0000-0000-000000000295",
},
},
- "id": "00000000-0000-0000-0000-000000000334",
+ "id": "00000000-0000-0000-0000-000000000340",
"views": {
"allMessageCampaigns": {
- "id": "00000000-0000-0000-0000-000000000325",
+ "id": "00000000-0000-0000-0000-000000000329",
"viewFieldGroups": {},
"viewFields": {
"bouncedCount": {
- "id": "00000000-0000-0000-0000-000000000321",
+ "id": "00000000-0000-0000-0000-000000000325",
},
"complainedCount": {
- "id": "00000000-0000-0000-0000-000000000322",
+ "id": "00000000-0000-0000-0000-000000000326",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000324",
+ "id": "00000000-0000-0000-0000-000000000328",
+ },
+ "deliveredCount": {
+ "id": "00000000-0000-0000-0000-000000000322",
},
"failedCount": {
- "id": "00000000-0000-0000-0000-000000000320",
+ "id": "00000000-0000-0000-0000-000000000323",
},
"fromAddress": {
- "id": "00000000-0000-0000-0000-000000000317",
+ "id": "00000000-0000-0000-0000-000000000319",
},
"list": {
- "id": "00000000-0000-0000-0000-000000000316",
+ "id": "00000000-0000-0000-0000-000000000318",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000313",
+ "id": "00000000-0000-0000-0000-000000000315",
},
"recipients": {
- "id": "00000000-0000-0000-0000-000000000323",
+ "id": "00000000-0000-0000-0000-000000000327",
},
"sentAt": {
- "id": "00000000-0000-0000-0000-000000000318",
+ "id": "00000000-0000-0000-0000-000000000320",
},
"sentCount": {
- "id": "00000000-0000-0000-0000-000000000319",
+ "id": "00000000-0000-0000-0000-000000000321",
+ },
+ "skippedCount": {
+ "id": "00000000-0000-0000-0000-000000000324",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000315",
+ "id": "00000000-0000-0000-0000-000000000317",
},
"subject": {
- "id": "00000000-0000-0000-0000-000000000314",
+ "id": "00000000-0000-0000-0000-000000000316",
},
},
"viewGroups": {},
},
"messageCampaignRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000333",
+ "id": "00000000-0000-0000-0000-000000000339",
"viewFieldGroups": {
"stats": {
- "id": "00000000-0000-0000-0000-000000000332",
+ "id": "00000000-0000-0000-0000-000000000338",
},
},
"viewFields": {
"bouncedCount": {
- "id": "00000000-0000-0000-0000-000000000330",
+ "id": "00000000-0000-0000-0000-000000000336",
},
"complainedCount": {
- "id": "00000000-0000-0000-0000-000000000331",
+ "id": "00000000-0000-0000-0000-000000000337",
+ },
+ "deliveredCount": {
+ "id": "00000000-0000-0000-0000-000000000333",
},
"failedCount": {
- "id": "00000000-0000-0000-0000-000000000329",
+ "id": "00000000-0000-0000-0000-000000000334",
},
"sentAt": {
- "id": "00000000-0000-0000-0000-000000000327",
+ "id": "00000000-0000-0000-0000-000000000331",
},
"sentCount": {
- "id": "00000000-0000-0000-0000-000000000328",
+ "id": "00000000-0000-0000-0000-000000000332",
+ },
+ "skippedCount": {
+ "id": "00000000-0000-0000-0000-000000000335",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000326",
+ "id": "00000000-0000-0000-0000-000000000330",
},
},
"viewGroups": {},
@@ -1206,103 +1224,103 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageChannelMessageAssociation": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000365",
+ "id": "00000000-0000-0000-0000-000000000371",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000368",
+ "id": "00000000-0000-0000-0000-000000000374",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000367",
+ "id": "00000000-0000-0000-0000-000000000373",
},
"direction": {
- "id": "00000000-0000-0000-0000-000000000377",
+ "id": "00000000-0000-0000-0000-000000000383",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000364",
+ "id": "00000000-0000-0000-0000-000000000370",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000373",
+ "id": "00000000-0000-0000-0000-000000000379",
},
"messageChannelId": {
- "id": "00000000-0000-0000-0000-000000000372",
+ "id": "00000000-0000-0000-0000-000000000378",
},
"messageExternalId": {
- "id": "00000000-0000-0000-0000-000000000374",
+ "id": "00000000-0000-0000-0000-000000000380",
},
"messageFolders": {
- "id": "00000000-0000-0000-0000-000000000378",
+ "id": "00000000-0000-0000-0000-000000000384",
},
"messageThread": {
- "id": "00000000-0000-0000-0000-000000000375",
+ "id": "00000000-0000-0000-0000-000000000381",
},
"messageThreadExternalId": {
- "id": "00000000-0000-0000-0000-000000000376",
+ "id": "00000000-0000-0000-0000-000000000382",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000370",
+ "id": "00000000-0000-0000-0000-000000000376",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000371",
+ "id": "00000000-0000-0000-0000-000000000377",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000366",
+ "id": "00000000-0000-0000-0000-000000000372",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000369",
+ "id": "00000000-0000-0000-0000-000000000375",
},
},
- "id": "00000000-0000-0000-0000-000000000394",
+ "id": "00000000-0000-0000-0000-000000000400",
"views": {
"allMessageChannelMessageAssociations": {
- "id": "00000000-0000-0000-0000-000000000384",
+ "id": "00000000-0000-0000-0000-000000000390",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000383",
+ "id": "00000000-0000-0000-0000-000000000389",
},
"direction": {
- "id": "00000000-0000-0000-0000-000000000382",
+ "id": "00000000-0000-0000-0000-000000000388",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000380",
+ "id": "00000000-0000-0000-0000-000000000386",
},
"messageChannelId": {
- "id": "00000000-0000-0000-0000-000000000379",
+ "id": "00000000-0000-0000-0000-000000000385",
},
"messageExternalId": {
- "id": "00000000-0000-0000-0000-000000000381",
+ "id": "00000000-0000-0000-0000-000000000387",
},
},
"viewGroups": {},
},
"messageChannelMessageAssociationRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000393",
+ "id": "00000000-0000-0000-0000-000000000399",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000391",
+ "id": "00000000-0000-0000-0000-000000000397",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000392",
+ "id": "00000000-0000-0000-0000-000000000398",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000389",
+ "id": "00000000-0000-0000-0000-000000000395",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000390",
+ "id": "00000000-0000-0000-0000-000000000396",
},
"direction": {
- "id": "00000000-0000-0000-0000-000000000388",
+ "id": "00000000-0000-0000-0000-000000000394",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000386",
+ "id": "00000000-0000-0000-0000-000000000392",
},
"messageChannelId": {
- "id": "00000000-0000-0000-0000-000000000385",
+ "id": "00000000-0000-0000-0000-000000000391",
},
"messageExternalId": {
- "id": "00000000-0000-0000-0000-000000000387",
+ "id": "00000000-0000-0000-0000-000000000393",
},
},
"viewGroups": {},
@@ -1312,76 +1330,76 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageChannelMessageAssociationMessageFolder": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000396",
+ "id": "00000000-0000-0000-0000-000000000402",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000399",
+ "id": "00000000-0000-0000-0000-000000000405",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000398",
+ "id": "00000000-0000-0000-0000-000000000404",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000395",
+ "id": "00000000-0000-0000-0000-000000000401",
},
"messageChannelMessageAssociation": {
- "id": "00000000-0000-0000-0000-000000000403",
+ "id": "00000000-0000-0000-0000-000000000409",
},
"messageFolderId": {
- "id": "00000000-0000-0000-0000-000000000404",
+ "id": "00000000-0000-0000-0000-000000000410",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000401",
+ "id": "00000000-0000-0000-0000-000000000407",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000402",
+ "id": "00000000-0000-0000-0000-000000000408",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000397",
+ "id": "00000000-0000-0000-0000-000000000403",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000400",
+ "id": "00000000-0000-0000-0000-000000000406",
},
},
- "id": "00000000-0000-0000-0000-000000000416",
+ "id": "00000000-0000-0000-0000-000000000422",
"views": {
"allMessageChannelMessageAssociationMessageFolders": {
- "id": "00000000-0000-0000-0000-000000000408",
+ "id": "00000000-0000-0000-0000-000000000414",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000407",
+ "id": "00000000-0000-0000-0000-000000000413",
},
"messageChannelMessageAssociation": {
- "id": "00000000-0000-0000-0000-000000000405",
+ "id": "00000000-0000-0000-0000-000000000411",
},
"messageFolderId": {
- "id": "00000000-0000-0000-0000-000000000406",
+ "id": "00000000-0000-0000-0000-000000000412",
},
},
"viewGroups": {},
},
"messageChannelMessageAssociationMessageFolderRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000415",
+ "id": "00000000-0000-0000-0000-000000000421",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000413",
+ "id": "00000000-0000-0000-0000-000000000419",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000414",
+ "id": "00000000-0000-0000-0000-000000000420",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000411",
+ "id": "00000000-0000-0000-0000-000000000417",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000412",
+ "id": "00000000-0000-0000-0000-000000000418",
},
"messageChannelMessageAssociation": {
- "id": "00000000-0000-0000-0000-000000000409",
+ "id": "00000000-0000-0000-0000-000000000415",
},
"messageFolderId": {
- "id": "00000000-0000-0000-0000-000000000410",
+ "id": "00000000-0000-0000-0000-000000000416",
},
},
"viewGroups": {},
@@ -1391,59 +1409,59 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageList": {
"fields": {
"campaigns": {
- "id": "00000000-0000-0000-0000-000000000345",
+ "id": "00000000-0000-0000-0000-000000000351",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000336",
+ "id": "00000000-0000-0000-0000-000000000342",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000339",
+ "id": "00000000-0000-0000-0000-000000000345",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000338",
+ "id": "00000000-0000-0000-0000-000000000344",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000335",
+ "id": "00000000-0000-0000-0000-000000000341",
},
"members": {
- "id": "00000000-0000-0000-0000-000000000344",
+ "id": "00000000-0000-0000-0000-000000000350",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000343",
+ "id": "00000000-0000-0000-0000-000000000349",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000341",
+ "id": "00000000-0000-0000-0000-000000000347",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000342",
+ "id": "00000000-0000-0000-0000-000000000348",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000346",
+ "id": "00000000-0000-0000-0000-000000000352",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000337",
+ "id": "00000000-0000-0000-0000-000000000343",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000340",
+ "id": "00000000-0000-0000-0000-000000000346",
},
},
- "id": "00000000-0000-0000-0000-000000000352",
+ "id": "00000000-0000-0000-0000-000000000358",
"views": {
"allMessageLists": {
- "id": "00000000-0000-0000-0000-000000000351",
+ "id": "00000000-0000-0000-0000-000000000357",
"viewFieldGroups": {},
"viewFields": {
"campaigns": {
- "id": "00000000-0000-0000-0000-000000000349",
+ "id": "00000000-0000-0000-0000-000000000355",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000350",
+ "id": "00000000-0000-0000-0000-000000000356",
},
"members": {
- "id": "00000000-0000-0000-0000-000000000348",
+ "id": "00000000-0000-0000-0000-000000000354",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000347",
+ "id": "00000000-0000-0000-0000-000000000353",
},
},
"viewGroups": {},
@@ -1453,148 +1471,148 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageListMember": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000354",
+ "id": "00000000-0000-0000-0000-000000000360",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000357",
+ "id": "00000000-0000-0000-0000-000000000363",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000356",
+ "id": "00000000-0000-0000-0000-000000000362",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000353",
+ "id": "00000000-0000-0000-0000-000000000359",
},
"list": {
- "id": "00000000-0000-0000-0000-000000000362",
+ "id": "00000000-0000-0000-0000-000000000368",
},
"person": {
- "id": "00000000-0000-0000-0000-000000000361",
+ "id": "00000000-0000-0000-0000-000000000367",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000359",
+ "id": "00000000-0000-0000-0000-000000000365",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000360",
+ "id": "00000000-0000-0000-0000-000000000366",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000355",
+ "id": "00000000-0000-0000-0000-000000000361",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000358",
+ "id": "00000000-0000-0000-0000-000000000364",
},
},
- "id": "00000000-0000-0000-0000-000000000363",
+ "id": "00000000-0000-0000-0000-000000000369",
"views": undefined,
},
"messageParticipant": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000418",
+ "id": "00000000-0000-0000-0000-000000000424",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000421",
+ "id": "00000000-0000-0000-0000-000000000427",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000420",
+ "id": "00000000-0000-0000-0000-000000000426",
},
"displayName": {
- "id": "00000000-0000-0000-0000-000000000428",
+ "id": "00000000-0000-0000-0000-000000000434",
},
"handle": {
- "id": "00000000-0000-0000-0000-000000000427",
+ "id": "00000000-0000-0000-0000-000000000433",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000417",
+ "id": "00000000-0000-0000-0000-000000000423",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000425",
+ "id": "00000000-0000-0000-0000-000000000431",
},
"messageCampaign": {
- "id": "00000000-0000-0000-0000-000000000431",
+ "id": "00000000-0000-0000-0000-000000000437",
},
"person": {
- "id": "00000000-0000-0000-0000-000000000429",
+ "id": "00000000-0000-0000-0000-000000000435",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000423",
+ "id": "00000000-0000-0000-0000-000000000429",
},
"role": {
- "id": "00000000-0000-0000-0000-000000000426",
+ "id": "00000000-0000-0000-0000-000000000432",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000424",
+ "id": "00000000-0000-0000-0000-000000000430",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000419",
+ "id": "00000000-0000-0000-0000-000000000425",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000422",
+ "id": "00000000-0000-0000-0000-000000000428",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000430",
+ "id": "00000000-0000-0000-0000-000000000436",
},
},
- "id": "00000000-0000-0000-0000-000000000450",
+ "id": "00000000-0000-0000-0000-000000000456",
"views": {
"allMessageParticipants": {
- "id": "00000000-0000-0000-0000-000000000439",
+ "id": "00000000-0000-0000-0000-000000000445",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000438",
+ "id": "00000000-0000-0000-0000-000000000444",
},
"displayName": {
- "id": "00000000-0000-0000-0000-000000000435",
+ "id": "00000000-0000-0000-0000-000000000441",
},
"handle": {
- "id": "00000000-0000-0000-0000-000000000434",
+ "id": "00000000-0000-0000-0000-000000000440",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000432",
+ "id": "00000000-0000-0000-0000-000000000438",
},
"person": {
- "id": "00000000-0000-0000-0000-000000000436",
+ "id": "00000000-0000-0000-0000-000000000442",
},
"role": {
- "id": "00000000-0000-0000-0000-000000000433",
+ "id": "00000000-0000-0000-0000-000000000439",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000437",
+ "id": "00000000-0000-0000-0000-000000000443",
},
},
"viewGroups": {},
},
"messageParticipantRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000449",
+ "id": "00000000-0000-0000-0000-000000000455",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000447",
+ "id": "00000000-0000-0000-0000-000000000453",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000448",
+ "id": "00000000-0000-0000-0000-000000000454",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000445",
+ "id": "00000000-0000-0000-0000-000000000451",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000446",
+ "id": "00000000-0000-0000-0000-000000000452",
},
"displayName": {
- "id": "00000000-0000-0000-0000-000000000442",
+ "id": "00000000-0000-0000-0000-000000000448",
},
"message": {
- "id": "00000000-0000-0000-0000-000000000440",
+ "id": "00000000-0000-0000-0000-000000000446",
},
"person": {
- "id": "00000000-0000-0000-0000-000000000443",
+ "id": "00000000-0000-0000-0000-000000000449",
},
"role": {
- "id": "00000000-0000-0000-0000-000000000441",
+ "id": "00000000-0000-0000-0000-000000000447",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000444",
+ "id": "00000000-0000-0000-0000-000000000450",
},
},
"viewGroups": {},
@@ -1604,59 +1622,59 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageThread": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000452",
+ "id": "00000000-0000-0000-0000-000000000458",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000455",
+ "id": "00000000-0000-0000-0000-000000000461",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000454",
+ "id": "00000000-0000-0000-0000-000000000460",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000451",
+ "id": "00000000-0000-0000-0000-000000000457",
},
"messageChannelMessageAssociations": {
- "id": "00000000-0000-0000-0000-000000000460",
+ "id": "00000000-0000-0000-0000-000000000466",
},
"messageThreadTargets": {
- "id": "00000000-0000-0000-0000-000000000462",
+ "id": "00000000-0000-0000-0000-000000000468",
},
"messages": {
- "id": "00000000-0000-0000-0000-000000000459",
+ "id": "00000000-0000-0000-0000-000000000465",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000457",
+ "id": "00000000-0000-0000-0000-000000000463",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000458",
+ "id": "00000000-0000-0000-0000-000000000464",
},
"subject": {
- "id": "00000000-0000-0000-0000-000000000461",
+ "id": "00000000-0000-0000-0000-000000000467",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000453",
+ "id": "00000000-0000-0000-0000-000000000459",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000456",
+ "id": "00000000-0000-0000-0000-000000000462",
},
},
- "id": "00000000-0000-0000-0000-000000000468",
+ "id": "00000000-0000-0000-0000-000000000474",
"views": {
"allMessageThreads": {
- "id": "00000000-0000-0000-0000-000000000467",
+ "id": "00000000-0000-0000-0000-000000000473",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000466",
+ "id": "00000000-0000-0000-0000-000000000472",
},
"messages": {
- "id": "00000000-0000-0000-0000-000000000464",
+ "id": "00000000-0000-0000-0000-000000000470",
},
"subject": {
- "id": "00000000-0000-0000-0000-000000000463",
+ "id": "00000000-0000-0000-0000-000000000469",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000465",
+ "id": "00000000-0000-0000-0000-000000000471",
},
},
"viewGroups": {},
@@ -1666,151 +1684,151 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"messageThreadTarget": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000470",
+ "id": "00000000-0000-0000-0000-000000000476",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000473",
+ "id": "00000000-0000-0000-0000-000000000479",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000472",
+ "id": "00000000-0000-0000-0000-000000000478",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000469",
+ "id": "00000000-0000-0000-0000-000000000475",
},
"isAutomaticallyAssigned": {
- "id": "00000000-0000-0000-0000-000000000478",
+ "id": "00000000-0000-0000-0000-000000000484",
},
"isManuallyAssigned": {
- "id": "00000000-0000-0000-0000-000000000479",
+ "id": "00000000-0000-0000-0000-000000000485",
},
"messageThread": {
- "id": "00000000-0000-0000-0000-000000000477",
+ "id": "00000000-0000-0000-0000-000000000483",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000475",
+ "id": "00000000-0000-0000-0000-000000000481",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000476",
+ "id": "00000000-0000-0000-0000-000000000482",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000481",
+ "id": "00000000-0000-0000-0000-000000000487",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000482",
+ "id": "00000000-0000-0000-0000-000000000488",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000480",
+ "id": "00000000-0000-0000-0000-000000000486",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000471",
+ "id": "00000000-0000-0000-0000-000000000477",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000474",
+ "id": "00000000-0000-0000-0000-000000000480",
},
},
- "id": "00000000-0000-0000-0000-000000000483",
+ "id": "00000000-0000-0000-0000-000000000489",
"views": {},
},
"note": {
"fields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000522",
+ "id": "00000000-0000-0000-0000-000000000528",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000520",
+ "id": "00000000-0000-0000-0000-000000000526",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000512",
+ "id": "00000000-0000-0000-0000-000000000518",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000515",
+ "id": "00000000-0000-0000-0000-000000000521",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000514",
+ "id": "00000000-0000-0000-0000-000000000520",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000511",
+ "id": "00000000-0000-0000-0000-000000000517",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000521",
+ "id": "00000000-0000-0000-0000-000000000527",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000517",
+ "id": "00000000-0000-0000-0000-000000000523",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000518",
+ "id": "00000000-0000-0000-0000-000000000524",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000523",
+ "id": "00000000-0000-0000-0000-000000000529",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000519",
+ "id": "00000000-0000-0000-0000-000000000525",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000513",
+ "id": "00000000-0000-0000-0000-000000000519",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000516",
+ "id": "00000000-0000-0000-0000-000000000522",
},
},
- "id": "00000000-0000-0000-0000-000000000541",
+ "id": "00000000-0000-0000-0000-000000000547",
"views": {
"allNotes": {
- "id": "00000000-0000-0000-0000-000000000529",
+ "id": "00000000-0000-0000-0000-000000000535",
"viewFieldGroups": {},
"viewFields": {
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000526",
+ "id": "00000000-0000-0000-0000-000000000532",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000528",
+ "id": "00000000-0000-0000-0000-000000000534",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000527",
+ "id": "00000000-0000-0000-0000-000000000533",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000525",
+ "id": "00000000-0000-0000-0000-000000000531",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000524",
+ "id": "00000000-0000-0000-0000-000000000530",
},
},
"viewGroups": {},
},
"noteRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000540",
+ "id": "00000000-0000-0000-0000-000000000546",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000538",
+ "id": "00000000-0000-0000-0000-000000000544",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000539",
+ "id": "00000000-0000-0000-0000-000000000545",
},
},
"viewFields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000536",
+ "id": "00000000-0000-0000-0000-000000000542",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000533",
+ "id": "00000000-0000-0000-0000-000000000539",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000530",
+ "id": "00000000-0000-0000-0000-000000000536",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000531",
+ "id": "00000000-0000-0000-0000-000000000537",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000532",
+ "id": "00000000-0000-0000-0000-000000000538",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000537",
+ "id": "00000000-0000-0000-0000-000000000543",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000534",
+ "id": "00000000-0000-0000-0000-000000000540",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000535",
+ "id": "00000000-0000-0000-0000-000000000541",
},
},
"viewGroups": {},
@@ -1820,62 +1838,62 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"noteTarget": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000543",
+ "id": "00000000-0000-0000-0000-000000000549",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000546",
+ "id": "00000000-0000-0000-0000-000000000552",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000545",
+ "id": "00000000-0000-0000-0000-000000000551",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000542",
+ "id": "00000000-0000-0000-0000-000000000548",
},
"note": {
- "id": "00000000-0000-0000-0000-000000000550",
+ "id": "00000000-0000-0000-0000-000000000556",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000548",
+ "id": "00000000-0000-0000-0000-000000000554",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000549",
+ "id": "00000000-0000-0000-0000-000000000555",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000552",
+ "id": "00000000-0000-0000-0000-000000000558",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000553",
+ "id": "00000000-0000-0000-0000-000000000559",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000551",
+ "id": "00000000-0000-0000-0000-000000000557",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000544",
+ "id": "00000000-0000-0000-0000-000000000550",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000547",
+ "id": "00000000-0000-0000-0000-000000000553",
},
},
- "id": "00000000-0000-0000-0000-000000000560",
+ "id": "00000000-0000-0000-0000-000000000566",
"views": {
"allNoteTargets": {
- "id": "00000000-0000-0000-0000-000000000559",
+ "id": "00000000-0000-0000-0000-000000000565",
"viewFieldGroups": {},
"viewFields": {
"id": {
- "id": "00000000-0000-0000-0000-000000000554",
+ "id": "00000000-0000-0000-0000-000000000560",
},
"note": {
- "id": "00000000-0000-0000-0000-000000000555",
+ "id": "00000000-0000-0000-0000-000000000561",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000557",
+ "id": "00000000-0000-0000-0000-000000000563",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000558",
+ "id": "00000000-0000-0000-0000-000000000564",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000556",
+ "id": "00000000-0000-0000-0000-000000000562",
},
},
"viewGroups": {},
@@ -1885,192 +1903,192 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"opportunity": {
"fields": {
"amount": {
- "id": "00000000-0000-0000-0000-000000000570",
+ "id": "00000000-0000-0000-0000-000000000576",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000580",
+ "id": "00000000-0000-0000-0000-000000000586",
},
"calendarEventTargets": {
- "id": "00000000-0000-0000-0000-000000000578",
+ "id": "00000000-0000-0000-0000-000000000584",
},
"closeDate": {
- "id": "00000000-0000-0000-0000-000000000571",
+ "id": "00000000-0000-0000-0000-000000000577",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000574",
+ "id": "00000000-0000-0000-0000-000000000580",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000562",
+ "id": "00000000-0000-0000-0000-000000000568",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000565",
+ "id": "00000000-0000-0000-0000-000000000571",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000564",
+ "id": "00000000-0000-0000-0000-000000000570",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000561",
+ "id": "00000000-0000-0000-0000-000000000567",
},
"messageThreadTargets": {
- "id": "00000000-0000-0000-0000-000000000579",
+ "id": "00000000-0000-0000-0000-000000000585",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000569",
+ "id": "00000000-0000-0000-0000-000000000575",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000577",
+ "id": "00000000-0000-0000-0000-000000000583",
},
"owner": {
- "id": "00000000-0000-0000-0000-000000000575",
+ "id": "00000000-0000-0000-0000-000000000581",
},
"pointOfContact": {
- "id": "00000000-0000-0000-0000-000000000573",
+ "id": "00000000-0000-0000-0000-000000000579",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000567",
+ "id": "00000000-0000-0000-0000-000000000573",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000568",
+ "id": "00000000-0000-0000-0000-000000000574",
},
"stage": {
- "id": "00000000-0000-0000-0000-000000000572",
+ "id": "00000000-0000-0000-0000-000000000578",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000576",
+ "id": "00000000-0000-0000-0000-000000000582",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000581",
+ "id": "00000000-0000-0000-0000-000000000587",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000563",
+ "id": "00000000-0000-0000-0000-000000000569",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000566",
+ "id": "00000000-0000-0000-0000-000000000572",
},
},
- "id": "00000000-0000-0000-0000-000000000619",
+ "id": "00000000-0000-0000-0000-000000000625",
"views": {
"allOpportunities": {
- "id": "00000000-0000-0000-0000-000000000588",
+ "id": "00000000-0000-0000-0000-000000000594",
"viewFieldGroups": {},
"viewFields": {
"amount": {
- "id": "00000000-0000-0000-0000-000000000583",
+ "id": "00000000-0000-0000-0000-000000000589",
},
"closeDate": {
- "id": "00000000-0000-0000-0000-000000000585",
+ "id": "00000000-0000-0000-0000-000000000591",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000586",
+ "id": "00000000-0000-0000-0000-000000000592",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000584",
+ "id": "00000000-0000-0000-0000-000000000590",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000582",
+ "id": "00000000-0000-0000-0000-000000000588",
},
"pointOfContact": {
- "id": "00000000-0000-0000-0000-000000000587",
+ "id": "00000000-0000-0000-0000-000000000593",
},
},
"viewGroups": {},
},
"byStage": {
- "id": "00000000-0000-0000-0000-000000000600",
+ "id": "00000000-0000-0000-0000-000000000606",
"viewFieldGroups": {},
"viewFields": {
"amount": {
- "id": "00000000-0000-0000-0000-000000000590",
+ "id": "00000000-0000-0000-0000-000000000596",
},
"closeDate": {
- "id": "00000000-0000-0000-0000-000000000592",
+ "id": "00000000-0000-0000-0000-000000000598",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000593",
+ "id": "00000000-0000-0000-0000-000000000599",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000591",
+ "id": "00000000-0000-0000-0000-000000000597",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000589",
+ "id": "00000000-0000-0000-0000-000000000595",
},
"pointOfContact": {
- "id": "00000000-0000-0000-0000-000000000594",
+ "id": "00000000-0000-0000-0000-000000000600",
},
},
"viewGroups": {
"customer": {
- "id": "00000000-0000-0000-0000-000000000599",
+ "id": "00000000-0000-0000-0000-000000000605",
},
"meeting": {
- "id": "00000000-0000-0000-0000-000000000597",
+ "id": "00000000-0000-0000-0000-000000000603",
},
"new": {
- "id": "00000000-0000-0000-0000-000000000595",
+ "id": "00000000-0000-0000-0000-000000000601",
},
"proposal": {
- "id": "00000000-0000-0000-0000-000000000598",
+ "id": "00000000-0000-0000-0000-000000000604",
},
"screening": {
- "id": "00000000-0000-0000-0000-000000000596",
+ "id": "00000000-0000-0000-0000-000000000602",
},
},
},
"opportunityRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000618",
+ "id": "00000000-0000-0000-0000-000000000624",
"viewFieldGroups": {
"deal": {
- "id": "00000000-0000-0000-0000-000000000615",
+ "id": "00000000-0000-0000-0000-000000000621",
},
"relations": {
- "id": "00000000-0000-0000-0000-000000000616",
+ "id": "00000000-0000-0000-0000-000000000622",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000617",
+ "id": "00000000-0000-0000-0000-000000000623",
},
},
"viewFields": {
"amount": {
- "id": "00000000-0000-0000-0000-000000000601",
+ "id": "00000000-0000-0000-0000-000000000607",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000613",
+ "id": "00000000-0000-0000-0000-000000000619",
},
"closeDate": {
- "id": "00000000-0000-0000-0000-000000000602",
+ "id": "00000000-0000-0000-0000-000000000608",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000604",
+ "id": "00000000-0000-0000-0000-000000000610",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000607",
+ "id": "00000000-0000-0000-0000-000000000613",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000608",
+ "id": "00000000-0000-0000-0000-000000000614",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000612",
+ "id": "00000000-0000-0000-0000-000000000618",
},
"owner": {
- "id": "00000000-0000-0000-0000-000000000606",
+ "id": "00000000-0000-0000-0000-000000000612",
},
"pointOfContact": {
- "id": "00000000-0000-0000-0000-000000000605",
+ "id": "00000000-0000-0000-0000-000000000611",
},
"stage": {
- "id": "00000000-0000-0000-0000-000000000603",
+ "id": "00000000-0000-0000-0000-000000000609",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000611",
+ "id": "00000000-0000-0000-0000-000000000617",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000614",
+ "id": "00000000-0000-0000-0000-000000000620",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000609",
+ "id": "00000000-0000-0000-0000-000000000615",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000610",
+ "id": "00000000-0000-0000-0000-000000000616",
},
},
"viewGroups": {},
@@ -2080,187 +2098,187 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"person": {
"fields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000641",
+ "id": "00000000-0000-0000-0000-000000000647",
},
"avatarFile": {
- "id": "00000000-0000-0000-0000-000000000634",
+ "id": "00000000-0000-0000-0000-000000000640",
},
"avatarUrl": {
- "id": "00000000-0000-0000-0000-000000000633",
+ "id": "00000000-0000-0000-0000-000000000639",
},
"calendarEventParticipants": {
- "id": "00000000-0000-0000-0000-000000000643",
+ "id": "00000000-0000-0000-0000-000000000649",
},
"calendarEventTargets": {
- "id": "00000000-0000-0000-0000-000000000639",
+ "id": "00000000-0000-0000-0000-000000000645",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000635",
+ "id": "00000000-0000-0000-0000-000000000641",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000621",
+ "id": "00000000-0000-0000-0000-000000000627",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000624",
+ "id": "00000000-0000-0000-0000-000000000630",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000623",
+ "id": "00000000-0000-0000-0000-000000000629",
},
"emails": {
- "id": "00000000-0000-0000-0000-000000000629",
+ "id": "00000000-0000-0000-0000-000000000635",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000620",
+ "id": "00000000-0000-0000-0000-000000000626",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000000631",
+ "id": "00000000-0000-0000-0000-000000000637",
},
"linkedinLink": {
- "id": "00000000-0000-0000-0000-000000000630",
+ "id": "00000000-0000-0000-0000-000000000636",
},
"listMemberships": {
- "id": "00000000-0000-0000-0000-000000000645",
+ "id": "00000000-0000-0000-0000-000000000651",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000000642",
+ "id": "00000000-0000-0000-0000-000000000648",
},
"messageThreadTargets": {
- "id": "00000000-0000-0000-0000-000000000640",
+ "id": "00000000-0000-0000-0000-000000000646",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000628",
+ "id": "00000000-0000-0000-0000-000000000634",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000638",
+ "id": "00000000-0000-0000-0000-000000000644",
},
"phones": {
- "id": "00000000-0000-0000-0000-000000000632",
+ "id": "00000000-0000-0000-0000-000000000638",
},
"pointOfContactForOpportunities": {
- "id": "00000000-0000-0000-0000-000000000636",
+ "id": "00000000-0000-0000-0000-000000000642",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000626",
+ "id": "00000000-0000-0000-0000-000000000632",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000627",
+ "id": "00000000-0000-0000-0000-000000000633",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000637",
+ "id": "00000000-0000-0000-0000-000000000643",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000644",
+ "id": "00000000-0000-0000-0000-000000000650",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000622",
+ "id": "00000000-0000-0000-0000-000000000628",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000625",
+ "id": "00000000-0000-0000-0000-000000000631",
},
},
- "id": "00000000-0000-0000-0000-000000000678",
+ "id": "00000000-0000-0000-0000-000000000684",
"views": {
"allPeople": {
- "id": "00000000-0000-0000-0000-000000000654",
+ "id": "00000000-0000-0000-0000-000000000660",
"viewFieldGroups": {},
"viewFields": {
"company": {
- "id": "00000000-0000-0000-0000-000000000649",
+ "id": "00000000-0000-0000-0000-000000000655",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000651",
+ "id": "00000000-0000-0000-0000-000000000657",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000648",
+ "id": "00000000-0000-0000-0000-000000000654",
},
"emails": {
- "id": "00000000-0000-0000-0000-000000000647",
+ "id": "00000000-0000-0000-0000-000000000653",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000000652",
+ "id": "00000000-0000-0000-0000-000000000658",
},
"linkedinLink": {
- "id": "00000000-0000-0000-0000-000000000653",
+ "id": "00000000-0000-0000-0000-000000000659",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000646",
+ "id": "00000000-0000-0000-0000-000000000652",
},
"phones": {
- "id": "00000000-0000-0000-0000-000000000650",
+ "id": "00000000-0000-0000-0000-000000000656",
},
},
"viewGroups": {},
},
"personRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000677",
+ "id": "00000000-0000-0000-0000-000000000683",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000673",
+ "id": "00000000-0000-0000-0000-000000000679",
},
"social": {
- "id": "00000000-0000-0000-0000-000000000675",
+ "id": "00000000-0000-0000-0000-000000000681",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000676",
+ "id": "00000000-0000-0000-0000-000000000682",
},
"work": {
- "id": "00000000-0000-0000-0000-000000000674",
+ "id": "00000000-0000-0000-0000-000000000680",
},
},
"viewFields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000669",
+ "id": "00000000-0000-0000-0000-000000000675",
},
"avatarFile": {
- "id": "00000000-0000-0000-0000-000000000665",
+ "id": "00000000-0000-0000-0000-000000000671",
},
"avatarUrl": {
- "id": "00000000-0000-0000-0000-000000000660",
+ "id": "00000000-0000-0000-0000-000000000666",
},
"calendarEventParticipants": {
- "id": "00000000-0000-0000-0000-000000000671",
+ "id": "00000000-0000-0000-0000-000000000677",
},
"company": {
- "id": "00000000-0000-0000-0000-000000000657",
+ "id": "00000000-0000-0000-0000-000000000663",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000661",
+ "id": "00000000-0000-0000-0000-000000000667",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000662",
+ "id": "00000000-0000-0000-0000-000000000668",
},
"emails": {
- "id": "00000000-0000-0000-0000-000000000655",
+ "id": "00000000-0000-0000-0000-000000000661",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000000658",
+ "id": "00000000-0000-0000-0000-000000000664",
},
"linkedinLink": {
- "id": "00000000-0000-0000-0000-000000000659",
+ "id": "00000000-0000-0000-0000-000000000665",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000000670",
+ "id": "00000000-0000-0000-0000-000000000676",
},
"noteTargets": {
- "id": "00000000-0000-0000-0000-000000000668",
+ "id": "00000000-0000-0000-0000-000000000674",
},
"phones": {
- "id": "00000000-0000-0000-0000-000000000656",
+ "id": "00000000-0000-0000-0000-000000000662",
},
"pointOfContactForOpportunities": {
- "id": "00000000-0000-0000-0000-000000000666",
+ "id": "00000000-0000-0000-0000-000000000672",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000667",
+ "id": "00000000-0000-0000-0000-000000000673",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000672",
+ "id": "00000000-0000-0000-0000-000000000678",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000663",
+ "id": "00000000-0000-0000-0000-000000000669",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000664",
+ "id": "00000000-0000-0000-0000-000000000670",
},
},
"viewGroups": {},
@@ -2270,203 +2288,203 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"task": {
"fields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000693",
+ "id": "00000000-0000-0000-0000-000000000699",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000692",
+ "id": "00000000-0000-0000-0000-000000000698",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000688",
+ "id": "00000000-0000-0000-0000-000000000694",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000680",
+ "id": "00000000-0000-0000-0000-000000000686",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000683",
+ "id": "00000000-0000-0000-0000-000000000689",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000682",
+ "id": "00000000-0000-0000-0000-000000000688",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000689",
+ "id": "00000000-0000-0000-0000-000000000695",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000679",
+ "id": "00000000-0000-0000-0000-000000000685",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000685",
+ "id": "00000000-0000-0000-0000-000000000691",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000686",
+ "id": "00000000-0000-0000-0000-000000000692",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000690",
+ "id": "00000000-0000-0000-0000-000000000696",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000691",
+ "id": "00000000-0000-0000-0000-000000000697",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000694",
+ "id": "00000000-0000-0000-0000-000000000700",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000687",
+ "id": "00000000-0000-0000-0000-000000000693",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000681",
+ "id": "00000000-0000-0000-0000-000000000687",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000684",
+ "id": "00000000-0000-0000-0000-000000000690",
},
},
- "id": "00000000-0000-0000-0000-000000000739",
+ "id": "00000000-0000-0000-0000-000000000745",
"views": {
"allTasks": {
- "id": "00000000-0000-0000-0000-000000000703",
+ "id": "00000000-0000-0000-0000-000000000709",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000700",
+ "id": "00000000-0000-0000-0000-000000000706",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000701",
+ "id": "00000000-0000-0000-0000-000000000707",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000702",
+ "id": "00000000-0000-0000-0000-000000000708",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000698",
+ "id": "00000000-0000-0000-0000-000000000704",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000699",
+ "id": "00000000-0000-0000-0000-000000000705",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000696",
+ "id": "00000000-0000-0000-0000-000000000702",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000697",
+ "id": "00000000-0000-0000-0000-000000000703",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000695",
+ "id": "00000000-0000-0000-0000-000000000701",
},
},
"viewGroups": {},
},
"assignedToMe": {
- "id": "00000000-0000-0000-0000-000000000715",
+ "id": "00000000-0000-0000-0000-000000000721",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000708",
+ "id": "00000000-0000-0000-0000-000000000714",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000709",
+ "id": "00000000-0000-0000-0000-000000000715",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000710",
+ "id": "00000000-0000-0000-0000-000000000716",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000706",
+ "id": "00000000-0000-0000-0000-000000000712",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000707",
+ "id": "00000000-0000-0000-0000-000000000713",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000705",
+ "id": "00000000-0000-0000-0000-000000000711",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000704",
+ "id": "00000000-0000-0000-0000-000000000710",
},
},
"viewGroups": {
"done": {
- "id": "00000000-0000-0000-0000-000000000713",
+ "id": "00000000-0000-0000-0000-000000000719",
},
"empty": {
- "id": "00000000-0000-0000-0000-000000000714",
+ "id": "00000000-0000-0000-0000-000000000720",
},
"inProgress": {
- "id": "00000000-0000-0000-0000-000000000712",
+ "id": "00000000-0000-0000-0000-000000000718",
},
"todo": {
- "id": "00000000-0000-0000-0000-000000000711",
+ "id": "00000000-0000-0000-0000-000000000717",
},
},
},
"byStatus": {
- "id": "00000000-0000-0000-0000-000000000724",
+ "id": "00000000-0000-0000-0000-000000000730",
"viewFieldGroups": {},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000719",
+ "id": "00000000-0000-0000-0000-000000000725",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000720",
+ "id": "00000000-0000-0000-0000-000000000726",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000718",
+ "id": "00000000-0000-0000-0000-000000000724",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000717",
+ "id": "00000000-0000-0000-0000-000000000723",
},
"title": {
- "id": "00000000-0000-0000-0000-000000000716",
+ "id": "00000000-0000-0000-0000-000000000722",
},
},
"viewGroups": {
"done": {
- "id": "00000000-0000-0000-0000-000000000723",
+ "id": "00000000-0000-0000-0000-000000000729",
},
"inProgress": {
- "id": "00000000-0000-0000-0000-000000000722",
+ "id": "00000000-0000-0000-0000-000000000728",
},
"todo": {
- "id": "00000000-0000-0000-0000-000000000721",
+ "id": "00000000-0000-0000-0000-000000000727",
},
},
},
"taskRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000738",
+ "id": "00000000-0000-0000-0000-000000000744",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000736",
+ "id": "00000000-0000-0000-0000-000000000742",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000737",
+ "id": "00000000-0000-0000-0000-000000000743",
},
},
"viewFields": {
"assignee": {
- "id": "00000000-0000-0000-0000-000000000727",
+ "id": "00000000-0000-0000-0000-000000000733",
},
"attachments": {
- "id": "00000000-0000-0000-0000-000000000734",
+ "id": "00000000-0000-0000-0000-000000000740",
},
"bodyV2": {
- "id": "00000000-0000-0000-0000-000000000731",
+ "id": "00000000-0000-0000-0000-000000000737",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000728",
+ "id": "00000000-0000-0000-0000-000000000734",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000729",
+ "id": "00000000-0000-0000-0000-000000000735",
},
"dueAt": {
- "id": "00000000-0000-0000-0000-000000000725",
+ "id": "00000000-0000-0000-0000-000000000731",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000726",
+ "id": "00000000-0000-0000-0000-000000000732",
},
"taskTargets": {
- "id": "00000000-0000-0000-0000-000000000730",
+ "id": "00000000-0000-0000-0000-000000000736",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000735",
+ "id": "00000000-0000-0000-0000-000000000741",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000732",
+ "id": "00000000-0000-0000-0000-000000000738",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000733",
+ "id": "00000000-0000-0000-0000-000000000739",
},
},
"viewGroups": {},
@@ -2476,62 +2494,62 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"taskTarget": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000741",
+ "id": "00000000-0000-0000-0000-000000000747",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000744",
+ "id": "00000000-0000-0000-0000-000000000750",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000743",
+ "id": "00000000-0000-0000-0000-000000000749",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000740",
+ "id": "00000000-0000-0000-0000-000000000746",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000746",
+ "id": "00000000-0000-0000-0000-000000000752",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000747",
+ "id": "00000000-0000-0000-0000-000000000753",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000750",
+ "id": "00000000-0000-0000-0000-000000000756",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000751",
+ "id": "00000000-0000-0000-0000-000000000757",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000749",
+ "id": "00000000-0000-0000-0000-000000000755",
},
"task": {
- "id": "00000000-0000-0000-0000-000000000748",
+ "id": "00000000-0000-0000-0000-000000000754",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000742",
+ "id": "00000000-0000-0000-0000-000000000748",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000745",
+ "id": "00000000-0000-0000-0000-000000000751",
},
},
- "id": "00000000-0000-0000-0000-000000000758",
+ "id": "00000000-0000-0000-0000-000000000764",
"views": {
"allTaskTargets": {
- "id": "00000000-0000-0000-0000-000000000757",
+ "id": "00000000-0000-0000-0000-000000000763",
"viewFieldGroups": {},
"viewFields": {
"id": {
- "id": "00000000-0000-0000-0000-000000000752",
+ "id": "00000000-0000-0000-0000-000000000758",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000755",
+ "id": "00000000-0000-0000-0000-000000000761",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000756",
+ "id": "00000000-0000-0000-0000-000000000762",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000754",
+ "id": "00000000-0000-0000-0000-000000000760",
},
"task": {
- "id": "00000000-0000-0000-0000-000000000753",
+ "id": "00000000-0000-0000-0000-000000000759",
},
},
"viewGroups": {},
@@ -2541,128 +2559,128 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"timelineActivity": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000760",
+ "id": "00000000-0000-0000-0000-000000000766",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000763",
+ "id": "00000000-0000-0000-0000-000000000769",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000762",
+ "id": "00000000-0000-0000-0000-000000000768",
},
"happensAt": {
- "id": "00000000-0000-0000-0000-000000000769",
+ "id": "00000000-0000-0000-0000-000000000775",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000759",
+ "id": "00000000-0000-0000-0000-000000000765",
},
"linkedObjectMetadataId": {
- "id": "00000000-0000-0000-0000-000000000785",
+ "id": "00000000-0000-0000-0000-000000000791",
},
"linkedRecordCachedName": {
- "id": "00000000-0000-0000-0000-000000000783",
+ "id": "00000000-0000-0000-0000-000000000789",
},
"linkedRecordId": {
- "id": "00000000-0000-0000-0000-000000000784",
+ "id": "00000000-0000-0000-0000-000000000790",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000765",
+ "id": "00000000-0000-0000-0000-000000000771",
},
"properties": {
- "id": "00000000-0000-0000-0000-000000000770",
+ "id": "00000000-0000-0000-0000-000000000776",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000766",
+ "id": "00000000-0000-0000-0000-000000000772",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000773",
+ "id": "00000000-0000-0000-0000-000000000779",
},
"targetDashboard": {
- "id": "00000000-0000-0000-0000-000000000780",
+ "id": "00000000-0000-0000-0000-000000000786",
},
"targetMessageCampaign": {
- "id": "00000000-0000-0000-0000-000000000782",
+ "id": "00000000-0000-0000-0000-000000000788",
},
"targetMessageList": {
- "id": "00000000-0000-0000-0000-000000000781",
+ "id": "00000000-0000-0000-0000-000000000787",
},
"targetNote": {
- "id": "00000000-0000-0000-0000-000000000776",
+ "id": "00000000-0000-0000-0000-000000000782",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000774",
+ "id": "00000000-0000-0000-0000-000000000780",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000772",
+ "id": "00000000-0000-0000-0000-000000000778",
},
"targetTask": {
- "id": "00000000-0000-0000-0000-000000000775",
+ "id": "00000000-0000-0000-0000-000000000781",
},
"targetWorkflow": {
- "id": "00000000-0000-0000-0000-000000000777",
+ "id": "00000000-0000-0000-0000-000000000783",
},
"targetWorkflowRun": {
- "id": "00000000-0000-0000-0000-000000000779",
+ "id": "00000000-0000-0000-0000-000000000785",
},
"targetWorkflowVersion": {
- "id": "00000000-0000-0000-0000-000000000778",
+ "id": "00000000-0000-0000-0000-000000000784",
},
"timelineActivityTypeId": {
- "id": "00000000-0000-0000-0000-000000000767",
+ "id": "00000000-0000-0000-0000-000000000773",
},
"timelineActivityTypeSnapshot": {
- "id": "00000000-0000-0000-0000-000000000768",
+ "id": "00000000-0000-0000-0000-000000000774",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000761",
+ "id": "00000000-0000-0000-0000-000000000767",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000764",
+ "id": "00000000-0000-0000-0000-000000000770",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000771",
+ "id": "00000000-0000-0000-0000-000000000777",
},
},
- "id": "00000000-0000-0000-0000-000000000799",
+ "id": "00000000-0000-0000-0000-000000000805",
"views": {
"allTimelineActivities": {
- "id": "00000000-0000-0000-0000-000000000798",
+ "id": "00000000-0000-0000-0000-000000000804",
"viewFieldGroups": {},
"viewFields": {
"happensAt": {
- "id": "00000000-0000-0000-0000-000000000787",
+ "id": "00000000-0000-0000-0000-000000000793",
},
"linkedRecordCachedName": {
- "id": "00000000-0000-0000-0000-000000000786",
+ "id": "00000000-0000-0000-0000-000000000792",
},
"targetCompany": {
- "id": "00000000-0000-0000-0000-000000000790",
+ "id": "00000000-0000-0000-0000-000000000796",
},
"targetDashboard": {
- "id": "00000000-0000-0000-0000-000000000797",
+ "id": "00000000-0000-0000-0000-000000000803",
},
"targetNote": {
- "id": "00000000-0000-0000-0000-000000000793",
+ "id": "00000000-0000-0000-0000-000000000799",
},
"targetOpportunity": {
- "id": "00000000-0000-0000-0000-000000000791",
+ "id": "00000000-0000-0000-0000-000000000797",
},
"targetPerson": {
- "id": "00000000-0000-0000-0000-000000000789",
+ "id": "00000000-0000-0000-0000-000000000795",
},
"targetTask": {
- "id": "00000000-0000-0000-0000-000000000792",
+ "id": "00000000-0000-0000-0000-000000000798",
},
"targetWorkflow": {
- "id": "00000000-0000-0000-0000-000000000794",
+ "id": "00000000-0000-0000-0000-000000000800",
},
"targetWorkflowRun": {
- "id": "00000000-0000-0000-0000-000000000796",
+ "id": "00000000-0000-0000-0000-000000000802",
},
"targetWorkflowVersion": {
- "id": "00000000-0000-0000-0000-000000000795",
+ "id": "00000000-0000-0000-0000-000000000801",
},
"workspaceMember": {
- "id": "00000000-0000-0000-0000-000000000788",
+ "id": "00000000-0000-0000-0000-000000000794",
},
},
"viewGroups": {},
@@ -2672,80 +2690,80 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflow": {
"fields": {
"attachments": {
- "id": "00000000-0000-0000-0000-000000000816",
+ "id": "00000000-0000-0000-0000-000000000822",
},
"automatedTriggers": {
- "id": "00000000-0000-0000-0000-000000000814",
+ "id": "00000000-0000-0000-0000-000000000820",
},
"coreWorkflowId": {
- "id": "00000000-0000-0000-0000-000000000810",
+ "id": "00000000-0000-0000-0000-000000000816",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000801",
+ "id": "00000000-0000-0000-0000-000000000807",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000804",
+ "id": "00000000-0000-0000-0000-000000000810",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000803",
+ "id": "00000000-0000-0000-0000-000000000809",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000800",
+ "id": "00000000-0000-0000-0000-000000000806",
},
"lastPublishedVersionId": {
- "id": "00000000-0000-0000-0000-000000000809",
+ "id": "00000000-0000-0000-0000-000000000815",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000808",
+ "id": "00000000-0000-0000-0000-000000000814",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000806",
+ "id": "00000000-0000-0000-0000-000000000812",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000813",
+ "id": "00000000-0000-0000-0000-000000000819",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000807",
+ "id": "00000000-0000-0000-0000-000000000813",
},
"statuses": {
- "id": "00000000-0000-0000-0000-000000000811",
+ "id": "00000000-0000-0000-0000-000000000817",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000815",
+ "id": "00000000-0000-0000-0000-000000000821",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000802",
+ "id": "00000000-0000-0000-0000-000000000808",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000805",
+ "id": "00000000-0000-0000-0000-000000000811",
},
"versions": {
- "id": "00000000-0000-0000-0000-000000000812",
+ "id": "00000000-0000-0000-0000-000000000818",
},
},
- "id": "00000000-0000-0000-0000-000000000824",
+ "id": "00000000-0000-0000-0000-000000000830",
"views": {
"allWorkflows": {
- "id": "00000000-0000-0000-0000-000000000823",
+ "id": "00000000-0000-0000-0000-000000000829",
"viewFieldGroups": {},
"viewFields": {
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000820",
+ "id": "00000000-0000-0000-0000-000000000826",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000817",
+ "id": "00000000-0000-0000-0000-000000000823",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000822",
+ "id": "00000000-0000-0000-0000-000000000828",
},
"statuses": {
- "id": "00000000-0000-0000-0000-000000000818",
+ "id": "00000000-0000-0000-0000-000000000824",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000819",
+ "id": "00000000-0000-0000-0000-000000000825",
},
"versions": {
- "id": "00000000-0000-0000-0000-000000000821",
+ "id": "00000000-0000-0000-0000-000000000827",
},
},
"viewGroups": {},
@@ -2755,79 +2773,79 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowAutomatedTrigger": {
"fields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000826",
+ "id": "00000000-0000-0000-0000-000000000832",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000829",
+ "id": "00000000-0000-0000-0000-000000000835",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000828",
+ "id": "00000000-0000-0000-0000-000000000834",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000825",
+ "id": "00000000-0000-0000-0000-000000000831",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000831",
+ "id": "00000000-0000-0000-0000-000000000837",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000832",
+ "id": "00000000-0000-0000-0000-000000000838",
},
"settings": {
- "id": "00000000-0000-0000-0000-000000000834",
+ "id": "00000000-0000-0000-0000-000000000840",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000833",
+ "id": "00000000-0000-0000-0000-000000000839",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000827",
+ "id": "00000000-0000-0000-0000-000000000833",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000830",
+ "id": "00000000-0000-0000-0000-000000000836",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000835",
+ "id": "00000000-0000-0000-0000-000000000841",
},
},
- "id": "00000000-0000-0000-0000-000000000847",
+ "id": "00000000-0000-0000-0000-000000000853",
"views": {
"allWorkflowAutomatedTriggers": {
- "id": "00000000-0000-0000-0000-000000000839",
+ "id": "00000000-0000-0000-0000-000000000845",
"viewFieldGroups": {},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000838",
+ "id": "00000000-0000-0000-0000-000000000844",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000836",
+ "id": "00000000-0000-0000-0000-000000000842",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000837",
+ "id": "00000000-0000-0000-0000-000000000843",
},
},
"viewGroups": {},
},
"workflowAutomatedTriggerRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000846",
+ "id": "00000000-0000-0000-0000-000000000852",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000844",
+ "id": "00000000-0000-0000-0000-000000000850",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000845",
+ "id": "00000000-0000-0000-0000-000000000851",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000842",
+ "id": "00000000-0000-0000-0000-000000000848",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000843",
+ "id": "00000000-0000-0000-0000-000000000849",
},
"type": {
- "id": "00000000-0000-0000-0000-000000000840",
+ "id": "00000000-0000-0000-0000-000000000846",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000841",
+ "id": "00000000-0000-0000-0000-000000000847",
},
},
"viewGroups": {},
@@ -2837,130 +2855,130 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowRun": {
"fields": {
"coreWorkflowId": {
- "id": "00000000-0000-0000-0000-000000000865",
+ "id": "00000000-0000-0000-0000-000000000871",
},
"coreWorkflowVersionId": {
- "id": "00000000-0000-0000-0000-000000000866",
+ "id": "00000000-0000-0000-0000-000000000872",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000849",
+ "id": "00000000-0000-0000-0000-000000000855",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000852",
+ "id": "00000000-0000-0000-0000-000000000858",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000851",
+ "id": "00000000-0000-0000-0000-000000000857",
},
"endedAt": {
- "id": "00000000-0000-0000-0000-000000000861",
+ "id": "00000000-0000-0000-0000-000000000867",
},
"enqueuedAt": {
- "id": "00000000-0000-0000-0000-000000000859",
+ "id": "00000000-0000-0000-0000-000000000865",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000848",
+ "id": "00000000-0000-0000-0000-000000000854",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000856",
+ "id": "00000000-0000-0000-0000-000000000862",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000854",
+ "id": "00000000-0000-0000-0000-000000000860",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000855",
+ "id": "00000000-0000-0000-0000-000000000861",
},
"startedAt": {
- "id": "00000000-0000-0000-0000-000000000860",
+ "id": "00000000-0000-0000-0000-000000000866",
},
"state": {
- "id": "00000000-0000-0000-0000-000000000863",
+ "id": "00000000-0000-0000-0000-000000000869",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000862",
+ "id": "00000000-0000-0000-0000-000000000868",
},
"stepLogs": {
- "id": "00000000-0000-0000-0000-000000000864",
+ "id": "00000000-0000-0000-0000-000000000870",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000867",
+ "id": "00000000-0000-0000-0000-000000000873",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000850",
+ "id": "00000000-0000-0000-0000-000000000856",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000853",
+ "id": "00000000-0000-0000-0000-000000000859",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000858",
+ "id": "00000000-0000-0000-0000-000000000864",
},
"workflowVersion": {
- "id": "00000000-0000-0000-0000-000000000857",
+ "id": "00000000-0000-0000-0000-000000000863",
},
},
- "id": "00000000-0000-0000-0000-000000000887",
+ "id": "00000000-0000-0000-0000-000000000893",
"views": {
"allWorkflowRuns": {
- "id": "00000000-0000-0000-0000-000000000871",
+ "id": "00000000-0000-0000-0000-000000000877",
"viewFieldGroups": {},
"viewFields": {
"name": {
- "id": "00000000-0000-0000-0000-000000000868",
+ "id": "00000000-0000-0000-0000-000000000874",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000870",
+ "id": "00000000-0000-0000-0000-000000000876",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000869",
+ "id": "00000000-0000-0000-0000-000000000875",
},
},
"viewGroups": {},
},
"workflowRunRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000886",
+ "id": "00000000-0000-0000-0000-000000000892",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000884",
+ "id": "00000000-0000-0000-0000-000000000890",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000885",
+ "id": "00000000-0000-0000-0000-000000000891",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000877",
+ "id": "00000000-0000-0000-0000-000000000883",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000878",
+ "id": "00000000-0000-0000-0000-000000000884",
},
"endedAt": {
- "id": "00000000-0000-0000-0000-000000000876",
+ "id": "00000000-0000-0000-0000-000000000882",
},
"enqueuedAt": {
- "id": "00000000-0000-0000-0000-000000000879",
+ "id": "00000000-0000-0000-0000-000000000885",
},
"startedAt": {
- "id": "00000000-0000-0000-0000-000000000875",
+ "id": "00000000-0000-0000-0000-000000000881",
},
"state": {
- "id": "00000000-0000-0000-0000-000000000880",
+ "id": "00000000-0000-0000-0000-000000000886",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000872",
+ "id": "00000000-0000-0000-0000-000000000878",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000883",
+ "id": "00000000-0000-0000-0000-000000000889",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000881",
+ "id": "00000000-0000-0000-0000-000000000887",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000882",
+ "id": "00000000-0000-0000-0000-000000000888",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000873",
+ "id": "00000000-0000-0000-0000-000000000879",
},
"workflowVersion": {
- "id": "00000000-0000-0000-0000-000000000874",
+ "id": "00000000-0000-0000-0000-000000000880",
},
},
"viewGroups": {},
@@ -2970,118 +2988,118 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workflowVersion": {
"fields": {
"coreWorkflowVersionId": {
- "id": "00000000-0000-0000-0000-000000000902",
+ "id": "00000000-0000-0000-0000-000000000908",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000889",
+ "id": "00000000-0000-0000-0000-000000000895",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000892",
+ "id": "00000000-0000-0000-0000-000000000898",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000891",
+ "id": "00000000-0000-0000-0000-000000000897",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000888",
+ "id": "00000000-0000-0000-0000-000000000894",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000896",
+ "id": "00000000-0000-0000-0000-000000000902",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000894",
+ "id": "00000000-0000-0000-0000-000000000900",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000900",
+ "id": "00000000-0000-0000-0000-000000000906",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000895",
+ "id": "00000000-0000-0000-0000-000000000901",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000899",
+ "id": "00000000-0000-0000-0000-000000000905",
},
"steps": {
- "id": "00000000-0000-0000-0000-000000000901",
+ "id": "00000000-0000-0000-0000-000000000907",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000903",
+ "id": "00000000-0000-0000-0000-000000000909",
},
"trigger": {
- "id": "00000000-0000-0000-0000-000000000898",
+ "id": "00000000-0000-0000-0000-000000000904",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000890",
+ "id": "00000000-0000-0000-0000-000000000896",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000893",
+ "id": "00000000-0000-0000-0000-000000000899",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000897",
+ "id": "00000000-0000-0000-0000-000000000903",
},
},
- "id": "00000000-0000-0000-0000-000000000923",
+ "id": "00000000-0000-0000-0000-000000000929",
"views": {
"allWorkflowVersions": {
- "id": "00000000-0000-0000-0000-000000000909",
+ "id": "00000000-0000-0000-0000-000000000915",
"viewFieldGroups": {},
"viewFields": {
"name": {
- "id": "00000000-0000-0000-0000-000000000904",
+ "id": "00000000-0000-0000-0000-000000000910",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000908",
+ "id": "00000000-0000-0000-0000-000000000914",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000906",
+ "id": "00000000-0000-0000-0000-000000000912",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000907",
+ "id": "00000000-0000-0000-0000-000000000913",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000905",
+ "id": "00000000-0000-0000-0000-000000000911",
},
},
"viewGroups": {},
},
"workflowVersionRecordPageFields": {
- "id": "00000000-0000-0000-0000-000000000922",
+ "id": "00000000-0000-0000-0000-000000000928",
"viewFieldGroups": {
"general": {
- "id": "00000000-0000-0000-0000-000000000920",
+ "id": "00000000-0000-0000-0000-000000000926",
},
"system": {
- "id": "00000000-0000-0000-0000-000000000921",
+ "id": "00000000-0000-0000-0000-000000000927",
},
},
"viewFields": {
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000913",
+ "id": "00000000-0000-0000-0000-000000000919",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000915",
+ "id": "00000000-0000-0000-0000-000000000921",
},
"runs": {
- "id": "00000000-0000-0000-0000-000000000918",
+ "id": "00000000-0000-0000-0000-000000000924",
},
"status": {
- "id": "00000000-0000-0000-0000-000000000910",
+ "id": "00000000-0000-0000-0000-000000000916",
},
"steps": {
- "id": "00000000-0000-0000-0000-000000000914",
+ "id": "00000000-0000-0000-0000-000000000920",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000919",
+ "id": "00000000-0000-0000-0000-000000000925",
},
"trigger": {
- "id": "00000000-0000-0000-0000-000000000912",
+ "id": "00000000-0000-0000-0000-000000000918",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000916",
+ "id": "00000000-0000-0000-0000-000000000922",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000917",
+ "id": "00000000-0000-0000-0000-000000000923",
},
"workflow": {
- "id": "00000000-0000-0000-0000-000000000911",
+ "id": "00000000-0000-0000-0000-000000000917",
},
},
"viewGroups": {},
@@ -3091,110 +3109,110 @@ exports[`getStandardObjectMetadataRelatedEntityIds should return standard object
"workspaceMember": {
"fields": {
"accountOwnerForCompanies": {
- "id": "00000000-0000-0000-0000-000000000943",
+ "id": "00000000-0000-0000-0000-000000000949",
},
"assignedTasks": {
- "id": "00000000-0000-0000-0000-000000000941",
+ "id": "00000000-0000-0000-0000-000000000947",
},
"avatarUrl": {
- "id": "00000000-0000-0000-0000-000000000937",
+ "id": "00000000-0000-0000-0000-000000000943",
},
"blocklist": {
- "id": "00000000-0000-0000-0000-000000000945",
+ "id": "00000000-0000-0000-0000-000000000951",
},
"calendarEventParticipants": {
- "id": "00000000-0000-0000-0000-000000000946",
+ "id": "00000000-0000-0000-0000-000000000952",
},
"calendarStartDay": {
- "id": "00000000-0000-0000-0000-000000000951",
+ "id": "00000000-0000-0000-0000-000000000957",
},
"colorScheme": {
- "id": "00000000-0000-0000-0000-000000000933",
+ "id": "00000000-0000-0000-0000-000000000939",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000925",
+ "id": "00000000-0000-0000-0000-000000000931",
},
"createdBy": {
- "id": "00000000-0000-0000-0000-000000000928",
+ "id": "00000000-0000-0000-0000-000000000934",
},
"dateFormat": {
- "id": "00000000-0000-0000-0000-000000000949",
+ "id": "00000000-0000-0000-0000-000000000955",
},
"deletedAt": {
- "id": "00000000-0000-0000-0000-000000000927",
+ "id": "00000000-0000-0000-0000-000000000933",
},
"id": {
- "id": "00000000-0000-0000-0000-000000000924",
+ "id": "00000000-0000-0000-0000-000000000930",
},
"jobTitle": {
- "id": "00000000-0000-0000-0000-000000000939",
+ "id": "00000000-0000-0000-0000-000000000945",
},
"locale": {
- "id": "00000000-0000-0000-0000-000000000936",
+ "id": "00000000-0000-0000-0000-000000000942",
},
"messageParticipants": {
- "id": "00000000-0000-0000-0000-000000000944",
+ "id": "00000000-0000-0000-0000-000000000950",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000932",
+ "id": "00000000-0000-0000-0000-000000000938",
},
"numberFormat": {
- "id": "00000000-0000-0000-0000-000000000952",
+ "id": "00000000-0000-0000-0000-000000000958",
},
"openRecordIn": {
- "id": "00000000-0000-0000-0000-000000000935",
+ "id": "00000000-0000-0000-0000-000000000941",
},
"ownedOpportunities": {
- "id": "00000000-0000-0000-0000-000000000942",
+ "id": "00000000-0000-0000-0000-000000000948",
},
"position": {
- "id": "00000000-0000-0000-0000-000000000930",
+ "id": "00000000-0000-0000-0000-000000000936",
},
"searchVector": {
- "id": "00000000-0000-0000-0000-000000000931",
+ "id": "00000000-0000-0000-0000-000000000937",
},
"timeFormat": {
- "id": "00000000-0000-0000-0000-000000000950",
+ "id": "00000000-0000-0000-0000-000000000956",
},
"timeZone": {
- "id": "00000000-0000-0000-0000-000000000948",
+ "id": "00000000-0000-0000-0000-000000000954",
},
"timelineActivities": {
- "id": "00000000-0000-0000-0000-000000000947",
+ "id": "00000000-0000-0000-0000-000000000953",
},
"uiScale": {
- "id": "00000000-0000-0000-0000-000000000934",
+ "id": "00000000-0000-0000-0000-000000000940",
},
"updatedAt": {
- "id": "00000000-0000-0000-0000-000000000926",
+ "id": "00000000-0000-0000-0000-000000000932",
},
"updatedBy": {
- "id": "00000000-0000-0000-0000-000000000929",
+ "id": "00000000-0000-0000-0000-000000000935",
},
"userEmail": {
- "id": "00000000-0000-0000-0000-000000000938",
+ "id": "00000000-0000-0000-0000-000000000944",
},
"userId": {
- "id": "00000000-0000-0000-0000-000000000940",
+ "id": "00000000-0000-0000-0000-000000000946",
},
},
- "id": "00000000-0000-0000-0000-000000000958",
+ "id": "00000000-0000-0000-0000-000000000964",
"views": {
"allWorkspaceMembers": {
- "id": "00000000-0000-0000-0000-000000000957",
+ "id": "00000000-0000-0000-0000-000000000963",
"viewFieldGroups": {},
"viewFields": {
"assignedTasks": {
- "id": "00000000-0000-0000-0000-000000000956",
+ "id": "00000000-0000-0000-0000-000000000962",
},
"createdAt": {
- "id": "00000000-0000-0000-0000-000000000954",
+ "id": "00000000-0000-0000-0000-000000000960",
},
"name": {
- "id": "00000000-0000-0000-0000-000000000953",
+ "id": "00000000-0000-0000-0000-000000000959",
},
"ownedOpportunities": {
- "id": "00000000-0000-0000-0000-000000000955",
+ "id": "00000000-0000-0000-0000-000000000961",
},
},
"viewGroups": {},
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-campaign-standard-flat-field-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-campaign-standard-flat-field-metadata.util.ts
index 3e5f397f1e0..a9b4c7b6672 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-campaign-standard-flat-field-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/field-metadata/compute-message-campaign-standard-flat-field-metadata.util.ts
@@ -356,6 +356,15 @@ export const buildMessageCampaignStandardFlatFieldMetadatas = ({
position: 4,
color: 'orange',
},
+ {
+ id: '3f0d9c41-6a52-4e88-9b74-5c2ad83f1e60',
+ value: 'CANCELED',
+ label: i18nLabel(
+ msg({ message: `Canceled`, context: 'fieldMetadata.label' }),
+ ),
+ position: 5,
+ color: 'red',
+ },
],
},
}),
@@ -399,6 +408,26 @@ export const buildMessageCampaignStandardFlatFieldMetadatas = ({
defaultValue: 0,
},
}),
+ deliveredCount: createStandardFieldFlatMetadata({
+ ...base,
+ context: {
+ fieldName: 'deliveredCount',
+ type: FieldMetadataType.NUMBER,
+ label: i18nLabel(
+ msg({ message: `Delivered count`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Number of emails confirmed delivered`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconMailCheck',
+ isNullable: false,
+ isUIEditable: false,
+ defaultValue: 0,
+ },
+ }),
failedCount: createStandardFieldFlatMetadata({
...base,
context: {
@@ -459,6 +488,26 @@ export const buildMessageCampaignStandardFlatFieldMetadatas = ({
defaultValue: 0,
},
}),
+ skippedCount: createStandardFieldFlatMetadata({
+ ...base,
+ context: {
+ fieldName: 'skippedCount',
+ type: FieldMetadataType.NUMBER,
+ label: i18nLabel(
+ msg({ message: `Skipped count`, context: 'fieldMetadata.label' }),
+ ),
+ description: i18nLabel(
+ msg({
+ message: `Number of recipients skipped without being emailed`,
+ context: 'fieldMetadata.description',
+ }),
+ ),
+ icon: 'IconMailOff',
+ isNullable: false,
+ isUIEditable: false,
+ defaultValue: 0,
+ },
+ }),
unsubscribeTopicId: createStandardFieldFlatMetadata({
...base,
context: {
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-standard-flat-index-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-standard-flat-index-metadata.util.ts
index 0a3fc3f9efe..00e2712a8be 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-standard-flat-index-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/index/compute-message-standard-flat-index-metadata.util.ts
@@ -40,4 +40,16 @@ export const buildMessageStandardFlatIndexMetadatas = ({
twentyStandardApplicationId,
now,
}),
+ headerMessageIdIndex: createStandardIndexFlatMetadata({
+ objectName,
+ workspaceId,
+ context: {
+ indexName: 'headerMessageIdIndex',
+ relatedFieldNames: ['headerMessageId'],
+ },
+ standardObjectMetadataRelatedEntityIds,
+ dependencyFlatEntityMaps,
+ twentyStandardApplicationId,
+ now,
+ }),
});
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
index c37151c2079..b77f6910ad8 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/object-metadata/create-standard-flat-object-metadata.util.ts
@@ -431,6 +431,7 @@ export const STANDARD_FLAT_OBJECT_METADATA_BUILDERS_BY_OBJECT_NAME = {
),
icon: 'IconSend',
isSystem: true,
+ isSearchable: true,
isUICreatable: false,
labelIdentifierFieldMetadataName: 'name',
},
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/__tests__/compute-standard-message-campaign-view-fields.util.spec.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/__tests__/compute-standard-message-campaign-view-fields.util.spec.ts
new file mode 100644
index 00000000000..64a65eb4260
--- /dev/null
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/__tests__/compute-standard-message-campaign-view-fields.util.spec.ts
@@ -0,0 +1,93 @@
+import { STANDARD_OBJECTS } from 'twenty-shared/metadata';
+
+import { computeStandardMessageCampaignViewFields } from 'src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-campaign-view-fields.util';
+
+const MESSAGE_CAMPAIGN = STANDARD_OBJECTS.messageCampaign;
+
+const buildArgs = () => {
+ const views = Object.fromEntries(
+ Object.entries(MESSAGE_CAMPAIGN.views).map(([viewName, view]) => [
+ viewName,
+ {
+ id: `${viewName}-id`,
+ viewFieldGroups: Object.fromEntries(
+ Object.keys(
+ (view as { viewFieldGroups?: Record<string, unknown> })
+ .viewFieldGroups ?? {},
+ ).map((groupName) => [
+ groupName,
+ { id: `${viewName}-${groupName}-id` },
+ ]),
+ ),
+ },
+ ]),
+ );
+
+ const fields = Object.fromEntries(
+ Object.keys(MESSAGE_CAMPAIGN.fields).map((fieldName) => [
+ fieldName,
+ { id: `${fieldName}-id` },
+ ]),
+ );
+
+ const byUniversalIdentifier = Object.fromEntries(
+ Object.values(MESSAGE_CAMPAIGN.views).map((view) => [
+ view.universalIdentifier,
+ { isSystemSideEffect: false },
+ ]),
+ );
+
+ return {
+ workspaceId: 'workspace-id',
+ twentyStandardApplicationId: 'application-id',
+ now: new Date('2026-01-01T00:00:00.000Z'),
+ standardObjectMetadataRelatedEntityIds: {
+ messageCampaign: { views, fields },
+ },
+ dependencyFlatEntityMaps: {
+ flatViewMaps: { byUniversalIdentifier },
+ },
+ } as unknown as Parameters<
+ typeof computeStandardMessageCampaignViewFields
+ >[0];
+};
+
+const collectViewFieldNames = (
+ viewName: keyof typeof MESSAGE_CAMPAIGN.views,
+): string[] => {
+ const view = MESSAGE_CAMPAIGN.views[viewName];
+ const nameByUniversalIdentifier = new Map(
+ Object.entries(view.viewFields).map(([fieldName, viewField]) => [
+ viewField.universalIdentifier,
+ fieldName,
+ ]),
+ );
+
+ return Object.values(computeStandardMessageCampaignViewFields(buildArgs()))
+ .filter(
+ (viewField) =>
+ viewField.viewUniversalIdentifier === view.universalIdentifier,
+ )
+ .sort((a, b) => a.position - b.position)
+ .map(
+ (viewField) =>
+ nameByUniversalIdentifier.get(viewField.universalIdentifier) ??
+ viewField.universalIdentifier,
+ );
+};
+
+describe('computeStandardMessageCampaignViewFields', () => {
+ it('builds every field the index view declares, in the declared order', () => {
+ expect(collectViewFieldNames('allMessageCampaigns')).toEqual(
+ Object.keys(MESSAGE_CAMPAIGN.views.allMessageCampaigns.viewFields),
+ );
+ });
+
+ it('builds every field the record page declares, in the declared order', () => {
+ expect(collectViewFieldNames('messageCampaignRecordPageFields')).toEqual(
+ Object.keys(
+ MESSAGE_CAMPAIGN.views.messageCampaignRecordPageFields.viewFields,
+ ),
+ );
+ });
+});
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-campaign-view-fields.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-campaign-view-fields.util.ts
index cffb845079b..78176b66d37 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-campaign-view-fields.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/view-field/compute-standard-message-campaign-view-fields.util.ts
@@ -92,6 +92,18 @@ export const computeStandardMessageCampaignViewFields = (
size: 100,
},
}),
+ allMessageCampaignsDeliveredCount: createStandardViewFieldFlatMetadata({
+ ...args,
+ objectName: 'messageCampaign',
+ context: {
+ viewName: 'allMessageCampaigns',
+ viewFieldName: 'deliveredCount',
+ fieldName: 'deliveredCount',
+ position: 7,
+ isVisible: true,
+ size: 100,
+ },
+ }),
allMessageCampaignsFailedCount: createStandardViewFieldFlatMetadata({
...args,
objectName: 'messageCampaign',
@@ -99,7 +111,19 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'allMessageCampaigns',
viewFieldName: 'failedCount',
fieldName: 'failedCount',
- position: 7,
+ position: 8,
+ isVisible: true,
+ size: 100,
+ },
+ }),
+ allMessageCampaignsSkippedCount: createStandardViewFieldFlatMetadata({
+ ...args,
+ objectName: 'messageCampaign',
+ context: {
+ viewName: 'allMessageCampaigns',
+ viewFieldName: 'skippedCount',
+ fieldName: 'skippedCount',
+ position: 9,
isVisible: true,
size: 100,
},
@@ -111,7 +135,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'allMessageCampaigns',
viewFieldName: 'bouncedCount',
fieldName: 'bouncedCount',
- position: 8,
+ position: 10,
isVisible: true,
size: 100,
},
@@ -123,7 +147,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'allMessageCampaigns',
viewFieldName: 'complainedCount',
fieldName: 'complainedCount',
- position: 9,
+ position: 11,
isVisible: true,
size: 120,
},
@@ -135,7 +159,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'allMessageCampaigns',
viewFieldName: 'recipients',
fieldName: 'recipients',
- position: 10,
+ position: 12,
isVisible: true,
size: 150,
},
@@ -147,7 +171,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'allMessageCampaigns',
viewFieldName: 'createdAt',
fieldName: 'createdAt',
- position: 11,
+ position: 13,
isVisible: true,
size: 150,
},
@@ -193,6 +217,20 @@ export const computeStandardMessageCampaignViewFields = (
viewFieldGroupName: 'stats',
},
}),
+ messageCampaignRecordPageFieldsDeliveredCount:
+ createStandardViewFieldFlatMetadata({
+ ...args,
+ objectName: 'messageCampaign',
+ context: {
+ viewName: 'messageCampaignRecordPageFields',
+ viewFieldName: 'deliveredCount',
+ fieldName: 'deliveredCount',
+ position: 3,
+ isVisible: true,
+ size: 100,
+ viewFieldGroupName: 'stats',
+ },
+ }),
messageCampaignRecordPageFieldsFailedCount:
createStandardViewFieldFlatMetadata({
...args,
@@ -201,7 +239,21 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'messageCampaignRecordPageFields',
viewFieldName: 'failedCount',
fieldName: 'failedCount',
- position: 3,
+ position: 4,
+ isVisible: true,
+ size: 100,
+ viewFieldGroupName: 'stats',
+ },
+ }),
+ messageCampaignRecordPageFieldsSkippedCount:
+ createStandardViewFieldFlatMetadata({
+ ...args,
+ objectName: 'messageCampaign',
+ context: {
+ viewName: 'messageCampaignRecordPageFields',
+ viewFieldName: 'skippedCount',
+ fieldName: 'skippedCount',
+ position: 5,
isVisible: true,
size: 100,
viewFieldGroupName: 'stats',
@@ -215,7 +267,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'messageCampaignRecordPageFields',
viewFieldName: 'bouncedCount',
fieldName: 'bouncedCount',
- position: 4,
+ position: 6,
isVisible: true,
size: 100,
viewFieldGroupName: 'stats',
@@ -229,7 +281,7 @@ export const computeStandardMessageCampaignViewFields = (
viewName: 'messageCampaignRecordPageFields',
viewFieldName: 'complainedCount',
fieldName: 'complainedCount',
- position: 5,
+ position: 7,
isVisible: true,
size: 120,
viewFieldGroupName: 'stats',
diff --git a/packages/twenty-server/src/modules/emailing/standard-objects/message-campaign.workspace-entity.ts b/packages/twenty-server/src/modules/emailing/standard-objects/message-campaign.workspace-entity.ts
index 706f25b13f5..d9ec78bc4ee 100644
--- a/packages/twenty-server/src/modules/emailing/standard-objects/message-campaign.workspace-entity.ts
+++ b/packages/twenty-server/src/modules/emailing/standard-objects/message-campaign.workspace-entity.ts
@@ -14,9 +14,11 @@ export class MessageCampaignWorkspaceEntity extends BaseWorkspaceEntity {
status: string;
sentAt: Date | null;
sentCount: number;
+ deliveredCount: number;
failedCount: number;
bouncedCount: number;
complainedCount: number;
+ skippedCount: number;
unsubscribeTopicId: string | null;
list: EntityRelation<MessageListWorkspaceEntity> | null;
listId: string | null;
diff --git a/packages/twenty-server/test/integration/graphql/suites/search/search-resolver.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/search/search-resolver.integration-spec.ts
index d48d51cef04..f7beb7cc970 100644
--- a/packages/twenty-server/test/integration/graphql/suites/search/search-resolver.integration-spec.ts
+++ b/packages/twenty-server/test/integration/graphql/suites/search/search-resolver.integration-spec.ts
@@ -224,6 +224,7 @@ describe('SearchResolver', () => {
'employmentHistory',
'petCareAgreement',
'workflow',
+ 'messageCampaign',
],
limit: 50,
},
@@ -331,6 +332,7 @@ describe('SearchResolver', () => {
'employmentHistory',
'petCareAgreement',
'workflow',
+ 'messageCampaign',
],
limit: 50,
},
diff --git a/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
index 0ffd1f74f12..d9b8bfea3b4 100644
--- a/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
+++ b/packages/twenty-shared/src/metadata/__tests__/__snapshots__/standardObjectUniversalIdentifiers.test.ts.snap
@@ -1104,6 +1104,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
},
},
"indexes": {
+ "headerMessageIdIndex": {
+ "universalIdentifier": "0904b3e4-6052-4a8d-bf41-f12a27c7e34a",
+ },
"messageCampaignIdIndex": {
"universalIdentifier": "79e777ca-7008-46c5-b3a6-3108b7c7dfb6",
},
@@ -1161,6 +1164,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"deletedAt": {
"universalIdentifier": "da77cebd-4e72-5568-b808-027e21f748e8",
},
+ "deliveredCount": {
+ "universalIdentifier": "f4ee1d33-7379-42fe-ad63-e023449baea6",
+ },
"failedCount": {
"universalIdentifier": "d373fcd7-b1ce-4c77-8031-a5785c475028",
},
@@ -1194,6 +1200,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"sentCount": {
"universalIdentifier": "2f333d2b-37b8-4ddc-ad0d-c07c6ce066ad",
},
+ "skippedCount": {
+ "universalIdentifier": "a1f4c6d2-5e8b-4a37-9c60-31b7f0d2a984",
+ },
"status": {
"universalIdentifier": "c7117256-3de6-48e1-87df-c99c32bad610",
},
@@ -1238,6 +1247,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"createdAt": {
"universalIdentifier": "88484379-8afd-5f7c-ab3c-7d937bb7ed13",
},
+ "deliveredCount": {
+ "universalIdentifier": "5b202e1b-0267-5c56-a039-2434d9eeb35b",
+ },
"failedCount": {
"universalIdentifier": "2f44ac38-194f-56a7-bd94-a292db4bc210",
},
@@ -1259,6 +1271,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"sentCount": {
"universalIdentifier": "e55b655a-038e-5257-ab2c-f2966900d2de",
},
+ "skippedCount": {
+ "universalIdentifier": "9ab64cf1-133e-56a4-8eda-e33a4bc8aba9",
+ },
"status": {
"universalIdentifier": "68714967-d906-5082-af8c-2791705ce682",
},
@@ -1281,6 +1296,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"complainedCount": {
"universalIdentifier": "7188a9aa-4821-5ae6-adec-642a7aca271b",
},
+ "deliveredCount": {
+ "universalIdentifier": "8ead247b-28bb-535c-867c-e912366f68f9",
+ },
"failedCount": {
"universalIdentifier": "a46efdb6-a451-5dfe-bd85-a5b9a6a0306a",
},
@@ -1290,6 +1308,9 @@ exports[`STANDARD_OBJECTS universal identifiers should never change without an e
"sentCount": {
"universalIdentifier": "46bd8f8e-4053-5418-9abc-e67e0842701b",
},
+ "skippedCount": {
+ "universalIdentifier": "87b7b9db-3692-5c0a-af1b-e28530f24d82",
+ },
"status": {
"universalIdentifier": "246db7b1-e241-5d06-87df-99af5d4ba9bc",
},
diff --git a/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
index 88faf6a7c5b..8b3389444c9 100644
--- a/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
+++ b/packages/twenty-shared/src/metadata/constants/standard-object-fields.constant.ts
@@ -561,6 +561,9 @@ export const STANDARD_OBJECT_FIELDS = {
sentCount: {
universalIdentifier: '2f333d2b-37b8-4ddc-ad0d-c07c6ce066ad',
},
+ deliveredCount: {
+ universalIdentifier: 'f4ee1d33-7379-42fe-ad63-e023449baea6',
+ },
failedCount: {
universalIdentifier: 'd373fcd7-b1ce-4c77-8031-a5785c475028',
},
@@ -570,6 +573,9 @@ export const STANDARD_OBJECT_FIELDS = {
complainedCount: {
universalIdentifier: '82842cfa-f12a-4bab-bbde-b2cf587d0406',
},
+ skippedCount: {
+ universalIdentifier: 'a1f4c6d2-5e8b-4a37-9c60-31b7f0d2a984',
+ },
unsubscribeTopicId: {
universalIdentifier: '0648e7ad-1769-4ff6-a4d5-72da79ef169c',
},
diff --git a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
index 7a73ef3c2cd..3b4f51f0207 100644
--- a/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
+++ b/packages/twenty-shared/src/metadata/constants/standard-object.constant.ts
@@ -416,7 +416,9 @@ export const STANDARD_OBJECTS = {
'fromAddress',
'sentAt',
'sentCount',
+ 'deliveredCount',
'failedCount',
+ 'skippedCount',
'bouncedCount',
'complainedCount',
'recipients',
@@ -431,7 +433,9 @@ export const STANDARD_OBJECTS = {
'status',
'sentAt',
'sentCount',
+ 'deliveredCount',
'failedCount',
+ 'skippedCount',
'bouncedCount',
'complainedCount',
],
@@ -676,6 +680,9 @@ export const STANDARD_OBJECTS = {
messageCampaignIdIndex: {
universalIdentifier: '79e777ca-7008-46c5-b3a6-3108b7c7dfb6',
},
+ headerMessageIdIndex: {
+ universalIdentifier: '0904b3e4-6052-4a8d-bf41-f12a27c7e34a',
+ },
},
views: {
allMessages: buildStandardObjectIndexView({
diff --git a/packages/twenty-shared/src/types/MessageCampaignStatus.ts b/packages/twenty-shared/src/types/MessageCampaignStatus.ts
index 8025b446a39..18a84369b51 100644
--- a/packages/twenty-shared/src/types/MessageCampaignStatus.ts
+++ b/packages/twenty-shared/src/types/MessageCampaignStatus.ts
@@ -4,4 +4,5 @@ export enum MessageCampaignStatus {
SENDING = 'SENDING',
SENT = 'SENT',
SENT_WITH_ERRORS = 'SENT_WITH_ERRORS',
+ CANCELED = 'CANCELED',
}