* Refactor get SF user and create event * Add new Salesforce options * Pass app options to CrmService * Add record enum * Add creating new lead and contact under an account * Handle if the contact already exists but not connected to account * Create a lead if an account doesn't exist * Merge fix * Refactor - add generateCreateRecordBody * Type fix * Clean up * Add getAppOptions to other CRM services * Type fixes * Fix typo * feat: Salesforce round robin skip - choose which entity to search on (#17038) * Add option to search which entity for the owner * Add logic to search entity for skipping RR assignment * Type fixes * Disable license * Skip license check in component * Revert license changes --------- Co-authored-by: Udit Takkar <[email protected]>
22 lines
759 B
TypeScript
22 lines
759 B
TypeScript
import { z } from "zod";
|
|
|
|
import { eventTypeAppCardZod } from "../eventTypeAppCardZod";
|
|
import { SalesforceRecordEnum } from "./lib/recordEnum";
|
|
|
|
export const appDataSchema = eventTypeAppCardZod.extend({
|
|
roundRobinLeadSkip: z.boolean().optional(),
|
|
roundRobinSkipCheckRecordOn: z
|
|
.nativeEnum(SalesforceRecordEnum)
|
|
.default(SalesforceRecordEnum.CONTACT)
|
|
.optional(),
|
|
skipContactCreation: z.boolean().optional(),
|
|
createEventOn: z.nativeEnum(SalesforceRecordEnum).default(SalesforceRecordEnum.CONTACT).optional(),
|
|
createNewContactUnderAccount: z.boolean().optional(),
|
|
createLeadIfAccountNull: z.boolean().optional(),
|
|
});
|
|
|
|
export const appKeysSchema = z.object({
|
|
consumer_key: z.string().min(1),
|
|
consumer_secret: z.string().min(1),
|
|
});
|