-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Salesforce RR skip based on a user on a lookup field on an account #17526
Conversation
import { RouteActionType } from "../../zod"; | ||
|
||
type FormFieldsQueryBuilderState = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move types to the types file so they can be used in other components
{eventTypeRedirectUrlSelectedOption?.eventTypeAppMetadata && | ||
"salesforce" in eventTypeRedirectUrlSelectedOption.eventTypeAppMetadata ? ( | ||
<div className="mt-4 px-2.5"> | ||
<DynamicAppComponent | ||
componentMap={routingFormAppComponents} | ||
slug="salesforce" | ||
appData={eventTypeRedirectUrlSelectedOption?.eventTypeAppMetadata["salesforce"]} | ||
route={route} | ||
setAttributeRoutingConfig={setAttributeRoutingConfig} | ||
/> | ||
</div> | ||
) : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Make this more dynamic and not hard code "salesforce" here
const eventTypeAppMetadataParse = EventTypeAppMetadataSchema.safeParse(eventType.metadata?.apps); | ||
const eventTypeAppMetadata: Record<string, any> = {}; | ||
if (eventTypeAppMetadataParse.success) { | ||
const appMetadata = eventTypeAppMetadataParse.data; | ||
|
||
if (appMetadata) { | ||
for (const appSlug of Object.keys(appMetadata)) { | ||
if (enabledAppSlugs.includes(appSlug)) { | ||
eventTypeAppMetadata[appSlug] = appMetadata[appSlug as keyof typeof appMetadata]; | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it is in draft but still leaving code feedback.
Let's abstract it out
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Co-authored-by: Alex van Andel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this, thanks for your time to walk me through it; lgtm 🚀
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
…b.com/calcom/cal.com into salesforce-route-to-user-lookup-field
E2E results are ready! |
What does this PR do?
This PR allows users to add a route under a routing form to look up a user under a custom lookup field under a Salesforce account. If that user is a part of the round robin event, then directly book with that user.
https://www.loom.com/share/db809cd26f56481299eac1a4067c885c?sid=940ebec9-021a-4ee4-876d-3bd86486d235
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?