Skip to content
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

chore: Routing form submitted but no booking - Salesforce actions #18387

Draft
wants to merge 53 commits into
base: main
Choose a base branch
from

Conversation

joeauyeung
Copy link
Contributor

@joeauyeung joeauyeung commented Dec 27, 2024

What does this PR do?

  • Adds an "Incomplete booking" tab to the routing form page

  • Adds config to write to a Salesforce record when the "From filled, booking not created" event is triggered

  • Fixes #XXXX (GitHub issue number)

  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

@github-actions github-actions bot added the ❗️ migrations contains migration files label Dec 27, 2024
@keithwillcode keithwillcode added consumer core area: core, team members only labels Dec 27, 2024
@@ -23,6 +23,10 @@ export default function RoutingNavBar({
target: "_blank",
href: `${appUrl}/reporting/${form?.id}`,
},
{
name: "Incomplete Booking",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to changing this tab name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of Salesforce specific logic on this page. I would like to abstract this into it's own component but that can be in a follow up as this needs to go out.

The biggest challenge I see is linking up the save button in the SingleForm component.

import { routingFormIncompleteBookingDataSchema as salesforceRoutingFormIncompleteBookingDataSchema } from "@calcom/app-store/salesforce/zod";
import { IncompleteBookingActionType } from "@calcom/prisma/enums";

const incompleteBookingActionDataSchemas: Record<IncompleteBookingActionType, z.ZodType<any>> = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The incomplete booking action contains a data field. We're using Zod to validate

@@ -1260,4 +1261,60 @@ export default class SalesforceCRMService implements CRM {
const response = await checkIfFreeEmailDomain(attendeeEmail);
return response;
}

async incompleteBookingWriteToRecord(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're reusing methods when writing to records.

@github-actions github-actions bot added the ❗️ .env changes contains changes to env variables label Dec 31, 2024
@emrysal emrysal marked this pull request as ready for review December 31, 2024 14:01
@graphite-app graphite-app bot requested review from a team December 31, 2024 14:01
@dosubot dosubot bot added crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid routing-forms area: routing forms, routing, forms labels Dec 31, 2024
@emrysal emrysal marked this pull request as draft December 31, 2024 14:02
Copy link

graphite-app bot commented Dec 31, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (12/31/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (12/31/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@emrysal emrysal changed the base branch from upgrade-jsforce-v3 to main December 31, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consumer core area: core, team members only crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid ❗️ .env changes contains changes to env variables ❗️ migrations contains migration files routing-forms area: routing forms, routing, forms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants