From dbf94cc029c4895a9f026163ebbc52d0d0ec410a Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Wed, 8 Nov 2023 12:04:22 +0100 Subject: [PATCH] :recycle: Introduce typebot v6 with events Closes #885 --- .vscode/settings.json | 3 - apps/builder/package.json | 5 +- .../public/templates/basic-chat-gpt.json | 280 +- .../public/templates/chat-gpt-personas.json | 587 +- .../public/templates/customer-support.json | 279 +- .../templates/digital-product-payment.json | 255 +- .../public/templates/dog-insurance-offer.json | 525 +- apps/builder/public/templates/faq.json | 311 +- .../builder/public/templates/lead-gen-ai.json | 332 +- apps/builder/public/templates/lead-gen.json | 219 +- .../builder/public/templates/lead-magnet.json | 371 +- .../public/templates/lead-scoring.json | 423 +- .../templates/movie-recommendation.json | 531 +- apps/builder/public/templates/nps.json | 432 +- apps/builder/public/templates/onboarding.json | 290 +- .../templates/product-recommendation.json | 1005 +- apps/builder/public/templates/quiz.json | 527 +- apps/builder/src/assets/styles/plate.css | 7 + apps/builder/src/components/DropdownList.tsx | 6 +- apps/builder/src/components/TableList.tsx | 15 +- .../components/inputs/AutocompleteInput.tsx | 15 +- apps/builder/src/components/inputs/Select.tsx | 2 +- .../src/features/account/UserProvider.tsx | 8 +- ...lAnswersInBlocks.ts => getTotalAnswers.ts} | 26 +- .../analytics/api/getTotalVisitedEdges.ts | 55 + .../src/features/analytics/api/router.ts | 6 +- .../components/AnalyticsGraphContainer.tsx | 43 +- .../helpers/computePreviousTotalAnswers.ts | 96 - .../helpers/computeTotalUsersAtBlock.ts | 60 + .../helpers/getTotalAnswersAtBlock.ts | 20 + .../blocks/bubbles/audio/audio.spec.ts | 3 +- .../audio/components/AudioBubbleForm.tsx | 14 +- .../audio/components/AudioBubbleNode.tsx | 4 +- .../embed/components/EmbedUploadContent.tsx | 14 +- .../blocks/bubbles/embed/embed.spec.ts | 3 +- .../image/components/ImageBubbleSettings.tsx | 17 +- .../blocks/bubbles/image/image.spec.ts | 5 +- .../components/TextBubbleContent.tsx | 4 +- .../textBubble/components/plate/PlateText.tsx | 30 +- .../bubbles/textBubble/textBubble.spec.ts | 3 +- .../video/components/VideoBubbleContent.tsx | 3 +- .../video/components/VideoUploadContent.tsx | 16 +- .../blocks/bubbles/video/video.spec.ts | 8 +- .../blocks/inputs/buttons/buttons.spec.ts | 9 +- .../buttons/components/ButtonsBlockNode.tsx | 6 +- .../components/ButtonsBlockSettings.tsx | 36 +- .../buttons/components/ButtonsItemNode.tsx | 4 +- .../components/ButtonsItemSettings.tsx | 3 +- .../date/components/DateInputSettings.tsx | 42 +- .../features/blocks/inputs/date/date.spec.ts | 3 +- .../components/EmailInputNodeContent.tsx | 12 +- .../components/EmailInputSettings.tsx | 29 +- .../inputs/emailInput/emailInput.spec.ts | 10 +- .../components/FileInputContent.tsx | 14 +- .../components/FileInputSettings.tsx | 43 +- .../inputs/fileUpload/fileUpload.spec.ts | 5 +- .../number/components/NumberInputSettings.tsx | 43 +- .../number/components/NumberNodeContent.tsx | 12 +- .../blocks/inputs/number/number.spec.ts | 4 +- .../components/PaymentInputContent.tsx | 2 +- .../payment/components/PaymentSettings.tsx | 56 +- .../blocks/inputs/payment/payment.spec.ts | 3 +- .../phone/components/PhoneInputSettings.tsx | 29 +- .../phone/components/PhoneNodeContent.tsx | 14 +- .../blocks/inputs/phone/phone.spec.ts | 4 +- .../components/PictureChoiceItemNode.tsx | 4 +- .../components/PictureChoiceItemSettings.tsx | 3 +- .../components/PictureChoiceNode.tsx | 6 +- .../components/PictureChoiceSettings.tsx | 46 +- .../pictureChoice/pictureChoice.spec.ts | 5 +- .../rating/components/RatingInputContent.tsx | 5 +- .../rating/components/RatingInputSettings.tsx | 55 +- .../blocks/inputs/rating/rating.spec.ts | 3 +- .../components/TextInputNodeContent.tsx | 24 +- .../components/TextInputSettings.tsx | 24 +- .../blocks/inputs/textInput/textInput.spec.ts | 4 +- .../url/components/UrlInputSettings.tsx | 27 +- .../inputs/url/components/UrlNodeContent.tsx | 15 +- .../features/blocks/inputs/url/url.spec.ts | 4 +- .../integrations/chatwoot/chatwoot.spec.ts | 7 +- .../chatwoot/components/ChatwootNodeBody.tsx | 4 +- .../chatwoot/components/ChatwootSettings.tsx | 179 +- .../components/GoogleAnalyticsNodeBody.tsx | 4 +- .../components/GoogleAnalyticsSettings.tsx | 16 +- .../googleAnalytics/googleAnalytics.spec.ts | 6 +- .../components/GoogleSheetsNodeContent.tsx | 7 +- .../components/GoogleSheetsSettings.tsx | 188 +- .../components/RowsFilterComparisonItem.tsx | 3 +- .../components/RowsFilterTableList.tsx | 2 +- .../makeCom/components/MakeComContent.tsx | 2 +- .../makeCom/components/MakeComSettings.tsx | 23 +- .../integrations/openai/api/listModels.ts | 10 +- .../openai/components/OpenAINodeBody.tsx | 4 +- .../openai/components/OpenAISettings.tsx | 18 +- .../ChatCompletionMessageItem.tsx | 132 +- .../ChatCompletionResponseItem.tsx | 11 +- .../createChatCompletion/ModelsDropdown.tsx | 7 +- .../OpenAIChatCompletionSettings.tsx | 2 + .../blocks/integrations/openai/openai.spec.ts | 6 +- .../components/PabblyConnectContent.tsx | 2 +- .../components/PabblyConnectSettings.tsx | 30 +- .../pixel/components/PixelNodeBody.tsx | 6 +- .../pixel/components/PixelSettings.tsx | 11 +- .../blocks/integrations/pixel/pixel.spec.ts | 3 +- .../sendEmail/components/SendEmailContent.tsx | 4 +- .../components/SendEmailSettings.tsx | 114 +- .../webhook/api/getResultExample.ts | 9 +- .../webhook/api/listWebhookBlocks.ts | 27 +- .../webhook/api/subscribeWebhook.ts | 60 +- .../webhook/api/unsubscribeWebhook.ts | 49 +- .../components/WebhookAdvancedConfigForm.tsx | 55 +- .../webhook/components/WebhookContent.tsx | 6 +- .../webhook/components/WebhookSettings.tsx | 17 +- .../webhook/helpers/parseResultExample.ts | 100 +- .../integrations/webhook/webhook.spec.ts | 2 +- .../zapier/components/ZapierContent.tsx | 2 +- .../zapier/components/ZapierSettings.tsx | 23 +- .../zemanticAi/SearchResponseItem.tsx | 17 +- .../zemanticAi/ZemanticAiNodeBody.tsx | 8 +- .../zemanticAi/ZemanticAiSettings.tsx | 2 +- .../abTest/components/AbTestNodeBody.tsx | 17 +- .../abTest/components/AbTestSettings.tsx | 3 +- .../condition/components/ComparisonItem.tsx | 3 +- .../condition/components/ConditionContent.tsx | 12 +- .../condition/components/ConditionForm.tsx | 15 +- .../components/ConditionItemNode.tsx | 14 +- .../logic/jump/components/JumpNodeBody.tsx | 4 +- .../logic/jump/components/JumpSettings.tsx | 12 +- .../components/RedirectNodeContent.tsx | 4 +- .../redirect/components/RedirectSettings.tsx | 12 +- .../script/components/ScriptNodeContent.tsx | 10 +- .../script/components/ScriptSettings.tsx | 11 +- .../components/SetVariableContent.tsx | 19 +- .../components/SetVariableSettings.tsx | 75 +- .../typebotLink/api/getLinkedTypebots.ts | 69 +- .../components/TypebotLinkForm.tsx | 24 +- .../components/TypebotLinkNode.tsx | 14 +- .../helpers/fetchLinkedTypebots.ts | 7 +- .../logic/wait/components/WaitNodeContent.tsx | 8 +- .../logic/wait/components/WaitSettings.tsx | 14 +- .../collaboration/collaboration.spec.ts | 5 +- .../credentials/api/createCredentials.ts | 9 +- .../credentials/api/listCredentials.ts | 6 +- .../customDomains/customDomains.spec.ts | 4 +- .../features/editor/components/BlockCard.tsx | 16 +- .../editor/components/BlockCardOverlay.tsx | 4 +- .../features/editor/components/BlockIcon.tsx | 14 +- .../features/editor/components/BlockLabel.tsx | 14 +- .../editor/components/BlocksSideBar.tsx | 14 +- .../features/editor/components/EditorPage.tsx | 9 +- .../editor/components/TypebotHeader.tsx | 8 +- .../src/features/editor/editor.spec.ts | 34 +- .../editor/providers/EditorProvider.tsx | 5 + .../editor/providers/TypebotProvider.tsx | 59 +- .../editor/providers/typebotActions/blocks.ts | 113 +- .../editor/providers/typebotActions/edges.ts | 146 +- .../editor/providers/typebotActions/events.ts | 22 + .../editor/providers/typebotActions/groups.ts | 28 +- .../editor/providers/typebotActions/items.ts | 21 +- .../features/events/start/StartEventNode.tsx | 11 + .../folders/components/TypebotButton.tsx | 6 +- .../src/features/graph/components/Graph.tsx | 27 +- .../graph/components/GraphElements.tsx | 32 +- .../graph/components/edges/DrawingEdge.tsx | 36 +- .../graph/components/edges/DropOffEdge.tsx | 93 +- .../features/graph/components/edges/Edge.tsx | 30 +- .../features/graph/components/edges/Edges.tsx | 65 +- ...ceEndpoint.tsx => BlockSourceEndpoint.tsx} | 19 +- .../endpoints/EventSourceEndpoint.tsx | 138 + .../components/endpoints/TargetEndpoint.tsx | 2 +- .../components/nodes/block/BlockNode.tsx | 42 +- .../nodes/block/BlockNodeContent.tsx | 82 +- .../nodes/block/BlockNodeOverlay.tsx | 4 +- .../components/nodes/block/BlockNodesList.tsx | 31 +- .../nodes/block/MediaBubblePopoverContent.tsx | 2 +- .../nodes/block/SettingsPopoverContent.tsx | 25 +- .../nodes/event/EventFocusToolbar.tsx | 68 + .../components/nodes/event/EventNode.tsx | 208 + .../nodes/event/EventNodeContent.tsx | 14 + .../nodes/event/EventNodeContextMenu.tsx | 24 + .../graph/components/nodes/event/index.tsx | 1 + .../components/nodes/group/GroupNode.tsx | 30 +- .../graph/components/nodes/item/ItemNode.tsx | 43 +- .../components/nodes/item/ItemNodeContent.tsx | 28 +- .../components/nodes/item/ItemNodesList.tsx | 48 +- apps/builder/src/features/graph/constants.ts | 13 +- .../helpers/computeConnectingEdgePath.ts | 2 + .../graph/helpers/computeEdgePathToMouth.ts | 10 +- .../graph/helpers/computeSourceCoordinates.ts | 16 +- .../graph/helpers/getAnchorsPosition.ts | 67 +- .../features/graph/helpers/getHelpDocUrl.ts | 12 +- .../providers/EventsCoordinateProvider.tsx | 59 + .../graph/providers/GraphDndProvider.tsx | 38 +- .../providers/GroupsCoordinateProvider.tsx | 8 +- apps/builder/src/features/graph/types.ts | 13 +- .../preview/components/WebPreview.tsx | 12 +- .../publish/components/PublishButton.tsx | 48 +- .../instructions/GtmBubbleInstructions.tsx | 2 +- .../Javascript/JavascriptBubbleSnippet.tsx | 2 +- .../JavascriptBubbleInstructions.tsx | 4 +- .../Nextjs/InstallNextjsPackageSnippet.tsx | 2 +- .../instructions/NextjsBubbleInstructions.tsx | 2 +- .../React/InstallReactPackageSnippet.tsx | 2 +- .../instructions/ReactBubbleInstructions.tsx | 2 +- .../instructions/ScriptBubbleInstructions.tsx | 9 +- .../ShopifyBubbleInstructions.tsx | 2 +- .../WebflowBubbleInstructions.tsx | 2 +- .../WhatsAppModal/WhatsAppComparisonItem.tsx | 2 +- .../modals/WhatsAppModal/WhatsAppModal.tsx | 3 +- .../instructions/WixBubbleInstructions.tsx | 2 +- .../WordpressBubbleInstructions.tsx | 4 +- .../helpers/convertPublicTypebotToTypebot.ts | 52 +- .../helpers/convertTypebotToPublicTypebot.ts | 5 +- .../features/publish/helpers/isPublished.ts | 5 + .../src/features/publish/publish.spec.ts | 4 +- .../src/features/results/ResultsProvider.tsx | 30 +- .../src/features/results/api/deleteResults.ts | 6 +- .../src/features/results/api/getResult.ts | 8 +- .../src/features/results/api/getResults.ts | 11 +- .../table/ExportAllResultsModal.tsx | 6 +- .../helpers/convertResultsToTableData.tsx | 2 +- .../components/GeneralSettingsForm.tsx | 36 +- .../settings/components/MetadataForm.tsx | 34 +- .../settings/components/SettingsSideMenu.tsx | 12 +- .../components/TypingEmulationForm.tsx | 43 +- .../src/features/settings/settings.spec.ts | 12 +- .../components/CreateNewTypebotButtons.tsx | 66 +- .../ImportTypebotFromFileButton.tsx | 14 +- .../templates/components/TemplatesModal.tsx | 13 +- apps/builder/src/features/templates/data.ts | 2 - .../src/features/templates/templates.spec.ts | 4 +- .../theme/components/ThemeSideMenu.tsx | 8 +- .../theme/components/ThemeTemplateCard.tsx | 108 +- .../theme/components/chat/ButtonsTheme.tsx | 10 +- .../components/chat/ChatThemeSettings.tsx | 59 +- .../theme/components/chat/GuestBubbles.tsx | 21 +- .../theme/components/chat/HostBubbles.tsx | 12 +- .../theme/components/chat/InputsTheme.tsx | 10 +- .../components/general/BackgroundContent.tsx | 12 +- .../components/general/BackgroundSelector.tsx | 3 +- .../components/general/GeneralSettings.tsx | 10 +- .../src/features/theme/galleryTemplates.ts | 3 +- apps/builder/src/features/theme/theme.spec.ts | 8 +- .../src/features/typebot/api/createTypebot.ts | 76 +- .../src/features/typebot/api/deleteTypebot.ts | 6 +- .../typebot/api/getPublishedTypebot.ts | 91 +- .../src/features/typebot/api/getTypebot.ts | 79 +- .../src/features/typebot/api/importTypebot.ts | 147 + .../src/features/typebot/api/listTypebots.ts | 4 +- .../features/typebot/api/publishTypebot.ts | 66 +- .../src/features/typebot/api/router.ts | 2 + .../src/features/typebot/api/updateTypebot.ts | 50 +- .../typebot/helpers/hasDefaultConnector.ts | 12 +- .../features/typebot/helpers/parseNewBlock.ts | 165 +- .../features/typebot/helpers/sanitizers.ts | 38 +- .../features/whatsapp/startWhatsAppPreview.ts | 39 +- .../src/features/workspace/workspaces.spec.ts | 4 +- apps/builder/src/helpers/server/trpc.ts | 22 +- apps/builder/src/pages/api/publicTypebots.ts | 61 - .../src/pages/api/publicTypebots/[id].ts | 68 - apps/builder/src/pages/api/stripe/webhook.ts | 4 +- apps/docs/docs/embed/react.md | 2 +- apps/docs/openapi/builder/_spec_.json | 67511 +++++++++++----- apps/docs/openapi/chat/_spec_.json | 13729 ++-- apps/docs/package.json | 4 +- apps/landing-page/package.json | 2 +- apps/viewer/package.json | 5 +- apps/viewer/public/site-preview.png | Bin 0 -> 178374 bytes .../api/integrations/openai/streamer/route.ts | 20 +- apps/viewer/src/components/Seo.tsx | 20 +- apps/viewer/src/components/TypebotPageV2.tsx | 11 +- apps/viewer/src/components/TypebotPageV3.tsx | 14 +- .../src/features/chat/api/sendMessageV1.ts | 4 + .../src/features/chat/api/sendMessageV2.ts | 4 + .../chat/api/updateTypebotInSession.ts | 2 +- .../fileUpload/api/deprecated/getUploadUrl.ts | 46 +- .../fileUpload/api/generateUploadUrl.ts | 34 +- apps/viewer/src/pages/[[...publicId]].tsx | 36 +- .../[spreadsheetId]/sheets/[sheetId].ts | 35 +- .../stripe/createPaymentIntent.ts | 21 +- .../blocks/[blockId]/executeWebhook.ts | 78 +- .../[typebotId]/integrations/email.tsx | 14 +- .../api/typebots/[typebotId]/webhookBlocks.ts | 8 +- .../api/typebots/[typebotId]/webhookSteps.ts | 18 +- apps/viewer/src/pages/old/[[...publicId]].tsx | 2 +- .../linkTypebots/1-merge-disabled.json | 1 + .../test/assets/typebots/linkTypebots/1.json | 1 + .../test/assets/typebots/linkTypebots/2.json | 1 + .../assets/typebots/predefinedVariables.json | 1 + .../src/test/assets/typebots/sendEmail.json | 1 + .../src/test/assets/typebots/webhook.json | 1 + apps/viewer/src/test/chat.spec.ts | 2 +- apps/viewer/src/test/chatwoot.spec.ts | 6 +- apps/viewer/src/test/settings.spec.ts | 24 +- apps/viewer/src/test/webhook.spec.ts | 2 +- ...injectVariableValuesInButtonsInputBlock.ts | 6 +- .../inputs/buttons/parseButtonsReply.ts | 2 +- .../blocks/inputs/date/parseDateInput.ts | 14 +- .../blocks/inputs/date/parseDateReply.ts | 26 +- .../computePaymentInputRuntimeOptions.ts | 18 +- ...njectVariableValuesInPictureChoiceBlock.ts | 10 +- .../pictureChoice/parsePictureChoicesReply.ts | 2 +- .../inputs/rating/validateRatingReply.ts | 3 +- .../chatwoot/executeChatwootBlock.ts | 19 +- .../executeGoogleAnalyticsBlock.ts | 2 +- .../googleSheets/executeGoogleSheetBlock.ts | 8 +- .../integrations/googleSheets/getRow.ts | 26 +- .../helpers/getAuthenticatedGoogleDoc.ts | 2 +- .../googleSheets/helpers/matchFilter.ts | 8 +- .../integrations/googleSheets/updateRow.ts | 8 +- .../openai/createChatCompletionOpenAI.ts | 16 +- .../executeChatCompletionOpenAIRequest.ts | 2 +- .../integrations/openai/executeOpenAIBlock.ts | 2 +- .../openai/getChatCompletionStream.ts | 3 +- .../openai/parseChatCompletionMessages.ts | 27 +- .../openai/resumeChatCompletion.ts | 4 +- .../integrations/pixel/executePixelBlock.ts | 2 +- .../sendEmail/executeSendEmailBlock.tsx | 42 +- .../webhook/executeWebhookBlock.ts | 77 +- .../integrations/webhook/parseSampleResult.ts | 27 +- .../webhook/resumeWebhookExecution.ts | 4 +- .../zemanticAi/executeZemanticAiBlock.ts | 31 +- .../blocks/logic/abTest/executeAbTest.ts | 6 +- .../logic/condition/executeCondition.ts | 20 +- .../logic/condition/executeConditionBlock.ts | 4 +- .../blocks/logic/jump/executeJumpBlock.ts | 7 +- .../blocks/logic/script/executeScript.ts | 2 +- .../logic/setVariable/executeSetVariable.ts | 10 +- .../logic/typebotLink/executeTypebotLink.ts | 25 +- .../getPreviouslyLinkedTypebots.ts | 11 +- .../blocks/logic/wait/executeWait.ts | 9 +- packages/bot-engine/computeTypingDuration.ts | 26 +- packages/bot-engine/continueBotFlow.ts | 107 +- packages/bot-engine/executeGroup.ts | 50 +- packages/bot-engine/executeIntegration.ts | 7 +- packages/bot-engine/executeLogic.ts | 3 +- packages/bot-engine/getNextGroup.ts | 16 +- packages/bot-engine/getPrefilledValue.ts | 4 +- packages/bot-engine/parseBubbleBlock.ts | 50 +- .../queries/createResultIfNotExist.ts | 1 + .../bot-engine/queries/findPublicTypebot.ts | 1 + packages/bot-engine/queries/findTypebot.ts | 1 + .../bot-engine/queries/saveVisitedEdges.ts | 8 + packages/bot-engine/queries/upsertAnswer.ts | 9 +- packages/bot-engine/saveStateToDatabase.ts | 6 + packages/bot-engine/startBotFlow.ts | 63 +- packages/bot-engine/startSession.ts | 113 +- .../bot-engine/variables/parseVariables.ts | 69 +- .../whatsapp/convertInputToWhatsAppMessage.ts | 23 +- .../convertMessageToWhatsAppMessage.ts | 8 +- .../bot-engine/whatsapp/resumeWhatsAppFlow.ts | 13 +- .../whatsapp/sendChatReplyToWhatsApp.ts | 8 +- .../whatsapp/startWhatsAppSession.ts | 8 +- packages/deprecated/bot-engine/package.json | 3 +- .../ChatGroup/ChatBlock/InputChatBlock.tsx | 24 +- .../ChatBlock/bubbles/HostBubble.tsx | 5 +- .../src/components/ChatGroup/ChatGroup.tsx | 22 +- .../src/components/ConversationContainer.tsx | 2 +- .../src/components/TypebotViewer.tsx | 6 +- .../bubbles/audio/components/AudioBubble.tsx | 4 +- .../bubbles/embed/components/EmbedBubble.tsx | 2 +- .../textBubble/components/TextBubble.tsx | 21 +- .../textBubble/utils/computeTypingDuration.ts | 31 +- .../bubbles/video/components/VideoBubble.tsx | 10 +- .../inputs/date/components/DateForm.tsx | 4 +- .../fileUpload/components/FileUploadForm.tsx | 21 +- .../inputs/fileUpload/helpers/uploadFiles.ts | 12 +- .../components/PaymentForm/PaymentForm.tsx | 9 +- .../PaymentForm/StripePaymentForm.tsx | 16 +- .../queries/createPaymentIntentQuery.ts | 4 +- .../inputs/phone/components/PhoneInput.tsx | 6 +- .../inputs/rating/components/RatingForm.tsx | 24 +- .../chatwoot/utils/executeChatwootBlock.ts | 8 +- .../utils/executeGoogleSheetBlock.ts | 28 +- .../sendEmail/utils/executeSendEmailBlock.ts | 20 +- .../webhook/utils/executeWebhookBlock.ts | 4 +- .../logic/condition/utils/executeCondition.ts | 16 +- .../blocks/logic/script/executeScript.ts | 2 +- .../setVariable/utils/executeSetVariable.ts | 2 + .../queries/fetchAndInjectTypebotQuery.ts | 4 +- .../typebotLink/utils/executeTypebotLink.ts | 10 +- .../blocks/logic/wait/utils/executeWait.ts | 2 +- .../theme/utils/setCssVariablesValue.ts | 2 +- .../deprecated/bot-engine/src/lib/gtag.ts | 4 +- .../src/providers/TypebotProvider.tsx | 2 +- .../deprecated/bot-engine/src/utils/chat.ts | 10 +- .../src/utils/executeIntegration.ts | 3 +- .../bot-engine/src/utils/executeLogic.ts | 3 +- .../deprecated/bot-engine/src/utils/inputs.ts | 18 +- packages/deprecated/bot-engine/tsup.config.js | 1 - packages/deprecated/typebot-js/package.json | 2 +- packages/embeds/js/package.json | 2 +- packages/embeds/js/src/components/Bot.tsx | 32 +- .../ConversationContainer/ChatChunk.tsx | 60 +- .../ConversationContainer.tsx | 26 +- .../ConversationContainer/LoadingChunk.tsx | 10 +- .../js/src/components/InputChatBlock.tsx | 35 +- .../js/src/components/bubbles/HostBubble.tsx | 26 +- .../bubbles/audio/components/AudioBubble.tsx | 12 +- .../bubbles/embed/components/EmbedBubble.tsx | 11 +- .../bubbles/image/components/ImageBubble.tsx | 13 +- .../textBubble/components/TextBubble.tsx | 12 +- .../bubbles/video/components/VideoBubble.tsx | 20 +- .../inputs/buttons/components/Buttons.tsx | 8 +- .../components/MultipleChoicesForm.tsx | 10 +- .../inputs/date/components/DateForm.tsx | 14 +- .../inputs/email/components/EmailInput.tsx | 7 +- .../fileUpload/components/FileUploadForm.tsx | 34 +- .../inputs/number/components/NumberInput.tsx | 7 +- .../inputs/payment/components/PaymentForm.tsx | 20 +- .../payment/components/StripePaymentForm.tsx | 21 +- .../inputs/phone/components/PhoneInput.tsx | 12 +- .../pictureChoice/MultiplePictureChoice.tsx | 12 +- .../pictureChoice/SinglePictureChoice.tsx | 6 +- .../inputs/rating/components/RatingForm.tsx | 44 +- .../inputs/textInput/components/TextInput.tsx | 18 +- .../blocks/inputs/url/components/UrlInput.tsx | 7 +- .../utils/executeGoogleAnalytics.ts | 4 +- .../logic/redirect/utils/executeRedirect.ts | 4 +- packages/embeds/js/src/lib/gtag.ts | 4 +- packages/embeds/js/src/lib/pixel.ts | 2 +- .../src/queries/getInitialChatReplyQuery.ts | 15 +- .../embeds/js/src/utils/injectStartProps.ts | 4 +- .../js/src/utils/setCssVariablesValue.ts | 9 +- packages/embeds/nextjs/README.md | 2 +- packages/embeds/nextjs/package.json | 4 +- packages/embeds/nextjs/rollup.config.js | 26 +- packages/embeds/nextjs/tsconfig.json | 6 +- packages/embeds/react/README.md | 2 +- packages/embeds/react/package.json | 4 +- packages/embeds/react/rollup.config.js | 24 +- packages/embeds/react/src/index.ts | 6 +- .../stories/assets/leadGenerationTypebot.ts | 52 +- packages/embeds/react/tsconfig.json | 6 +- packages/env/package.json | 6 +- packages/lib/api/helpers/archiveResults.ts | 5 +- packages/lib/getBlockById.ts | 24 + .../lib/migrations/migratePublicTypebot.ts | 15 + packages/lib/migrations/migrateTypebot.ts | 30 + .../migrations/migrateTypebotFromV3ToV4.ts | 67 +- .../migrations/migrateTypebotFromV5ToV6.ts | 125 + packages/lib/package.json | 2 +- packages/lib/parseVideoUrl.ts | 2 +- packages/lib/playwright/databaseActions.ts | 36 +- packages/lib/playwright/databaseHelpers.ts | 133 +- packages/lib/results.ts | 96 +- packages/lib/utils.ts | 23 +- packages/prisma/mysql/schema.prisma | 20 +- packages/prisma/package.json | 2 +- .../migrations/20231108111118_/migration.sql | 18 + packages/prisma/postgresql/schema.prisma | 20 +- packages/schemas/features/analytics.ts | 9 +- packages/schemas/features/answer.ts | 15 +- .../blocks/bubbles/audio/constants.ts | 5 + .../features/blocks/bubbles/audio/index.ts | 1 + .../bubbles/{audio.ts => audio/schema.ts} | 8 +- .../blocks/bubbles/{enums.ts => constants.ts} | 0 .../schemas/features/blocks/bubbles/embed.ts | 21 - .../blocks/bubbles/embed/constants.ts | 5 + .../features/blocks/bubbles/embed/index.ts | 1 + .../features/blocks/bubbles/embed/schema.ts | 18 + .../blocks/bubbles/image/constants.ts | 7 + .../features/blocks/bubbles/image/index.ts | 1 + .../bubbles/{image.ts => image/schema.ts} | 9 +- .../schemas/features/blocks/bubbles/index.ts | 2 +- .../schemas/features/blocks/bubbles/schema.ts | 21 + .../features/blocks/bubbles/text/constants.ts | 0 .../features/blocks/bubbles/text/index.ts | 1 + .../bubbles/{text.ts => text/schema.ts} | 15 +- .../bubbles/video/{enums.ts => constants.ts} | 4 + .../features/blocks/bubbles/video/index.ts | 3 +- .../bubbles/video/{schemas.ts => schema.ts} | 11 +- packages/schemas/features/blocks/index.ts | 3 +- .../schemas/features/blocks/inputs/choice.ts | 49 - .../blocks/inputs/choice/constants.ts | 9 + .../features/blocks/inputs/choice/index.ts | 1 + .../features/blocks/inputs/choice/schema.ts | 64 + .../features/blocks/inputs/constants.ts | 14 + .../schemas/features/blocks/inputs/date.ts | 35 - .../features/blocks/inputs/date/constants.ts | 12 + .../features/blocks/inputs/date/index.ts | 1 + .../features/blocks/inputs/date/schema.ts | 29 + .../schemas/features/blocks/inputs/email.ts | 33 - .../features/blocks/inputs/email/constants.ts | 11 + .../features/blocks/inputs/email/index.ts | 1 + .../features/blocks/inputs/email/schema.ts | 22 + .../schemas/features/blocks/inputs/enums.ts | 13 - .../schemas/features/blocks/inputs/file.ts | 41 - .../features/blocks/inputs/file/constants.ts | 15 + .../features/blocks/inputs/file/index.ts | 1 + .../features/blocks/inputs/file/schema.ts | 50 + .../schemas/features/blocks/inputs/index.ts | 3 +- .../blocks/inputs/number/constants.ts | 6 + .../features/blocks/inputs/number/index.ts | 1 + .../inputs/{number.ts => number/schema.ts} | 16 +- .../blocks/inputs/payment/constants.ts | 12 + .../features/blocks/inputs/payment/enums.ts | 3 - .../features/blocks/inputs/payment/index.ts | 3 +- .../inputs/payment/{schemas.ts => schema.ts} | 32 +- .../schemas/features/blocks/inputs/phone.ts | 35 - .../features/blocks/inputs/phone/constants.ts | 11 + .../features/blocks/inputs/phone/index.ts | 1 + .../features/blocks/inputs/phone/schema.ts | 22 + .../features/blocks/inputs/pictureChoice.ts | 55 - .../blocks/inputs/pictureChoice/constants.ts | 12 + .../blocks/inputs/pictureChoice/index.ts | 1 + .../blocks/inputs/pictureChoice/schema.ts | 75 + .../schemas/features/blocks/inputs/rating.ts | 38 - .../blocks/inputs/rating/constants.ts | 12 + .../features/blocks/inputs/rating/index.ts | 1 + .../features/blocks/inputs/rating/schema.ts | 33 + .../schemas/features/blocks/inputs/schema.ts | 56 + .../schemas/features/blocks/inputs/text.ts | 34 - .../features/blocks/inputs/text/constants.ts | 7 + .../features/blocks/inputs/text/index.ts | 1 + .../features/blocks/inputs/text/schema.ts | 29 + .../schemas/features/blocks/inputs/url.ts | 32 - .../features/blocks/inputs/url/constants.ts | 11 + .../features/blocks/inputs/url/index.ts | 1 + .../features/blocks/inputs/url/schema.ts | 21 + .../blocks/integrations/chatwoot/constants.ts | 8 + .../blocks/integrations/chatwoot/index.ts | 1 + .../{chatwoot.ts => chatwoot/schema.ts} | 20 +- .../integrations/{enums.ts => constants.ts} | 0 .../integrations/googleAnalytics/constants.ts | 0 .../integrations/googleAnalytics/index.ts | 1 + .../schema.ts} | 13 +- .../integrations/googleSheets/constants.ts | 16 + .../blocks/integrations/googleSheets/enums.ts | 5 - .../blocks/integrations/googleSheets/index.ts | 3 +- .../integrations/googleSheets/schema.ts | 178 + .../integrations/googleSheets/schemas.ts | 167 - .../features/blocks/integrations/index.ts | 7 +- .../features/blocks/integrations/makeCom.ts | 17 - .../blocks/integrations/makeCom/constants.ts | 0 .../blocks/integrations/makeCom/index.ts | 1 + .../blocks/integrations/makeCom/schema.ts | 23 + .../blocks/integrations/openai/constants.ts | 29 + .../blocks/integrations/openai/index.ts | 1 + .../{openai.ts => openai/schema.ts} | 113 +- .../blocks/integrations/pabblyConnect.ts | 17 - .../integrations/pabblyConnect/constants.ts | 0 .../integrations/pabblyConnect/index.ts | 1 + .../integrations/pabblyConnect/schema.ts | 23 + .../blocks/integrations/pixel/constants.ts | 6 + .../blocks/integrations/pixel/index.ts | 1 + .../pixel/{schemas.ts => schema.ts} | 6 +- .../features/blocks/integrations/schema.ts | 58 + .../integrations/sendEmail/constants.ts | 7 + .../blocks/integrations/sendEmail/index.ts | 1 + .../{sendEmail.ts => sendEmail/schema.ts} | 17 +- .../blocks/integrations/webhook/constants.ts | 23 + .../blocks/integrations/webhook/enums.ts | 11 - .../blocks/integrations/webhook/index.ts | 3 +- .../webhook/{schemas.ts => schema.ts} | 83 +- .../features/blocks/integrations/zapier.ts | 17 - .../blocks/integrations/zapier/constants.ts | 0 .../blocks/integrations/zapier/index.ts | 1 + .../blocks/integrations/zapier/schema.ts | 25 + .../integrations/zemanticAi/constants.ts | 11 + .../blocks/integrations/zemanticAi/index.ts | 1 + .../{zemanticAi.ts => zemanticAi/schema.ts} | 37 +- .../schemas/features/blocks/logic/abTest.ts | 31 - .../features/blocks/logic/abTest/constants.ts | 5 + .../features/blocks/logic/abTest/index.ts | 1 + .../features/blocks/logic/abTest/schema.ts | 48 + .../features/blocks/logic/condition.ts | 61 - .../blocks/logic/condition/constants.ts | 25 + .../features/blocks/logic/condition/index.ts | 1 + .../features/blocks/logic/condition/schema.ts | 62 + .../blocks/logic/{enums.ts => constants.ts} | 0 .../schemas/features/blocks/logic/index.ts | 2 +- .../features/blocks/logic/jump/constants.ts | 0 .../features/blocks/logic/jump/index.ts | 1 + .../blocks/logic/{jump.ts => jump/schema.ts} | 6 +- .../blocks/logic/redirect/constants.ts | 5 + .../features/blocks/logic/redirect/index.ts | 1 + .../logic/{redirect.ts => redirect/schema.ts} | 11 +- .../schemas/features/blocks/logic/schema.ts | 44 + .../features/blocks/logic/script/constants.ts | 5 + .../features/blocks/logic/script/index.ts | 1 + .../logic/{script.ts => script/schema.ts} | 11 +- .../features/blocks/logic/setVariable.ts | 48 - .../blocks/logic/setVariable/constants.ts | 25 + .../blocks/logic/setVariable/index.ts | 1 + .../blocks/logic/setVariable/schema.ts | 69 + .../blocks/logic/typebotLink/constants.ts | 5 + .../blocks/logic/typebotLink/index.ts | 1 + .../{typebotLink.ts => typebotLink/schema.ts} | 11 +- .../features/blocks/logic/wait/constants.ts | 5 + .../features/blocks/logic/wait/index.ts | 1 + .../blocks/logic/{wait.ts => wait/schema.ts} | 9 +- packages/schemas/features/blocks/schema.ts | 46 + packages/schemas/features/blocks/schemas.ts | 154 - .../blocks/{baseSchemas.ts => shared.ts} | 1 - .../schemas/features/blocks/start/schemas.ts | 2 +- packages/schemas/features/chat/schema.ts | 160 +- .../schemas/features/chat/sessionState.ts | 113 +- packages/schemas/features/chat/shared.ts | 21 +- packages/schemas/features/credentials.ts | 4 +- packages/schemas/features/events/constants.ts | 3 + packages/schemas/features/events/index.ts | 1 + packages/schemas/features/events/shared.ts | 10 + .../schemas/features/events/start/index.ts | 1 + .../schemas/features/events/start/schema.ts | 7 + .../schemas/features/items/baseSchemas.ts | 9 - packages/schemas/features/items/constants.ts | 1 + packages/schemas/features/items/enums.ts | 6 - packages/schemas/features/items/index.ts | 4 +- packages/schemas/features/items/schema.ts | 30 + packages/schemas/features/items/schemas.ts | 15 - packages/schemas/features/items/shared.ts | 16 + packages/schemas/features/publicTypebot.ts | 28 +- packages/schemas/features/result.ts | 14 +- packages/schemas/features/typebot/edge.ts | 9 +- packages/schemas/features/typebot/group.ts | 32 + .../typebot/helpers/preprocessTypebot.ts | 18 +- packages/schemas/features/typebot/index.ts | 2 + packages/schemas/features/typebot/settings.ts | 65 - .../features/typebot/settings/constants.ts | 22 + .../features/typebot/settings/index.ts | 1 + .../features/typebot/settings/schema.ts | 41 + .../features/typebot/theme/constants.ts | 31 + .../schemas/features/typebot/theme/enums.ts | 5 - .../schemas/features/typebot/theme/index.ts | 3 +- .../typebot/theme/{schemas.ts => schema.ts} | 50 +- packages/schemas/features/typebot/typebot.ts | 57 +- packages/schemas/features/typebot/types.ts | 5 + packages/schemas/features/whatsapp.ts | 7 +- packages/schemas/index.ts | 2 + packages/schemas/package.json | 7 +- packages/schemas/tsconfig.json | 5 +- packages/scripts/package.json | 4 +- pnpm-lock.yaml | 490 +- 634 files changed, 64256 insertions(+), 36734 deletions(-) rename apps/builder/src/features/analytics/api/{getTotalAnswersInBlocks.ts => getTotalAnswers.ts} (63%) create mode 100644 apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts delete mode 100644 apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts create mode 100644 apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts create mode 100644 apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts create mode 100644 apps/builder/src/features/editor/providers/typebotActions/events.ts create mode 100644 apps/builder/src/features/events/start/StartEventNode.tsx rename apps/builder/src/features/graph/components/endpoints/{SourceEndpoint.tsx => BlockSourceEndpoint.tsx} (89%) create mode 100644 apps/builder/src/features/graph/components/endpoints/EventSourceEndpoint.tsx create mode 100644 apps/builder/src/features/graph/components/nodes/event/EventFocusToolbar.tsx create mode 100644 apps/builder/src/features/graph/components/nodes/event/EventNode.tsx create mode 100644 apps/builder/src/features/graph/components/nodes/event/EventNodeContent.tsx create mode 100644 apps/builder/src/features/graph/components/nodes/event/EventNodeContextMenu.tsx create mode 100644 apps/builder/src/features/graph/components/nodes/event/index.tsx create mode 100644 apps/builder/src/features/graph/providers/EventsCoordinateProvider.tsx create mode 100644 apps/builder/src/features/typebot/api/importTypebot.ts delete mode 100644 apps/builder/src/pages/api/publicTypebots.ts delete mode 100644 apps/builder/src/pages/api/publicTypebots/[id].ts create mode 100644 apps/viewer/public/site-preview.png create mode 100644 packages/bot-engine/queries/saveVisitedEdges.ts create mode 100644 packages/lib/getBlockById.ts create mode 100644 packages/lib/migrations/migratePublicTypebot.ts create mode 100644 packages/lib/migrations/migrateTypebot.ts create mode 100644 packages/lib/migrations/migrateTypebotFromV5ToV6.ts create mode 100644 packages/prisma/postgresql/migrations/20231108111118_/migration.sql create mode 100644 packages/schemas/features/blocks/bubbles/audio/constants.ts create mode 100644 packages/schemas/features/blocks/bubbles/audio/index.ts rename packages/schemas/features/blocks/bubbles/{audio.ts => audio/schema.ts} (70%) rename packages/schemas/features/blocks/bubbles/{enums.ts => constants.ts} (100%) delete mode 100644 packages/schemas/features/blocks/bubbles/embed.ts create mode 100644 packages/schemas/features/blocks/bubbles/embed/constants.ts create mode 100644 packages/schemas/features/blocks/bubbles/embed/index.ts create mode 100644 packages/schemas/features/blocks/bubbles/embed/schema.ts create mode 100644 packages/schemas/features/blocks/bubbles/image/constants.ts create mode 100644 packages/schemas/features/blocks/bubbles/image/index.ts rename packages/schemas/features/blocks/bubbles/{image.ts => image/schema.ts} (61%) create mode 100644 packages/schemas/features/blocks/bubbles/schema.ts create mode 100644 packages/schemas/features/blocks/bubbles/text/constants.ts create mode 100644 packages/schemas/features/blocks/bubbles/text/index.ts rename packages/schemas/features/blocks/bubbles/{text.ts => text/schema.ts} (53%) rename packages/schemas/features/blocks/bubbles/video/{enums.ts => constants.ts} (57%) rename packages/schemas/features/blocks/bubbles/video/{schemas.ts => schema.ts} (60%) delete mode 100644 packages/schemas/features/blocks/inputs/choice.ts create mode 100644 packages/schemas/features/blocks/inputs/choice/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/choice/index.ts create mode 100644 packages/schemas/features/blocks/inputs/choice/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/date.ts create mode 100644 packages/schemas/features/blocks/inputs/date/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/date/index.ts create mode 100644 packages/schemas/features/blocks/inputs/date/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/email.ts create mode 100644 packages/schemas/features/blocks/inputs/email/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/email/index.ts create mode 100644 packages/schemas/features/blocks/inputs/email/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/enums.ts delete mode 100644 packages/schemas/features/blocks/inputs/file.ts create mode 100644 packages/schemas/features/blocks/inputs/file/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/file/index.ts create mode 100644 packages/schemas/features/blocks/inputs/file/schema.ts create mode 100644 packages/schemas/features/blocks/inputs/number/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/number/index.ts rename packages/schemas/features/blocks/inputs/{number.ts => number/schema.ts} (50%) create mode 100644 packages/schemas/features/blocks/inputs/payment/constants.ts delete mode 100644 packages/schemas/features/blocks/inputs/payment/enums.ts rename packages/schemas/features/blocks/inputs/payment/{schemas.ts => schema.ts} (73%) delete mode 100644 packages/schemas/features/blocks/inputs/phone.ts create mode 100644 packages/schemas/features/blocks/inputs/phone/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/phone/index.ts create mode 100644 packages/schemas/features/blocks/inputs/phone/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/pictureChoice.ts create mode 100644 packages/schemas/features/blocks/inputs/pictureChoice/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/pictureChoice/index.ts create mode 100644 packages/schemas/features/blocks/inputs/pictureChoice/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/rating.ts create mode 100644 packages/schemas/features/blocks/inputs/rating/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/rating/index.ts create mode 100644 packages/schemas/features/blocks/inputs/rating/schema.ts create mode 100644 packages/schemas/features/blocks/inputs/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/text.ts create mode 100644 packages/schemas/features/blocks/inputs/text/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/text/index.ts create mode 100644 packages/schemas/features/blocks/inputs/text/schema.ts delete mode 100644 packages/schemas/features/blocks/inputs/url.ts create mode 100644 packages/schemas/features/blocks/inputs/url/constants.ts create mode 100644 packages/schemas/features/blocks/inputs/url/index.ts create mode 100644 packages/schemas/features/blocks/inputs/url/schema.ts create mode 100644 packages/schemas/features/blocks/integrations/chatwoot/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/chatwoot/index.ts rename packages/schemas/features/blocks/integrations/{chatwoot.ts => chatwoot/schema.ts} (54%) rename packages/schemas/features/blocks/integrations/{enums.ts => constants.ts} (100%) create mode 100644 packages/schemas/features/blocks/integrations/googleAnalytics/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/googleAnalytics/index.ts rename packages/schemas/features/blocks/integrations/{googleAnalytics.ts => googleAnalytics/schema.ts} (60%) create mode 100644 packages/schemas/features/blocks/integrations/googleSheets/constants.ts delete mode 100644 packages/schemas/features/blocks/integrations/googleSheets/enums.ts create mode 100644 packages/schemas/features/blocks/integrations/googleSheets/schema.ts delete mode 100644 packages/schemas/features/blocks/integrations/googleSheets/schemas.ts delete mode 100644 packages/schemas/features/blocks/integrations/makeCom.ts create mode 100644 packages/schemas/features/blocks/integrations/makeCom/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/makeCom/index.ts create mode 100644 packages/schemas/features/blocks/integrations/makeCom/schema.ts create mode 100644 packages/schemas/features/blocks/integrations/openai/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/openai/index.ts rename packages/schemas/features/blocks/integrations/{openai.ts => openai/schema.ts} (52%) delete mode 100644 packages/schemas/features/blocks/integrations/pabblyConnect.ts create mode 100644 packages/schemas/features/blocks/integrations/pabblyConnect/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/pabblyConnect/index.ts create mode 100644 packages/schemas/features/blocks/integrations/pabblyConnect/schema.ts create mode 100644 packages/schemas/features/blocks/integrations/pixel/index.ts rename packages/schemas/features/blocks/integrations/pixel/{schemas.ts => schema.ts} (88%) create mode 100644 packages/schemas/features/blocks/integrations/schema.ts create mode 100644 packages/schemas/features/blocks/integrations/sendEmail/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/sendEmail/index.ts rename packages/schemas/features/blocks/integrations/{sendEmail.ts => sendEmail/schema.ts} (71%) create mode 100644 packages/schemas/features/blocks/integrations/webhook/constants.ts delete mode 100644 packages/schemas/features/blocks/integrations/webhook/enums.ts rename packages/schemas/features/blocks/integrations/webhook/{schemas.ts => schema.ts} (51%) delete mode 100644 packages/schemas/features/blocks/integrations/zapier.ts create mode 100644 packages/schemas/features/blocks/integrations/zapier/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/zapier/index.ts create mode 100644 packages/schemas/features/blocks/integrations/zapier/schema.ts create mode 100644 packages/schemas/features/blocks/integrations/zemanticAi/constants.ts create mode 100644 packages/schemas/features/blocks/integrations/zemanticAi/index.ts rename packages/schemas/features/blocks/integrations/{zemanticAi.ts => zemanticAi/schema.ts} (62%) delete mode 100644 packages/schemas/features/blocks/logic/abTest.ts create mode 100644 packages/schemas/features/blocks/logic/abTest/constants.ts create mode 100644 packages/schemas/features/blocks/logic/abTest/index.ts create mode 100644 packages/schemas/features/blocks/logic/abTest/schema.ts delete mode 100644 packages/schemas/features/blocks/logic/condition.ts create mode 100644 packages/schemas/features/blocks/logic/condition/constants.ts create mode 100644 packages/schemas/features/blocks/logic/condition/index.ts create mode 100644 packages/schemas/features/blocks/logic/condition/schema.ts rename packages/schemas/features/blocks/logic/{enums.ts => constants.ts} (100%) create mode 100644 packages/schemas/features/blocks/logic/jump/constants.ts create mode 100644 packages/schemas/features/blocks/logic/jump/index.ts rename packages/schemas/features/blocks/logic/{jump.ts => jump/schema.ts} (69%) create mode 100644 packages/schemas/features/blocks/logic/redirect/constants.ts create mode 100644 packages/schemas/features/blocks/logic/redirect/index.ts rename packages/schemas/features/blocks/logic/{redirect.ts => redirect/schema.ts} (50%) create mode 100644 packages/schemas/features/blocks/logic/schema.ts create mode 100644 packages/schemas/features/blocks/logic/script/constants.ts create mode 100644 packages/schemas/features/blocks/logic/script/index.ts rename packages/schemas/features/blocks/logic/{script.ts => script/schema.ts} (55%) delete mode 100644 packages/schemas/features/blocks/logic/setVariable.ts create mode 100644 packages/schemas/features/blocks/logic/setVariable/constants.ts create mode 100644 packages/schemas/features/blocks/logic/setVariable/index.ts create mode 100644 packages/schemas/features/blocks/logic/setVariable/schema.ts create mode 100644 packages/schemas/features/blocks/logic/typebotLink/constants.ts create mode 100644 packages/schemas/features/blocks/logic/typebotLink/index.ts rename packages/schemas/features/blocks/logic/{typebotLink.ts => typebotLink/schema.ts} (57%) create mode 100644 packages/schemas/features/blocks/logic/wait/constants.ts create mode 100644 packages/schemas/features/blocks/logic/wait/index.ts rename packages/schemas/features/blocks/logic/{wait.ts => wait/schema.ts} (58%) create mode 100644 packages/schemas/features/blocks/schema.ts delete mode 100644 packages/schemas/features/blocks/schemas.ts rename packages/schemas/features/blocks/{baseSchemas.ts => shared.ts} (95%) create mode 100644 packages/schemas/features/events/constants.ts create mode 100644 packages/schemas/features/events/index.ts create mode 100644 packages/schemas/features/events/shared.ts create mode 100644 packages/schemas/features/events/start/index.ts create mode 100644 packages/schemas/features/events/start/schema.ts delete mode 100644 packages/schemas/features/items/baseSchemas.ts create mode 100644 packages/schemas/features/items/constants.ts delete mode 100644 packages/schemas/features/items/enums.ts create mode 100644 packages/schemas/features/items/schema.ts delete mode 100644 packages/schemas/features/items/schemas.ts create mode 100644 packages/schemas/features/items/shared.ts create mode 100644 packages/schemas/features/typebot/group.ts delete mode 100644 packages/schemas/features/typebot/settings.ts create mode 100644 packages/schemas/features/typebot/settings/constants.ts create mode 100644 packages/schemas/features/typebot/settings/index.ts create mode 100644 packages/schemas/features/typebot/settings/schema.ts create mode 100644 packages/schemas/features/typebot/theme/constants.ts delete mode 100644 packages/schemas/features/typebot/theme/enums.ts rename packages/schemas/features/typebot/theme/{schemas.ts => schema.ts} (57%) create mode 100644 packages/schemas/features/typebot/types.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 1f9b9e44d9..0f6751e137 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,9 +16,6 @@ "NEXT_PUBLIC_VIEWER_URL": "http://localhost:3001", "NEXTAUTH_URL": "http://localhost:3000" }, - "[php]": { - "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" - }, "[prisma]": { "editor.defaultFormatter": "Prisma.prisma" } diff --git a/apps/builder/package.json b/apps/builder/package.json index 252e9e7bbd..4bce6bff93 100644 --- a/apps/builder/package.json +++ b/apps/builder/package.json @@ -39,6 +39,7 @@ "@typebot.io/emails": "workspace:*", "@typebot.io/env": "workspace:*", "@typebot.io/nextjs": "workspace:*", + "@typebot.io/js": "workspace:*", "@udecode/plate-basic-marks": "21.1.5", "@udecode/plate-common": "21.1.5", "@udecode/plate-core": "21.1.5", @@ -116,7 +117,7 @@ "eslint-config-custom": "workspace:*", "next-runtime-env": "1.6.2", "superjson": "1.12.4", - "typescript": "5.1.6", - "zod": "3.21.4" + "typescript": "5.2.2", + "zod": "3.22.4" } } diff --git a/apps/builder/public/templates/basic-chat-gpt.json b/apps/builder/public/templates/basic-chat-gpt.json index c62b1bbb8b..dbd8a4a1ff 100644 --- a/apps/builder/public/templates/basic-chat-gpt.json +++ b/apps/builder/public/templates/basic-chat-gpt.json @@ -1,242 +1,214 @@ { - "id": "clf6ov7hg00001ao6q02sb8re", - "version": "4", - "createdAt": "2023-03-13T10:35:44.933Z", - "updatedAt": "2023-03-13T14:53:00.817Z", - "icon": "🤖", + "version": "6", + "id": "clofz4jhf00071a5pjlh8ruwr", "name": "Basic ChatGPT", - "folderId": null, - "groups": [ + "events": [ { "id": "ewnfbo0exlu7ihfu2lu2lusm", - "title": "Start", + "outgoingEdgeId": "q25yjqccpjv3i1tclgv1x941", + "graphCoordinates": { "x": -228.25, "y": -123.31 }, + "type": "start" + } + ], + "groups": [ + { + "id": "t3tv4dm3khwmiotjle5jb65g", + "title": "", + "graphCoordinates": { "x": 10.94, "y": -121.96 }, "blocks": [ { - "id": "igbipfi63m6p9sl2f77uicuv", - "type": "start", - "label": "Start", - "groupId": "ewnfbo0exlu7ihfu2lu2lusm", - "outgoingEdgeId": "sevwpre8fo896btd6xm1e1dv" + "id": "s6eky7dd3md9hto9y4wsuj7h", + "groupId": "t3tv4dm3khwmiotjle5jb65g", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your OpenAI credentials to make this bot work. 🪄" + } + ] + } + ] + } + }, + { + "id": "nqsu9f13q5j8tt56bcbuto62", + "groupId": "t3tv4dm3khwmiotjle5jb65g", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, delete this group and connect the " + }, + { "bold": true, "text": "Start" }, + { "text": " event with " }, + { "bold": true, "text": "Intro" }, + { "text": " 🚀" } + ] + } + ] + } } - ], - "graphCoordinates": { "x": -20.9296875, "y": -125.6796875 } + ] }, { "id": "qfrz5nwm63g12dajsjxothb5", "title": "User input", + "graphCoordinates": { "x": 198.64, "y": 179.04 }, "blocks": [ { "id": "ovgk70u0kfxrbtz9dy4e040o", + "groupId": "qfrz5nwm63g12dajsjxothb5", "type": "text input", + "options": { "variableId": "vudksu3zyrat6s1bq6qne0rx3" } + }, + { + "id": "m4jadtknjb3za3gvxj1xdn1k", "groupId": "qfrz5nwm63g12dajsjxothb5", + "outgoingEdgeId": "fpj0xacppqd1s5slyljzhzc9", + "type": "Set variable", "options": { - "isLong": true, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, - "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "kwm65fnel1gddbwdki9rq76v" + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 385.59765625, "y": 176 } + ] }, { "id": "a6ymhjwtkqwp8t127plz8qmk", "title": "ChatGPT reply", + "graphCoordinates": { "x": 624.57, "y": 200.09 }, "blocks": [ { "id": "xikptnw1lp1qxdqo10qhmwy1", - "type": "OpenAI", "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "type": "OpenAI", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", "messages": [ { - "id": "vexqydoltfc5fkdrcednlvjz", - "role": "Messages sequence ✨", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "id": "wsdxha9db58gk2v9n1j10m7c", + "role": "Dialogue", + "dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf", + "startsBy": "user" } ], "responseMapping": [ { - "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "id": "p8ksqi2jhyzid2od3dikv299", + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } - ] + ], + "credentialsId": "clocxtxlc00031an2uc59hdpb" + } + }, + { + "id": "yblc864bzipaqfja7b2o3oo0", + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "type": "Set variable", + "options": { + "variableId": "vabkycu0qqff5d6ar2ama16pf", + "type": "Append value(s)", + "item": "{{Assistant Message}}" } }, { "id": "myldn1l1nfdwwm8qvza71rwv", + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "a6ymhjwtkqwp8t127plz8qmk", - "outgoingEdgeId": "y8ml9ljnsydol9b42fd9zdve" + } } - ], - "graphCoordinates": { "x": 744.05078125, "y": 178.00390625 } + ] }, { "id": "c5f00f3oclwi1srcz10jjt9u", "title": "Intro", + "graphCoordinates": { "x": -183.19, "y": 156.03 }, "blocks": [ { "id": "vzcrfk4vl9gy8igu0ysja5nc", + "groupId": "c5f00f3oclwi1srcz10jjt9u", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "Hi there 👋" }] } ] - }, - "groupId": "c5f00f3oclwi1srcz10jjt9u" + } }, { "id": "gphm5wy1md9cunwkdtbzg6nq", - "type": "text", - "content": { - "richText": [ - { "type": "p", "children": [{ "text": "How can I help?" }] } - ] - }, "groupId": "c5f00f3oclwi1srcz10jjt9u", - "outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw" - } - ], - "graphCoordinates": { "x": 54.7421875, "y": 172.83203125 } - }, - { - "id": "t3tv4dm3khwmiotjle5jb65g", - "title": "", - "blocks": [ - { - "id": "s6eky7dd3md9hto9y4wsuj7h", + "outgoingEdgeId": "h5sk58j0ryrxmfv4gmw7r4dw", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [ - { - "text": "You need to add your OpenAI credentials to make this bot work. 🪄" - } - ] - } - ] - }, - "groupId": "t3tv4dm3khwmiotjle5jb65g" - }, - { - "id": "nqsu9f13q5j8tt56bcbuto62", - "type": "text", - "content": { - "richText": [ - { - "type": "p", - "children": [ - { - "text": "Once it's done, delete this group and connect the " - }, - { "bold": true, "text": "Start" }, - { "text": " block with " }, - { "bold": true, "text": "Intro" }, - { "text": " 🚀" } - ] - } + { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "t3tv4dm3khwmiotjle5jb65g" + } } - ], - "graphCoordinates": { "x": 321.13671875, "y": -121.90234375 } + ] } ], - "variables": [ - { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" }, - { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" } - ], "edges": [ { "id": "h5sk58j0ryrxmfv4gmw7r4dw", - "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }, "from": { - "blockId": "gphm5wy1md9cunwkdtbzg6nq", - "groupId": "c5f00f3oclwi1srcz10jjt9u" - } + "groupId": "c5f00f3oclwi1srcz10jjt9u", + "blockId": "gphm5wy1md9cunwkdtbzg6nq" + }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } }, { - "id": "kwm65fnel1gddbwdki9rq76v", - "to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }, + "id": "y8ml9ljnsydol9b42fd9zdve", "from": { - "blockId": "ovgk70u0kfxrbtz9dy4e040o", - "groupId": "qfrz5nwm63g12dajsjxothb5" - } + "groupId": "a6ymhjwtkqwp8t127plz8qmk", + "blockId": "myldn1l1nfdwwm8qvza71rwv" + }, + "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" } }, { - "id": "y8ml9ljnsydol9b42fd9zdve", - "to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }, + "id": "fpj0xacppqd1s5slyljzhzc9", "from": { - "blockId": "myldn1l1nfdwwm8qvza71rwv", - "groupId": "a6ymhjwtkqwp8t127plz8qmk" - } + "groupId": "qfrz5nwm63g12dajsjxothb5", + "blockId": "m4jadtknjb3za3gvxj1xdn1k" + }, + "to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" } }, { - "id": "sevwpre8fo896btd6xm1e1dv", + "from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" }, "to": { "groupId": "t3tv4dm3khwmiotjle5jb65g" }, - "from": { - "blockId": "igbipfi63m6p9sl2f77uicuv", - "groupId": "ewnfbo0exlu7ihfu2lu2lusm" - } + "id": "q25yjqccpjv3i1tclgv1x941" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vudksu3zyrat6s1bq6qne0rx3", "name": "User Message" }, + { "id": "vabkycu0qqff5d6ar2ama16pf", "name": "Chat history" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": { "general": {} }, + "createdAt": "2023-11-01T16:30:13.155Z", + "updatedAt": "2023-11-01T16:30:13.155Z", + "icon": "🤖", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/chat-gpt-personas.json b/apps/builder/public/templates/chat-gpt-personas.json index bff9befaf8..fbc9005566 100644 --- a/apps/builder/public/templates/chat-gpt-personas.json +++ b/apps/builder/public/templates/chat-gpt-personas.json @@ -1,29 +1,20 @@ { - "id": "qcueq3ttys1ddagic7jsimp4", - "version": "4", - "createdAt": "2023-03-30T15:45:12.464Z", - "updatedAt": "2023-03-30T15:45:12.464Z", - "icon": "🎭", + "version": "6", + "id": "cloi9k6tf00051aqji6vk88pq", "name": "ChatGPT personas", - "folderId": null, - "groups": [ + "events": [ { "id": "w99qhdr20tw02sfrfwkfc1tg", - "title": "Start", - "blocks": [ - { - "id": "igbipfi63m6p9sl2f77uicuv", - "type": "start", - "label": "Start", - "groupId": "w99qhdr20tw02sfrfwkfc1tg", - "outgoingEdgeId": "x91dpk80zw2b4co4xra33cwg" - } - ], - "graphCoordinates": { "x": -61.95703125, "y": -242.94140625 } - }, + "outgoingEdgeId": "c3733n7ia1hxcwld9lm3p351", + "graphCoordinates": { "x": -95.29, "y": -267.02 }, + "type": "start" + } + ], + "groups": [ { "id": "bofjp88arodr4k0btv2esyqy", "title": "", + "graphCoordinates": { "x": 188.44, "y": -308.74 }, "blocks": [ { "id": "s6eky7dd3md9hto9y4wsuj7h", @@ -39,8 +30,7 @@ ] } ] - }, - "groupId": "bofjp88arodr4k0btv2esyqy" + } }, { "id": "nqsu9f13q5j8tt56bcbuto62", @@ -60,20 +50,18 @@ ] } ] - }, - "groupId": "bofjp88arodr4k0btv2esyqy" + } } - ], - "graphCoordinates": { "x": 303.5859375, "y": -278.4921875 } + ] }, { "id": "dmg57mgick51p8l5pnyqtyf9", "title": "Explainer AI reply", + "graphCoordinates": { "x": 1053.297810684862, "y": 919.9658659364646 }, "blocks": [ { "id": "xikptnw1lp1qxdqo10qhmwy1", "type": "OpenAI", - "groupId": "dmg57mgick51p8l5pnyqtyf9", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -85,34 +73,36 @@ }, { "id": "i8i226uylkh84ovtpguaqc83", - "role": "Messages sequence ✨", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "kftq9x1wnrcefzc268ydmqkn", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "myldn1l1nfdwwm8qvza71rwv", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "dmg57mgick51p8l5pnyqtyf9" + } }, { "id": "jz9mklagfikyukzs7n3kmlcf", @@ -120,33 +110,28 @@ "items": [ { "id": "x18iwzwmbzi9jjpnwij1861i", - "type": 0, - "blockId": "jz9mklagfikyukzs7n3kmlcf", - "content": "Continue", - "outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo" + "outgoingEdgeId": "mxl8lftsj3pbmj4g24ymxajo", + "type": "button", + "content": "Continue" }, { "id": "imx7otsonvm0takr02b4ulyo", - "type": 0, - "blockId": "jz9mklagfikyukzs7n3kmlcf", - "content": "Menu", - "outgoingEdgeId": "ny44r5sp69gne7obgshidhph" + "outgoingEdgeId": "ny44r5sp69gne7obgshidhph", + "type": "button", + "content": "Menu" } - ], - "groupId": "dmg57mgick51p8l5pnyqtyf9", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1053.2978106848623, "y": 919.9658659364646 } + ] }, { "id": "fj5z2nx488htv0843kq6qeyk", "title": "Professor AI reply", + "graphCoordinates": { "x": 1040.86, "y": -128.46 }, "blocks": [ { "id": "f2r11ibqq2ufrahfcl3gf6qi", "type": "OpenAI", - "groupId": "fj5z2nx488htv0843kq6qeyk", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -158,34 +143,36 @@ }, { "id": "biqljpsbqfkgno4m80s4j5p0", - "role": "Messages sequence ✨", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "dyfigmu4095x8p99qe461zbh", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "sei88rrjcmpgm3vhxjvkofyt", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "fj5z2nx488htv0843kq6qeyk" + } }, { "id": "h3qetbhcpxhawnqoymo0v3hw", @@ -193,33 +180,28 @@ "items": [ { "id": "zaylo8bstqx0wp6bpdbd1rak", - "type": 0, - "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "content": "Continue", - "outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw" + "outgoingEdgeId": "q6o0cbyzxtvgls3jtz7rpdgw", + "type": "button", + "content": "Continue" }, { "id": "d5jv3sjpzobsrnhcp055mxkv", - "type": 0, - "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "content": "Back to menu", - "outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4" + "outgoingEdgeId": "xjv7pkpgpwh169448t8pepg4", + "type": "button", + "content": "Back to menu" } - ], - "groupId": "fj5z2nx488htv0843kq6qeyk", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1047.7979125005486, "y": 4.6530793670072885 } + ] }, { "id": "csbysu8dr08zxr4i6hzvzjdf", "title": "Copywriter AI reply", + "graphCoordinates": { "x": 1044.25, "y": 372.87 }, "blocks": [ { "id": "h2t5vbir3zh8eku55ozwb1du", "type": "OpenAI", - "groupId": "csbysu8dr08zxr4i6hzvzjdf", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -231,34 +213,36 @@ }, { "id": "ynbhlcbsmy24pobiay9zezli", - "role": "Messages sequence ✨", - "content": { - "userMessagesVariableId": "vevnx5f5bojz0sv648x6ppcmv", - "assistantMessagesVariableId": "vni6kwbch8zlq92dclgcivzyr" - } + "role": "Dialogue", + "dialogueVariableId": "vu9adij5penetej2xz89htfe6" } ], "responseMapping": [ { "id": "brb5ccisi1tjiqf3ng0asaiq", - "variableId": "vni6kwbch8zlq92dclgcivzyr", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vni6kwbch8zlq92dclgcivzyr" } ] } }, + { + "id": "usolgxcte60rin18ccygzbdu", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{Assistant Message}}" + } + }, { "id": "h96lile0evtqa0jx24gmfo25", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [{ "text": "{{Assistant Messages}}" }] - } + { "type": "p", "children": [{ "text": "{{Assistant Message}}" }] } ] - }, - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + } }, { "id": "u4jdl0gwv8965o2etxjk12w0", @@ -266,29 +250,33 @@ "items": [ { "id": "b6zif4xxe2cuiddc2oqayaxi", - "type": 0, - "blockId": "u4jdl0gwv8965o2etxjk12w0", - "content": "Continue", - "outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s" + "outgoingEdgeId": "jwydpoxngp2gvwanaruphe6s", + "type": "button", + "content": "Continue" }, { "id": "ooib3mqlfkazta6iol1ocloe", - "type": 0, - "blockId": "u4jdl0gwv8965o2etxjk12w0", - "content": "Back to menu", - "outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01" + "outgoingEdgeId": "gfrpgowch879p1qaj9jzsh01", + "type": "button", + "content": "Back to menu" } - ], - "groupId": "csbysu8dr08zxr4i6hzvzjdf", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 1049.2780591838002, "y": 458.6633630669161 } + ] }, { "id": "u6nm47oyneidmsebszp60t0m", "title": "Menu", + "graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 }, "blocks": [ + { + "id": "rzlhl61q6dmh8n93usvqgyij", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Empty" + } + }, { "id": "gphm5wy1md9cunwkdtbzg6nq", "type": "text", @@ -299,20 +287,7 @@ "children": [{ "text": "Who would you want to talk to?" }] } ] - }, - "groupId": "u6nm47oyneidmsebszp60t0m" - }, - { - "id": "yodc4upemgfx55m919mdz694", - "type": "Set variable", - "groupId": "u6nm47oyneidmsebszp60t0m", - "options": { "variableId": "vevnx5f5bojz0sv648x6ppcmv" } - }, - { - "id": "rzlhl61q6dmh8n93usvqgyij", - "type": "Set variable", - "groupId": "u6nm47oyneidmsebszp60t0m", - "options": { "variableId": "vni6kwbch8zlq92dclgcivzyr" } + } }, { "id": "ohh19koa7up0nbke3146hnjp", @@ -320,104 +295,91 @@ "items": [ { "id": "rn0lqz1wvsg9lmc0jcl6ps8j", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "English professor", - "outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj" + "outgoingEdgeId": "ry7l8wcaidxw5izm7zoy83kj", + "type": "button", + "content": "English professor" }, { "id": "le84cls9vkmrxquvqw8bhp7h", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "Copywriter", - "outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz" + "outgoingEdgeId": "iy2htkuup0l908fsosg6d2qz", + "type": "button", + "content": "Copywriter" }, { "id": "mx4kgfgena53mxf87piwu1j2", - "type": 0, - "blockId": "ohh19koa7up0nbke3146hnjp", - "content": "Concept explainer", - "outgoingEdgeId": "kmex71jzzzekni4louuy3xbf" + "outgoingEdgeId": "kmex71jzzzekni4louuy3xbf", + "type": "button", + "content": "Concept explainer" } ], - "groupId": "u6nm47oyneidmsebszp60t0m", "options": { - "variableId": "vs7wwz29yyd21pfl4syeptdgi", - "buttonLabel": "Send", - "isMultipleChoice": false + "variableId": "vs7wwz29yyd21pfl4syeptdgi" } } - ], - "graphCoordinates": { "x": -6.082566623728974, "y": 37.78518756228981 } + ] }, { "id": "oemwa82xy3yt74gzilrojogl", "title": "Jumps", + "graphCoordinates": { "x": 1431.381871940994, "y": 1083.626261828848 }, "blocks": [ { "id": "nnzp5mle206cl3nnqlkqjau1", "type": "Jump", - "groupId": "py4fhjf59krp2ahz7fpdtj6h", "options": { "groupId": "irnu2zu8m2i4fu6485hxtra5" } }, { "id": "nm6vp6ifbjq7mttohwhibjvj", "type": "Jump", - "groupId": "py4fhjf59krp2ahz7fpdtj6h", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1431.381871940994, "y": 1083.6262618288476 } + ] }, { "id": "p1fh0e2y8sq4lhrskc4rb5z2", "title": "Jumps", + "graphCoordinates": { "x": 1436.545931193238, "y": 679.7247165284323 }, "blocks": [ { "id": "kyuvkruakbxjvxwgtjqti3gc", "type": "Jump", - "groupId": "wjgoxgdh5dxvulkn013oad81", "options": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" } }, { "id": "vywm4h8yz87ew4gjy4l6nmm3", "type": "Jump", - "groupId": "wjgoxgdh5dxvulkn013oad81", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1436.5459311932382, "y": 679.7247165284323 } + ] }, { "id": "ow2g8fv93xxrgpcabnx8uod8", "title": "Jumps", + "graphCoordinates": { "x": 1419.568721793131, "y": 169.5335644029076 }, "blocks": [ { "id": "qxgl1cscs38pfwzaj4pqsd46", "type": "Jump", - "groupId": "uz4isdxf2lha8y98f5umzeb7", "options": { "groupId": "m84gejzvl08ky6ynruiuszpc" } }, { "id": "m94q879l9yr1vx5xrbxlsj6q", "type": "Jump", - "groupId": "uz4isdxf2lha8y98f5umzeb7", "options": { "groupId": "u6nm47oyneidmsebszp60t0m" } } - ], - "graphCoordinates": { "x": 1419.5687217931309, "y": 169.5335644029076 } + ] }, { "id": "py719ungczkgz5f40zkw3tr2", "title": "EN professor intro", + "graphCoordinates": { "x": 339.814926172369, "y": 9.945652574763692 }, "blocks": [ { "id": "qm3v36qb93ijnghdjgy9mcwf", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] - }, - "groupId": "py719ungczkgz5f40zkw3tr2" + } }, { "id": "ln8d3vdq4shclzrxcy9rmxfg", @@ -433,34 +395,31 @@ ] } ] - }, - "groupId": "py719ungczkgz5f40zkw3tr2" + } }, { "id": "r7yu488ugfif8hxy3e4sospb", + "outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "py719ungczkgz5f40zkw3tr2", - "outgoingEdgeId": "ripf74t9yicdze8xr2yrklyx" + } } - ], - "graphCoordinates": { "x": 339.81492617236904, "y": 9.945652574763692 } + ] }, { "id": "uyry49c9bm1pvk6t8i471l2d", "title": "Copywriter intro", + "graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 }, "blocks": [ { "id": "bbeedootn9m8eass0mqu3w4t", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d" + } }, { "id": "chdghb0k27c4okwu9yky4ox4", @@ -472,34 +431,31 @@ "children": [{ "text": "I'm an expert in copywriting." }] } ] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d" + } }, { "id": "idp7w8c8zbkvl95oa1vquiml", + "outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "How can I help?" }] } ] - }, - "groupId": "uyry49c9bm1pvk6t8i471l2d", - "outgoingEdgeId": "v0tfmbt8tpwwrieftvzg8lti" + } } - ], - "graphCoordinates": { "x": 335.3081238025464, "y": 468.3681191076254 } + ] }, { "id": "zfa8oj0a0tnlho9a67llulst", "title": "Explainer intro", + "graphCoordinates": { "x": 326.9849960884654, "y": 928.6632806049557 }, "blocks": [ { "id": "n96j3pf3m87aufcapx2ulr2n", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi 👋" }] }] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst" + } }, { "id": "wxk5z9yyiojkk9u3b5m6shax", @@ -513,11 +469,11 @@ ] } ] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst" + } }, { "id": "ileqgg2r2kyh2zovpivr775s", + "outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx", "type": "text", "content": { "richText": [ @@ -528,279 +484,242 @@ ] } ] - }, - "groupId": "zfa8oj0a0tnlho9a67llulst", - "outgoingEdgeId": "v5bki4h7m1lnryhgzudnvvpx" + } } - ], - "graphCoordinates": { "x": 326.98499608846544, "y": 928.6632806049557 } + ] }, { "id": "m84gejzvl08ky6ynruiuszpc", "title": "EN professor question", + "graphCoordinates": { "x": 692.86, "y": -14.84 }, "blocks": [ { "id": "ovgk70u0kfxrbtz9dy4e040o", "type": "text input", - "groupId": "m84gejzvl08ky6ynruiuszpc", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "vapajzlffxq1lgudxgm14g05" + "isLong": true + } + }, + { + "id": "nx6v1ogcp9x9o6regjopvff8", + "outgoingEdgeId": "cplyootzgqo5jpmhntgz4shm", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 692.8604882239152, "y": 11.63391545939837 } + ] }, { "id": "h4mcrr5x6lvy1mz96k0ey3do", "title": "Copywriter question", + "graphCoordinates": { "x": 692.3449852228088, "y": 462.3858990822391 }, "blocks": [ { "id": "emii43mtihiuy35gpp6b91d8", "type": "text input", - "groupId": "h4mcrr5x6lvy1mz96k0ey3do", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "vtffpz6eh4n95kwlb8zpu7cz" + "isLong": true + } + }, + { + "id": "h0cgmv6q61s3yhuq6u2pb5p0", + "outgoingEdgeId": "za1pwdunrlwgfu1kz7dnsb3m", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 692.3449852228088, "y": 462.38589908223906 } + ] }, { "id": "irnu2zu8m2i4fu6485hxtra5", "title": "Explainer question", + "graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 }, "blocks": [ { "id": "e6rovxwxlizr54iy8nyi84pi", "type": "text input", - "groupId": "irnu2zu8m2i4fu6485hxtra5", "options": { - "isLong": false, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vevnx5f5bojz0sv648x6ppcmv", - "isPrefillDisabled": true - }, - "outgoingEdgeId": "wv3t43ccf35mewn52liqtjg1" + "isLong": false + } + }, + { + "id": "b937909x86r3wzbn4mzxmw25", + "outgoingEdgeId": "fz77htstfb4jig82k66pl0vt", + "type": "Set variable", + "options": { + "variableId": "vu9adij5penetej2xz89htfe6", + "type": "Append value(s)", + "item": "{{User Message}}" + } } - ], - "graphCoordinates": { "x": 686.3012488543691, "y": 924.2085365228105 } + ] } ], - "variables": [ - { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Messages" }, - { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Messages" }, - { "id": "vldefdrythqxfh9p9p38jvmb2", "name": "Prompt" }, - { "id": "vs7wwz29yyd21pfl4syeptdgi", "name": "Persona" } - ], "edges": [ { "id": "ny44r5sp69gne7obgshidhph", - "to": { - "blockId": "nm6vp6ifbjq7mttohwhibjvj", - "groupId": "oemwa82xy3yt74gzilrojogl" - }, "from": { - "itemId": "imx7otsonvm0takr02b4ulyo", "blockId": "jz9mklagfikyukzs7n3kmlcf", - "groupId": "dmg57mgick51p8l5pnyqtyf9" + "itemId": "imx7otsonvm0takr02b4ulyo" + }, + "to": { + "groupId": "oemwa82xy3yt74gzilrojogl", + "blockId": "nm6vp6ifbjq7mttohwhibjvj" } }, { "id": "mxl8lftsj3pbmj4g24ymxajo", - "to": { - "blockId": "nnzp5mle206cl3nnqlkqjau1", - "groupId": "oemwa82xy3yt74gzilrojogl" - }, "from": { - "itemId": "x18iwzwmbzi9jjpnwij1861i", "blockId": "jz9mklagfikyukzs7n3kmlcf", - "groupId": "dmg57mgick51p8l5pnyqtyf9" + "itemId": "x18iwzwmbzi9jjpnwij1861i" + }, + "to": { + "groupId": "oemwa82xy3yt74gzilrojogl", + "blockId": "nnzp5mle206cl3nnqlkqjau1" } }, { "id": "ry7l8wcaidxw5izm7zoy83kj", - "to": { "groupId": "py719ungczkgz5f40zkw3tr2" }, "from": { - "itemId": "rn0lqz1wvsg9lmc0jcl6ps8j", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "rn0lqz1wvsg9lmc0jcl6ps8j" + }, + "to": { "groupId": "py719ungczkgz5f40zkw3tr2" } }, { "id": "ripf74t9yicdze8xr2yrklyx", - "to": { "groupId": "m84gejzvl08ky6ynruiuszpc" }, - "from": { - "blockId": "r7yu488ugfif8hxy3e4sospb", - "groupId": "py719ungczkgz5f40zkw3tr2" - } - }, - { - "id": "vapajzlffxq1lgudxgm14g05", - "to": { "groupId": "fj5z2nx488htv0843kq6qeyk" }, - "from": { - "blockId": "ovgk70u0kfxrbtz9dy4e040o", - "groupId": "m84gejzvl08ky6ynruiuszpc" - } + "from": { "blockId": "r7yu488ugfif8hxy3e4sospb" }, + "to": { "groupId": "m84gejzvl08ky6ynruiuszpc" } }, { "id": "q6o0cbyzxtvgls3jtz7rpdgw", - "to": { - "blockId": "qxgl1cscs38pfwzaj4pqsd46", - "groupId": "ow2g8fv93xxrgpcabnx8uod8" - }, "from": { - "itemId": "zaylo8bstqx0wp6bpdbd1rak", "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "groupId": "fj5z2nx488htv0843kq6qeyk" + "itemId": "zaylo8bstqx0wp6bpdbd1rak" + }, + "to": { + "groupId": "ow2g8fv93xxrgpcabnx8uod8", + "blockId": "qxgl1cscs38pfwzaj4pqsd46" } }, { "id": "xjv7pkpgpwh169448t8pepg4", - "to": { - "blockId": "m94q879l9yr1vx5xrbxlsj6q", - "groupId": "ow2g8fv93xxrgpcabnx8uod8" - }, "from": { - "itemId": "d5jv3sjpzobsrnhcp055mxkv", "blockId": "h3qetbhcpxhawnqoymo0v3hw", - "groupId": "fj5z2nx488htv0843kq6qeyk" + "itemId": "d5jv3sjpzobsrnhcp055mxkv" + }, + "to": { + "groupId": "ow2g8fv93xxrgpcabnx8uod8", + "blockId": "m94q879l9yr1vx5xrbxlsj6q" } }, { "id": "v0tfmbt8tpwwrieftvzg8lti", - "to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" }, - "from": { - "blockId": "idp7w8c8zbkvl95oa1vquiml", - "groupId": "uyry49c9bm1pvk6t8i471l2d" - } - }, - { - "id": "vtffpz6eh4n95kwlb8zpu7cz", - "to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" }, - "from": { - "blockId": "emii43mtihiuy35gpp6b91d8", - "groupId": "h4mcrr5x6lvy1mz96k0ey3do" - } + "from": { "blockId": "idp7w8c8zbkvl95oa1vquiml" }, + "to": { "groupId": "h4mcrr5x6lvy1mz96k0ey3do" } }, { "id": "iy2htkuup0l908fsosg6d2qz", - "to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" }, "from": { - "itemId": "le84cls9vkmrxquvqw8bhp7h", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "le84cls9vkmrxquvqw8bhp7h" + }, + "to": { "groupId": "uyry49c9bm1pvk6t8i471l2d" } }, { "id": "kmex71jzzzekni4louuy3xbf", - "to": { "groupId": "zfa8oj0a0tnlho9a67llulst" }, "from": { - "itemId": "mx4kgfgena53mxf87piwu1j2", "blockId": "ohh19koa7up0nbke3146hnjp", - "groupId": "u6nm47oyneidmsebszp60t0m" - } + "itemId": "mx4kgfgena53mxf87piwu1j2" + }, + "to": { "groupId": "zfa8oj0a0tnlho9a67llulst" } }, { "id": "v5bki4h7m1lnryhgzudnvvpx", - "to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" }, - "from": { - "blockId": "ileqgg2r2kyh2zovpivr775s", - "groupId": "zfa8oj0a0tnlho9a67llulst" - } - }, - { - "id": "wv3t43ccf35mewn52liqtjg1", - "to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" }, - "from": { - "blockId": "e6rovxwxlizr54iy8nyi84pi", - "groupId": "irnu2zu8m2i4fu6485hxtra5" - } + "from": { "blockId": "ileqgg2r2kyh2zovpivr775s" }, + "to": { "groupId": "irnu2zu8m2i4fu6485hxtra5" } }, { "id": "gfrpgowch879p1qaj9jzsh01", - "to": { - "blockId": "vywm4h8yz87ew4gjy4l6nmm3", - "groupId": "p1fh0e2y8sq4lhrskc4rb5z2" - }, "from": { - "itemId": "ooib3mqlfkazta6iol1ocloe", "blockId": "u4jdl0gwv8965o2etxjk12w0", - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + "itemId": "ooib3mqlfkazta6iol1ocloe" + }, + "to": { + "groupId": "p1fh0e2y8sq4lhrskc4rb5z2", + "blockId": "vywm4h8yz87ew4gjy4l6nmm3" } }, { "id": "jwydpoxngp2gvwanaruphe6s", - "to": { - "blockId": "kyuvkruakbxjvxwgtjqti3gc", - "groupId": "p1fh0e2y8sq4lhrskc4rb5z2" - }, "from": { - "itemId": "b6zif4xxe2cuiddc2oqayaxi", "blockId": "u4jdl0gwv8965o2etxjk12w0", - "groupId": "csbysu8dr08zxr4i6hzvzjdf" + "itemId": "b6zif4xxe2cuiddc2oqayaxi" + }, + "to": { + "groupId": "p1fh0e2y8sq4lhrskc4rb5z2", + "blockId": "kyuvkruakbxjvxwgtjqti3gc" } }, { - "from": { - "groupId": "w99qhdr20tw02sfrfwkfc1tg", - "blockId": "igbipfi63m6p9sl2f77uicuv" - }, + "id": "cplyootzgqo5jpmhntgz4shm", + "from": { "blockId": "nx6v1ogcp9x9o6regjopvff8" }, + "to": { "groupId": "fj5z2nx488htv0843kq6qeyk" } + }, + { + "id": "za1pwdunrlwgfu1kz7dnsb3m", + "from": { "blockId": "h0cgmv6q61s3yhuq6u2pb5p0" }, + "to": { "groupId": "csbysu8dr08zxr4i6hzvzjdf" } + }, + { + "id": "fz77htstfb4jig82k66pl0vt", + "from": { "blockId": "b937909x86r3wzbn4mzxmw25" }, + "to": { "groupId": "dmg57mgick51p8l5pnyqtyf9" } + }, + { + "from": { "eventId": "w99qhdr20tw02sfrfwkfc1tg" }, "to": { "groupId": "bofjp88arodr4k0btv2esyqy" }, - "id": "x91dpk80zw2b4co4xra33cwg" + "id": "c3733n7ia1hxcwld9lm3p351" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, + "variables": [ + { "id": "vni6kwbch8zlq92dclgcivzyr", "name": "Assistant Message" }, + { "id": "vevnx5f5bojz0sv648x6ppcmv", "name": "User Message" }, + { "id": "vu9adij5penetej2xz89htfe6", "name": "Chat history" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "settings": {}, + "createdAt": "2023-11-03T06:57:51.747Z", + "updatedAt": "2023-11-03T07:03:19.089Z", + "icon": "🎭", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/customer-support.json b/apps/builder/public/templates/customer-support.json index 8d88192600..e4190ec6c5 100644 --- a/apps/builder/public/templates/customer-support.json +++ b/apps/builder/public/templates/customer-support.json @@ -1,33 +1,24 @@ { - "id": "cl16la7p900990b1a72qjqbb3", - "version": "4", - "createdAt": "2022-03-25T15:39:33.885Z", - "updatedAt": "2022-03-25T15:42:12.544Z", + "version": "6", + "id": "cloo046v300051aorhtv76f0i", "name": "Customer Support", - "icon": "😍", - "folderId": null, - "groups": [ + "events": [ { "id": "uG1tt8JdDyu2nju3oJ4wc1", - "blocks": [ - { - "id": "bFHwV7tnY5dke8pQeFY8v6", - "type": "start", - "label": "Start", - "groupId": "uG1tt8JdDyu2nju3oJ4wc1", - "outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg" - } - ], - "title": "Start", - "graphCoordinates": { "x": -281, "y": -89 } - }, + "outgoingEdgeId": "2dzxChB1qm9WGfzNF91tfg", + "graphCoordinates": { "x": -281, "y": -89 }, + "type": "start" + } + ], + "groups": [ { "id": "vLUAPaxKwPF49iZhg4XZYa", + "title": "Menu", + "graphCoordinates": { "x": -28.4, "y": -88.19 }, "blocks": [ { "id": "spud6U3K1omh2dZG8yN2CW4", "type": "text", - "groupId": "vLUAPaxKwPF49iZhg4XZYa", "content": { "richText": [ { "type": "p", "children": [{ "text": "Hey friend 👋" }] }, @@ -41,40 +32,31 @@ "items": [ { "id": "fQ8oLDnKmDBuPDK7riJ2kt", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "I have a feature request ✨", - "outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2" + "outgoingEdgeId": "dhniFxrsH5r54aEE5JXwK2", + "content": "I have a feature request ✨" }, { "id": "h2rFDX2UnKS4Kdu3Eyuqq3", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "There is a bug 🐛", - "outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9" + "outgoingEdgeId": "2C4mhU5o2Hdm7dztR9xNE9", + "content": "There is a bug 🐛" }, { "id": "hcUFBPeQA3gSyXRprRk2v9", - "type": 0, - "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "content": "I have a question 💭", - "outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV" + "outgoingEdgeId": "bTo6CZD1YapDDyVdvJgFDV", + "content": "I have a question 💭" } - ], - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "title": "Menu", - "graphCoordinates": { "x": -7, "y": 90 } + ] }, { "id": "7MuqF6nen1ZTwGB53Mz8VY", + "title": "Bug", + "graphCoordinates": { "x": 364.46, "y": 92.39 }, "blocks": [ { "id": "sjsECyfSBMkUnoWaEnBTmJX", "type": "text", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "content": { "richText": [{ "type": "p", "children": [{ "text": "Shoot! 🤪" }] }] } @@ -82,7 +64,6 @@ { "id": "seomQsnPWgiMzQVeZ3us7x2", "type": "text", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "content": { "richText": [ { @@ -98,29 +79,26 @@ }, { "id": "s3LYyyYtjdQ88jkMMV5DSW7", + "outgoingEdgeId": "cl1571jhh00022e6dk77f52wg", "type": "text input", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY", "options": { - "isLong": true, "labels": { - "button": "Send", "placeholder": "Describe the bug..." }, - "variableId": "v51BcuecnB6kRU1tsttaGyR" - }, - "outgoingEdgeId": "cl1571jhh00022e6dk77f52wg" + "variableId": "v51BcuecnB6kRU1tsttaGyR", + "isLong": true + } } - ], - "title": "Bug", - "graphCoordinates": { "x": 476, "y": 76 } + ] }, { "id": "kyK8JQ77NodUYaz3JLS88A", + "title": "Feature request", + "graphCoordinates": { "x": 364.36, "y": -517.93 }, "blocks": [ { "id": "s9bgHcWdobb8Z5cTbrnTz6R", "type": "text", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "content": { "richText": [{ "type": "p", "children": [{ "text": "Awesome!" }] }] } @@ -128,7 +106,6 @@ { "id": "s2NbNaBGKhMvdEUdVPXKZjy", "type": "text", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "content": { "richText": [ { @@ -162,39 +139,24 @@ }, { "id": "cl16lb3b300092e6dh4h01vxw", - "groupId": "kyK8JQ77NodUYaz3JLS88A", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "items": [ - { - "id": "cl16lb3b3000a2e6dy8zdhzpz", - "blockId": "cl16lb3b300092e6dh4h01vxw", - "type": 0, - "content": "Restart" - } - ] + "items": [{ "id": "cl16lb3b3000a2e6dy8zdhzpz", "content": "Restart" }] }, { - "id": "cl16lablb00082e6dadk55sxv", - "groupId": "kyK8JQ77NodUYaz3JLS88A", - "type": "Typebot link", - "options": { - "typebotId": "current", - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "mergeResults": false - } + "id": "j08qxg0h804rngfroedblt5f", + "type": "Jump", + "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } } - ], - "title": "Feature request", - "graphCoordinates": { "x": 477, "y": -563 } + ] }, { "id": "puWCBhGWSQRbqTkVH89RCf", + "title": "Question", + "graphCoordinates": { "x": 365.4, "y": 491.3 }, "blocks": [ { "id": "sm4iHhLQs9yNdRG3b7xqV8Y", "type": "text", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "richText": [ { @@ -205,8 +167,7 @@ "url": "https://docs.typebot.io/", "type": "a", "children": [{ "text": "Documentation 🙏" }] - }, - { "text": "" } + } ] } ] @@ -215,7 +176,6 @@ { "id": "sreX6rwMevEmbTpnkGCtp3k", "type": "text", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "richText": [ { @@ -228,36 +188,29 @@ { "id": "so4GiKFWWjKCjXgmMJYCGbe", "type": "image", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "content": { "url": "https://media0.giphy.com/media/rhgwg4qBu97ISgbfni/giphy-downsized.gif?cid=fe3852a3wimy48e55djt23j44uto7gdlu8ksytylafisvr0q&rid=giphy-downsized.gif&ct=g" } }, { "id": "sjd4qACugMarB7gJC8nMhb3", + "outgoingEdgeId": "cl1571ktd00032e6dyti22850", "type": "text input", - "groupId": "puWCBhGWSQRbqTkVH89RCf", "options": { - "isLong": true, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, - "variableId": "v51BcuecnB6kRU1tsttaGyR" - }, - "outgoingEdgeId": "cl1571ktd00032e6dyti22850" + "variableId": "v51BcuecnB6kRU1tsttaGyR", + "isLong": true + } } - ], - "title": "Question", - "graphCoordinates": { "x": 476, "y": 399 } + ] }, { "id": "1GvxCAAEysxJMxrVngud3X", + "title": "Bye", + "graphCoordinates": { "x": 1115.81, "y": 728.71 }, "blocks": [ { "id": "s6uLw72EAKbACrpYHr7DSyY", "type": "text", - "groupId": "1GvxCAAEysxJMxrVngud3X", "content": { "richText": [ { @@ -272,7 +225,6 @@ { "id": "stM7cTBFCLhpQagRHT64K6u", "type": "text", - "groupId": "1GvxCAAEysxJMxrVngud3X", "content": { "richText": [ { @@ -289,38 +241,23 @@ { "id": "s4JATFkBxzmcqqEKQB2xFfa", "type": "choice input", - "items": [ - { - "id": "jqm8wZa5yYb73493n5s3Uc", - "type": 0, - "blockId": "s4JATFkBxzmcqqEKQB2xFfa", - "content": "Restart" - } - ], - "groupId": "1GvxCAAEysxJMxrVngud3X", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + "items": [{ "id": "jqm8wZa5yYb73493n5s3Uc", "content": "Restart" }] }, { - "id": "cl14qlt8600072e69rez236gx", - "type": "Typebot link", - "groupId": "1GvxCAAEysxJMxrVngud3X", - "options": { - "groupId": "vLUAPaxKwPF49iZhg4XZYa", - "typebotId": "current", - "mergeResults": false - } + "id": "igdnc34rcmiyamazghr8s708", + "type": "Jump", + "options": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } } - ], - "title": "Bye", - "graphCoordinates": { "x": 1177, "y": 113 } + ] }, { "id": "wncvzVDFJDvhh1M3CXJ6aL", + "title": "Email", + "graphCoordinates": { "x": 746.29, "y": 577.22 }, "blocks": [ { "id": "soiDpBL5r1dbvHxuT2Sd3mH", "type": "text", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL", "content": { "richText": [ { @@ -332,117 +269,77 @@ }, { "id": "s5Fh7zHUw3j4zDM5xjzwsXB", + "outgoingEdgeId": "cl1571xtc00042e6dcptam5jw", "type": "email input", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "t2k6cj3uYfNdJX13APA4b9", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "cl1571xtc00042e6dcptam5jw" + "variableId": "t2k6cj3uYfNdJX13APA4b9" + } } - ], - "title": "Email", - "graphCoordinates": { "x": 830, "y": 115 } + ] } ], - "variables": [ - { "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" }, - { "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" } - ], "edges": [ { "id": "2dzxChB1qm9WGfzNF91tfg", - "to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" }, - "from": { - "blockId": "bFHwV7tnY5dke8pQeFY8v6", - "groupId": "uG1tt8JdDyu2nju3oJ4wc1" - } + "from": { "eventId": "uG1tt8JdDyu2nju3oJ4wc1" }, + "to": { "groupId": "vLUAPaxKwPF49iZhg4XZYa" } }, { "id": "dhniFxrsH5r54aEE5JXwK2", - "to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" }, "from": { - "itemId": "fQ8oLDnKmDBuPDK7riJ2kt", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "fQ8oLDnKmDBuPDK7riJ2kt" + }, + "to": { "groupId": "kyK8JQ77NodUYaz3JLS88A" } }, { "id": "2C4mhU5o2Hdm7dztR9xNE9", - "to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" }, "from": { - "itemId": "h2rFDX2UnKS4Kdu3Eyuqq3", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "h2rFDX2UnKS4Kdu3Eyuqq3" + }, + "to": { "groupId": "7MuqF6nen1ZTwGB53Mz8VY" } }, { "id": "bTo6CZD1YapDDyVdvJgFDV", - "to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" }, "from": { - "itemId": "hcUFBPeQA3gSyXRprRk2v9", "blockId": "s6kp2Z4igeY3kL7B64qBdUg", - "groupId": "vLUAPaxKwPF49iZhg4XZYa" - } + "itemId": "hcUFBPeQA3gSyXRprRk2v9" + }, + "to": { "groupId": "puWCBhGWSQRbqTkVH89RCf" } }, { "id": "cl1571jhh00022e6dk77f52wg", - "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }, - "from": { - "blockId": "s3LYyyYtjdQ88jkMMV5DSW7", - "groupId": "7MuqF6nen1ZTwGB53Mz8VY" - } + "from": { "blockId": "s3LYyyYtjdQ88jkMMV5DSW7" }, + "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" } }, { "id": "cl1571ktd00032e6dyti22850", - "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" }, - "from": { - "blockId": "sjd4qACugMarB7gJC8nMhb3", - "groupId": "puWCBhGWSQRbqTkVH89RCf" - } + "from": { "blockId": "sjd4qACugMarB7gJC8nMhb3" }, + "to": { "groupId": "wncvzVDFJDvhh1M3CXJ6aL" } }, { "id": "cl1571xtc00042e6dcptam5jw", - "to": { "groupId": "1GvxCAAEysxJMxrVngud3X" }, - "from": { - "blockId": "s5Fh7zHUw3j4zDM5xjzwsXB", - "groupId": "wncvzVDFJDvhh1M3CXJ6aL" - } + "from": { "blockId": "s5Fh7zHUw3j4zDM5xjzwsXB" }, + "to": { "groupId": "1GvxCAAEysxJMxrVngud3X" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [ + { "id": "t2k6cj3uYfNdJX13APA4b9", "name": "Email" }, + { "id": "v51BcuecnB6kRU1tsttaGyR", "name": "Content" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:20:05.823Z", + "updatedAt": "2023-11-07T07:24:28.824Z", + "icon": "😍", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/digital-product-payment.json b/apps/builder/public/templates/digital-product-payment.json index 96e5d0258f..340dbcd51c 100644 --- a/apps/builder/public/templates/digital-product-payment.json +++ b/apps/builder/public/templates/digital-product-payment.json @@ -1,34 +1,23 @@ { - "id": "cl3u43chu40824z1acel3iw1c", - "version": "4", - "createdAt": "2022-05-31T12:04:12.930Z", - "updatedAt": "2022-05-31T12:31:12.867Z", - "icon": "🖼️", + "version": "6", + "id": "cloo0oket000d1aortnxzuslp", "name": "Digital Product Payment", - "folderId": null, - "groups": [ + "events": [ { "id": "cl3u43cht00044z1adg20ffni", - "blocks": [ - { - "id": "cl3u43chu00054z1abb5x7fzk", - "type": "start", - "label": "Start", - "groupId": "cl3u43cht00044z1adg20ffni", - "outgoingEdgeId": "cl3u448z200062e6gr653itny" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl3u448z200062e6gr653itny", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl3u4431400042e6go5nd0euq", - "graphCoordinates": { "x": 365, "y": 126 }, "title": "Name", + "graphCoordinates": { "x": 257.86, "y": 0.85 }, "blocks": [ { "id": "cl3u4431500052e6gruhlxklx", - "groupId": "cl3u4431400042e6go5nd0euq", "type": "text", "content": { "richText": [ @@ -38,7 +27,6 @@ }, { "id": "cl3u4592z00082e6go92cuu43", - "groupId": "cl3u4431400042e6go5nd0euq", "type": "text", "content": { "richText": [ @@ -48,28 +36,22 @@ }, { "id": "cl3u45f0n000a2e6gci2xgmph", - "groupId": "cl3u4431400042e6go5nd0euq", + "outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg", "type": "text input", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "John" - }, + "labels": { "placeholder": "Type your name..." }, "variableId": "vcl3u45hek000b2e6gkl05z1da" - }, - "outgoingEdgeId": "cl3u45j0n000c2e6go4nnaavg" + } } ] }, { "id": "cl3u45dib00092e6g4q2tdkpu", - "graphCoordinates": { "x": 705, "y": 121 }, "title": "Product demo", + "graphCoordinates": { "x": 613.7, "y": 1.82 }, "blocks": [ { "id": "cl3u45lqz000d2e6gxo4n5ets", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -82,7 +64,6 @@ }, { "id": "cl3u44adg00072e6gc13e1n12", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -99,7 +80,6 @@ }, { "id": "cl3u46b0i000e2e6gkpf4qiry", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -114,33 +94,23 @@ }, { "id": "cl3u49lmg000f2e6guhhgf825", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "video", "content": { - "type": "url", - "url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4" + "url": "https://typebot.s3.eu-west-3.amazonaws.com/assets/bullseye+template+preview.mp4", + "type": "url" } }, { "id": "cl3u4hyl9000i2e6gtdz8m04b", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ - { - "type": "p", - "children": [ - { - "text": "It's yours for $9" - } - ] - } + { "type": "p", "children": [{ "text": "It's yours for $9" }] } ] } }, { "id": "cl3u4hyl9000i2e6gtdz8m04a", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "text", "content": { "richText": [ @@ -157,23 +127,17 @@ }, { "id": "cl3u4id67000l2e6gahw4v1ny", - "groupId": "cl3u45dib00092e6g4q2tdkpu", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl3u4id67000m2e6g3x3do8kd", - "blockId": "cl3u4id67000l2e6gahw4v1ny", - "type": 0, - "content": "Hell yes!", - "outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f" + "outgoingEdgeId": "cl3u4l4do00102e6ghd9s5p3f", + "content": "Hell yes!" }, { - "blockId": "cl3u4id67000l2e6gahw4v1ny", - "type": 0, "id": "cl3u4iexy000o2e6gbagmrxcc", - "content": "I'm ok, thanks.", - "outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo" + "outgoingEdgeId": "cl3u4jxq2000v2e6gkpwko0uo", + "content": "I'm ok, thanks." } ] } @@ -181,12 +145,11 @@ }, { "id": "cl3u4iw28000s2e6gdmukl6qb", - "graphCoordinates": { "x": 897, "y": 960 }, "title": "Bye", + "graphCoordinates": { "x": 795.34, "y": 877.43 }, "blocks": [ { "id": "cl3u4iw29000t2e6gakbxvz4u", - "groupId": "cl3u4iw28000s2e6gdmukl6qb", "type": "text", "content": { "richText": [ @@ -203,7 +166,6 @@ }, { "id": "cl3u4jcyt000u2e6gzyj2p5ss", - "groupId": "cl3u4iw28000s2e6gdmukl6qb", "type": "image", "content": { "url": "https://media3.giphy.com/media/48FhEMYGWji8/giphy.gif?cid=fe3852a32dqdmhdazal2zzctxpxukjx171k0e4eflp0w36jf&rid=giphy.gif&ct=g" @@ -213,12 +175,11 @@ }, { "id": "cl3u4kblb000w2e6gfflsq56p", - "graphCoordinates": { "x": 1072, "y": 588 }, "title": "Email", + "graphCoordinates": { "x": 992.42, "y": 342.36 }, "blocks": [ { "id": "cl3u4kblb000x2e6g49rot8h0", - "groupId": "cl3u4kblb000w2e6gfflsq56p", "type": "text", "content": { "richText": [ @@ -228,7 +189,6 @@ }, { "id": "cl3u4khsx000y2e6gx9iysgt4", - "groupId": "cl3u4kblb000w2e6gfflsq56p", "type": "text", "content": { "richText": [ @@ -245,25 +205,21 @@ }, { "id": "cl3u4l2et000z2e6gjlmh45jp", - "groupId": "cl3u4kblb000w2e6gfflsq56p", + "outgoingEdgeId": "dstr8midu9f0x6ylyet7dljw", "type": "email input", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?", "variableId": "vcl3u4n1vk00162e6gs6x59o2k" - }, - "outgoingEdgeId": "cl3u4mbrj00142e6gxif5x53i" + } } ] }, { "id": "cl3u4leig00112e6gxbk65r7y", - "graphCoordinates": { "x": 1400, "y": 589 }, "title": "Payment", + "graphCoordinates": { "x": 1338.38, "y": 343.48 }, "blocks": [ { "id": "cl3u4leig00122e6gqx7skfhb", - "groupId": "cl3u4leig00112e6gxbk65r7y", "type": "text", "content": { "richText": [ @@ -273,7 +229,6 @@ }, { "id": "cl3u4llj300132e6gciw2ivyv", - "groupId": "cl3u4leig00112e6gxbk65r7y", "type": "text", "content": { "richText": [ @@ -290,30 +245,25 @@ }, { "id": "cl3u4mjq900152e6grwyg90zt", - "groupId": "cl3u4leig00112e6gxbk65r7y", + "outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int", "type": "payment input", "options": { - "provider": "Stripe", - "labels": { "button": "Pay" }, - "currency": "USD", - "amount": "9", "additionalInformation": { "name": "{{Name}}", "email": "{{Email}}" - } - }, - "outgoingEdgeId": "cl3u4wynv001b2e6g6pxc7int" + }, + "amount": "9" + } } ] }, { "id": "cl3u4vnth00182e6g2hh0gewl", - "graphCoordinates": { "x": 1731.4449652273986, "y": 586.6975439409757 }, "title": "Send email", + "graphCoordinates": { "x": 1683.86, "y": 346.93 }, "blocks": [ { "id": "cl3u4wi2d001a2e6gznp1r9d4", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "image", "content": { "url": "https://media1.giphy.com/media/s2qXK8wAvkHTO/giphy.gif?cid=fe3852a3edx7hsbquhw3lu17c422yzc6wsiplnpn02rzm2kf&rid=giphy.gif&ct=g" @@ -321,10 +271,9 @@ }, { "id": "cl3u4xcqc001c2e6g355vnigh", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "Email", "options": { - "credentialsId": "default", + "isCustomBody": true, "recipients": ["{{Email}}"], "subject": "Here is your Bullseye Framework template 🎉", "body": "Hey {{Name}},\n\nThank you again for buying the template.\n\nHere is the link where you can duplicate it:\n\nhttps://baptistearno.notion.site/Growth-Framework-Bullseye-c2166e03d99340daa1aa87e4356bdc83\n\nFeel free to tell me what I can improve.\n\nBaptiste." @@ -332,7 +281,6 @@ }, { "id": "cl3u5189q001d2e6gd1q7qshq", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [ @@ -349,7 +297,6 @@ }, { "id": "cl3u51mpe001e2e6ggrjjzxek", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [ @@ -362,104 +309,110 @@ }, { "id": "cl3u51z0o001f2e6gbl96p7bi", - "groupId": "cl3u4vnth00182e6g2hh0gewl", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Bye 👋" }] }] } } ] + }, + { + "id": "i47yu1c1pjhsqoe68kktbxgl", + "title": "", + "graphCoordinates": { "x": 1336.77, "y": 43.66 }, + "blocks": [ + { + "id": "unw1076x8ematnu6jrbop8sv", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "You need to add your Stripe credentials in the next Payment block." + } + ] + } + ] + } + }, + { + "id": "ck19ttflkp6mbxnxpnyxp7vh", + "type": "text", + "content": { + "richText": [ + { + "type": "p", + "children": [ + { + "text": "Once it's done, you can remove this group and connect the email input to the \"Payment\" group 🪄" + } + ] + } + ] + } + } + ] } ], - "variables": [ - { "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" }, - { "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" } - ], "edges": [ { - "from": { - "groupId": "cl3u43cht00044z1adg20ffni", - "blockId": "cl3u43chu00054z1abb5x7fzk" - }, - "to": { "groupId": "cl3u4431400042e6go5nd0euq" }, - "id": "cl3u448z200062e6gr653itny" + "id": "cl3u448z200062e6gr653itny", + "from": { "eventId": "cl3u43cht00044z1adg20ffni" }, + "to": { "groupId": "cl3u4431400042e6go5nd0euq" } }, { - "from": { - "groupId": "cl3u4431400042e6go5nd0euq", - "blockId": "cl3u45f0n000a2e6gci2xgmph" - }, - "to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" }, - "id": "cl3u45j0n000c2e6go4nnaavg" + "id": "cl3u45j0n000c2e6go4nnaavg", + "from": { "blockId": "cl3u45f0n000a2e6gci2xgmph" }, + "to": { "groupId": "cl3u45dib00092e6g4q2tdkpu" } }, { + "id": "cl3u4jxq2000v2e6gkpwko0uo", "from": { - "groupId": "cl3u45dib00092e6g4q2tdkpu", "blockId": "cl3u4id67000l2e6gahw4v1ny", "itemId": "cl3u4iexy000o2e6gbagmrxcc" }, - "to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" }, - "id": "cl3u4jxq2000v2e6gkpwko0uo" + "to": { "groupId": "cl3u4iw28000s2e6gdmukl6qb" } }, { + "id": "cl3u4l4do00102e6ghd9s5p3f", "from": { - "groupId": "cl3u45dib00092e6g4q2tdkpu", "blockId": "cl3u4id67000l2e6gahw4v1ny", "itemId": "cl3u4id67000m2e6g3x3do8kd" }, - "to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" }, - "id": "cl3u4l4do00102e6ghd9s5p3f" + "to": { "groupId": "cl3u4kblb000w2e6gfflsq56p" } }, { - "from": { - "groupId": "cl3u4kblb000w2e6gfflsq56p", - "blockId": "cl3u4l2et000z2e6gjlmh45jp" - }, - "to": { "groupId": "cl3u4leig00112e6gxbk65r7y" }, - "id": "cl3u4mbrj00142e6gxif5x53i" + "id": "cl3u4wynv001b2e6g6pxc7int", + "from": { "blockId": "cl3u4mjq900152e6grwyg90zt" }, + "to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" } }, { "from": { - "groupId": "cl3u4leig00112e6gxbk65r7y", - "blockId": "cl3u4mjq900152e6grwyg90zt" + "blockId": "cl3u4l2et000z2e6gjlmh45jp", + "groupId": "cl3u4kblb000w2e6gfflsq56p" }, - "to": { "groupId": "cl3u4vnth00182e6g2hh0gewl" }, - "id": "cl3u4wynv001b2e6g6pxc7int" + "to": { "groupId": "i47yu1c1pjhsqoe68kktbxgl" }, + "id": "dstr8midu9f0x6ylyet7dljw" } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [ + { "id": "vcl3u45hek000b2e6gkl05z1da", "name": "Name" }, + { "id": "vcl3u4n1vk00162e6gs6x59o2k", "name": "Email" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:35:56.501Z", + "updatedAt": "2023-11-07T07:40:03.471Z", + "icon": "🖼️", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "cl3ncues300081a1as58wmkxz" + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/dog-insurance-offer.json b/apps/builder/public/templates/dog-insurance-offer.json index 46d547681f..f9402bad1e 100644 --- a/apps/builder/public/templates/dog-insurance-offer.json +++ b/apps/builder/public/templates/dog-insurance-offer.json @@ -1,36 +1,25 @@ { - "id": "clh9fzu4b00031aotzr1ik4ba", - "version": "4", - "createdAt": "2023-05-04T18:10:07.548Z", - "updatedAt": "2023-05-04T19:13:45.356Z", - "icon": "🐶", + "version": "6", + "id": "clonzza7600031aorlgsreya0", "name": "Insurance offer", - "folderId": null, - "groups": [ + "events": [ { "id": "f4ef28wxteh0wdjgubtojnkr", - "title": "Start", - "blocks": [ - { - "id": "wj0uw1i63j4j4xe1q8xxmda0", - "type": "start", - "label": "Start", - "groupId": "f4ef28wxteh0wdjgubtojnkr", - "outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "u0009iy3sakdgh3k1x41i5yr", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "av0jzkh3qhgdyjrouvl2zywe", "title": "Welcome", + "graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 }, "blocks": [ { "id": "y0iukpry1i6h8sv22gz4ffsg", "type": "Set variable", - "groupId": "av0jzkh3qhgdyjrouvl2zywe", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "0" } @@ -40,8 +29,7 @@ "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "rhp6p4obkdehddhm6j7tqxe0", @@ -50,8 +38,7 @@ "richText": [ { "type": "p", "children": [{ "text": "I'm John from Dogz" }] } ] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "tizd6f2qo70g59lz1rnnvho7", @@ -67,8 +54,7 @@ ] } ] - }, - "groupId": "av0jzkh3qhgdyjrouvl2zywe" + } }, { "id": "dtvbio4qytr3iojc7tq2quvy", @@ -76,26 +62,17 @@ "items": [ { "id": "m7l8u4y5vmwozvdtsmhq3q49", - "type": 0, - "blockId": "dtvbio4qytr3iojc7tq2quvy", - "content": "Let's go!", - "outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3" + "outgoingEdgeId": "vl23l0ak8w2qxj9wrgxhznz3", + "content": "Let's go!" } - ], - "groupId": "av0jzkh3qhgdyjrouvl2zywe", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 68.4296875, "y": 176.178531769944 } + ] }, { "id": "dh3wz001jaclg8ifc1vhovlq", "title": "Breed", + "graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 }, "blocks": [ { "id": "mvdogpw4qucgot4yzabpxtcl", @@ -107,65 +84,27 @@ "children": [{ "text": "What breed is your dog?" }] } ] - }, - "groupId": "dh3wz001jaclg8ifc1vhovlq" + } }, { "id": "f2902yy6o00fwe5h4xihrntj", + "outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu", "type": "choice input", "items": [ - { - "id": "q7ydcwda7rsfn1w5ep9ur4y3", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Crossbreed" - }, - { - "id": "q33qu26t8uhtp63rl7th4p0u", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Labrador" - }, - { - "id": "c9fy5o23cuanywze536ie071", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Golden Retriever" - }, - { - "id": "xmozt619ao4pn3lcovs6e1wp", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Jack Russel" - }, - { - "id": "qhc245vs9s3vhq8oz9sur4jy", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Husky" - }, - { - "id": "bqt7o8aotn5wwye98vw2u8is", - "type": 0, - "blockId": "f2902yy6o00fwe5h4xihrntj", - "content": "Other" - } - ], - "groupId": "dh3wz001jaclg8ifc1vhovlq", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "moj9ezfl6bvpr4aj76cztkiu" + { "id": "q7ydcwda7rsfn1w5ep9ur4y3", "content": "Crossbreed" }, + { "id": "q33qu26t8uhtp63rl7th4p0u", "content": "Labrador" }, + { "id": "c9fy5o23cuanywze536ie071", "content": "Golden Retriever" }, + { "id": "xmozt619ao4pn3lcovs6e1wp", "content": "Jack Russel" }, + { "id": "qhc245vs9s3vhq8oz9sur4jy", "content": "Husky" }, + { "id": "bqt7o8aotn5wwye98vw2u8is", "content": "Other" } + ] } - ], - "graphCoordinates": { "x": 431.756656769944, "y": 177.60546875 } + ] }, { "id": "ynt0ya95bvuqj8mf39e938k4", "title": "Sex", + "graphCoordinates": { "x": 786.06640625, "y": 173.0310202976334 }, "blocks": [ { "id": "u4voz45sk9gh4khul8c519df", @@ -177,8 +116,7 @@ "children": [{ "text": "Is it a male or a female?" }] } ] - }, - "groupId": "ynt0ya95bvuqj8mf39e938k4" + } }, { "id": "zuza6om08ubafgqhbadwv60i", @@ -186,38 +124,26 @@ "items": [ { "id": "mrca2ini7z81ik4k1o9g3a1s", - "type": 0, - "blockId": "zuza6om08ubafgqhbadwv60i", - "content": "♂️ Male", - "outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0" + "outgoingEdgeId": "wciafstvwt3m4lhrejlgl0s0", + "content": "♂️ Male" }, { "id": "ymxxgoxxbfcmnhudwmerfgbx", - "type": 0, - "blockId": "zuza6om08ubafgqhbadwv60i", - "content": "♀️ Female", - "outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb" + "outgoingEdgeId": "f60ldz2g58kfkvsfmnf39fjb", + "content": "♀️ Female" } - ], - "groupId": "ynt0ya95bvuqj8mf39e938k4", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 786.06640625, "y": 173.03102029763343 } + ] }, { "id": "c59xwfc18i4xjpaeu9dzrjcu", "title": "", + "graphCoordinates": { "x": 1142.220231700246, "y": 145.316328962412 }, "blocks": [ { "id": "meoptkjq8tupr3qkyqkpaxqq", "type": "Set variable", - "groupId": "c59xwfc18i4xjpaeu9dzrjcu", "options": { "variableId": "vhl1s7qoksnw7r8b1soocxwsd", "expressionToEvaluate": "he" @@ -225,26 +151,24 @@ }, { "id": "kqbiaq87al2uq07vuno69syo", + "outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's his name?" }] } ] - }, - "groupId": "c59xwfc18i4xjpaeu9dzrjcu", - "outgoingEdgeId": "to4im28nzrg3yk0ama07l2oz" + } } - ], - "graphCoordinates": { "x": 1142.2202317002457, "y": 145.31632896241197 } + ] }, { "id": "qzge99trjqvp7vjmjo6rk56o", "title": "", + "graphCoordinates": { "x": 1140.34375, "y": 328.5390625 }, "blocks": [ { "id": "jyi9t11totyrw2jeohfhvfw1", "type": "Set variable", - "groupId": "qzge99trjqvp7vjmjo6rk56o", "options": { "variableId": "vhl1s7qoksnw7r8b1soocxwsd", "expressionToEvaluate": "she" @@ -252,42 +176,35 @@ }, { "id": "f9qyzjo67x7zen5q4xih3xv2", + "outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl", "type": "text", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's her name?" }] } ] - }, - "groupId": "qzge99trjqvp7vjmjo6rk56o", - "outgoingEdgeId": "c6x6fubn2qu5vvgfc6d14krl" + } } - ], - "graphCoordinates": { "x": 1140.34375, "y": 328.5390625 } + ] }, { "id": "eq1tnkdfxxf8q08vxckl3md6", "title": "Name", + "graphCoordinates": { "x": 1501.890625, "y": 169.65234375 }, "blocks": [ { "id": "kxzi32ioxwqpdy9yy0ktoavu", + "outgoingEdgeId": "g4do01p1scej1trqlbidbrw1", "type": "text input", - "groupId": "eq1tnkdfxxf8q08vxckl3md6", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vgl2m65vej3cjwqvkawnpih2l" - }, - "outgoingEdgeId": "g4do01p1scej1trqlbidbrw1" + } } - ], - "graphCoordinates": { "x": 1501.890625, "y": 169.65234375 } + ] }, { "id": "xgulc4hfxlmjmr288ghillwz", "title": "Age", + "graphCoordinates": { "x": 1846.419374527324, "y": 168.0560932773236 }, "blocks": [ { "id": "e61e41j7wdisp1yxlr78gjxs", @@ -296,8 +213,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How cute 😊" }] } ] - }, - "groupId": "xgulc4hfxlmjmr288ghillwz" + } }, { "id": "ep4iqxpgalslj0blt71rglbv", @@ -306,8 +222,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How old is {{Name}}?" }] } ] - }, - "groupId": "xgulc4hfxlmjmr288ghillwz" + } }, { "id": "y2fcko12ha5n9zjxickaakxt", @@ -315,49 +230,36 @@ "items": [ { "id": "vliolql8p4vo58pvsz7olf5w", - "type": 3, - "title": "Less than 1 year", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4", "pictureSrc": "https://images.unsplash.com/photo-1592924728350-f7d4fd5d1655?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxNXx8cHVwcHl8ZW58MHwwfHx8MTY4MzIyNDMxOA&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "pehpu3fo38ofsgh6b9dli0i4" + "title": "Less than 1 year" }, { "id": "b3ci3fpppgsu312gsl4hs6au", - "type": 3, - "title": "1-5 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "ilvu55d6cmembesg0askzgzh", "pictureSrc": "https://images.unsplash.com/photo-1672363340663-37526fffa24d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwxMHx8eW91bmclMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDM0OA&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "ilvu55d6cmembesg0askzgzh" + "title": "1-5 years" }, { "id": "asi8dmhlwnysvm4tmvoipglz", - "type": 3, - "title": "5-10 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8", "pictureSrc": "https://images.unsplash.com/photo-1587300003388-59208cc962cb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHwzfHxkb2d8ZW58MHwwfHx8MTY4MzIyNDEwNg&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "kvlz0ly8o4h99997ijiejwe8" + "title": "5-10 years" }, { "id": "w9eeiclycv7nm0ennaxbxo1d", - "type": 3, - "title": "Above 10 years", - "blockId": "y2fcko12ha5n9zjxickaakxt", + "outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr", "pictureSrc": "https://images.unsplash.com/photo-1553531009-7e4b807a0673?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=Mnw0MjU2MDR8MHwxfHNlYXJjaHw4fHxvbGQlMjBkb2d8ZW58MHwwfHx8MTY4MzIyNDQxNw&ixlib=rb-4.0.3&q=80&w=1080", - "outgoingEdgeId": "y8v7vkh236e4o4f2latpb7mr" + "title": "Above 10 years" } - ], - "groupId": "xgulc4hfxlmjmr288ghillwz", - "options": { - "buttonLabel": "Send", - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 1846.4193745273237, "y": 168.05609327732364 } + ] }, { "id": "s4cccw69brg5ipyakvsoaioo", "title": "Spayed", + "graphCoordinates": { "x": 2535.586058093481, "y": 164.2060504876776 }, "blocks": [ { "id": "zw0mfpqem8eib75qs5brnfnu", @@ -369,8 +271,7 @@ "children": [{ "text": "Is {{Pronoun}} spayed or neutered" }] } ] - }, - "groupId": "s4cccw69brg5ipyakvsoaioo" + } }, { "id": "w8l8qekmkjwdct0f73f64yke", @@ -378,33 +279,22 @@ "items": [ { "id": "njc0kol8iicj5xo06gezhl52", - "type": 0, - "blockId": "w8l8qekmkjwdct0f73f64yke", - "content": "❌ No", - "outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1" + "outgoingEdgeId": "bindxs5p6lbkszkuw7rhpvh1", + "content": "❌ No" }, { "id": "jp5k0mx1drijt7k1v4a2z6t8", - "type": 0, - "blockId": "w8l8qekmkjwdct0f73f64yke", - "content": "✅ Yes", - "outgoingEdgeId": "igwjs895n7q48h47xhpc90wc" + "outgoingEdgeId": "igwjs895n7q48h47xhpc90wc", + "content": "✅ Yes" } - ], - "groupId": "s4cccw69brg5ipyakvsoaioo", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - } + ] } - ], - "graphCoordinates": { "x": 2535.5860580934814, "y": 164.20605048767763 } + ] }, { "id": "j19dlmdh2ojntwk1lzqemo7a", "title": "Email", + "graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 }, "blocks": [ { "id": "os3ecqb05r4todaekg0206t4", @@ -416,8 +306,7 @@ "children": [{ "text": "Thank you for all this information." }] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "v5sxfs35u83hqfsh9970flj7", @@ -433,8 +322,7 @@ ] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "sutyhv073mi6p80115jyu8s4", @@ -448,116 +336,102 @@ ] } ] - }, - "groupId": "j19dlmdh2ojntwk1lzqemo7a" + } }, { "id": "ouu081yxvf9raf522k08vr6g", + "outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12", "type": "email input", - "groupId": "j19dlmdh2ojntwk1lzqemo7a", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "vzhkagzjqqa0amfc78jekl2gz", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "bw2ddpla0a4qggv8b7et3m12" + "variableId": "vzhkagzjqqa0amfc78jekl2gz" + } } - ], - "graphCoordinates": { "x": 2989.53096827949, "y": 367.6582890794456 } + ] }, { "id": "rly6ojrxf1oo4augnflhj0kj", "title": "", + "graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 }, "blocks": [ { "id": "cubvtqhhgvf6k9597von95bt", + "outgoingEdgeId": "wtbthu0nu61a6qijaranccfw", "type": "Set variable", - "groupId": "rly6ojrxf1oo4augnflhj0kj", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 5" - }, - "outgoingEdgeId": "wtbthu0nu61a6qijaranccfw" + } } - ], - "graphCoordinates": { "x": 2186.904241629908, "y": 387.2160670995469 } + ] }, { "id": "ggiqdlnnh0urjn8r5d0wip5u", "title": "", + "graphCoordinates": { "x": 2892.884331508873, "y": 193.3583588107446 }, "blocks": [ { "id": "ww4zmawu2jbvrykqwqq7fnh5", + "outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu", "type": "Set variable", - "groupId": "ggiqdlnnh0urjn8r5d0wip5u", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 20" - }, - "outgoingEdgeId": "kuh8vfaq0nazrtpkif9pzrpu" + } } - ], - "graphCoordinates": { "x": 2892.8843315088734, "y": 193.35835881074462 } + ] }, { "id": "trjrsr2xpg0idmldl9pwcqry", "title": "", + "graphCoordinates": { "x": 2187.765700621067, "y": 522.8303147750385 }, "blocks": [ { "id": "gdujudl5bf90oayj6z96ghv8", + "outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8", "type": "Set variable", - "groupId": "trjrsr2xpg0idmldl9pwcqry", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 10" - }, - "outgoingEdgeId": "dvaakgyx7rteqs23qxz8uqx8" + } } - ], - "graphCoordinates": { "x": 2187.7657006210675, "y": 522.8303147750385 } + ] }, { "id": "ykjr48s18zp8a0tiwik18mum", "title": "", + "graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 }, "blocks": [ { "id": "sevhy7y6pkbss80rph5blunn", + "outgoingEdgeId": "opipj5xi262umvn98kkga4tx", "type": "Set variable", - "groupId": "ykjr48s18zp8a0tiwik18mum", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 25" - }, - "outgoingEdgeId": "opipj5xi262umvn98kkga4tx" + } } - ], - "graphCoordinates": { "x": 2187.927544552159, "y": 661.0263366270658 } + ] }, { "id": "c1x4umwx2g4j39peylr9rfor", "title": "", + "graphCoordinates": { "x": 2189.67995427391, "y": 796.4435670811636 }, "blocks": [ { "id": "bw9d73ypbvc83ltqme9kwwzc", + "outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b", "type": "Set variable", - "groupId": "c1x4umwx2g4j39peylr9rfor", "options": { - "isCode": true, "variableId": "vq61f8ykwadq1pj8389qf9h91", "expressionToEvaluate": "{{Estimated price}} + 55" - }, - "outgoingEdgeId": "ozsoiu70hbqp5pqucstlnh3b" + } } - ], - "graphCoordinates": { "x": 2189.6799542739104, "y": 796.4435670811636 } + ] }, { "id": "lmrd5falh8nkdizqy9obpeqi", "title": "Bye", + "graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 }, "blocks": [ { "id": "ddpum0cjrd2bredvakte914k", @@ -566,8 +440,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Perfect 👌" }] } ] - }, - "groupId": "lmrd5falh8nkdizqy9obpeqi" + } }, { "id": "qabtk59h81p0fv14au584ay8", @@ -583,226 +456,158 @@ ] } ] - }, - "groupId": "lmrd5falh8nkdizqy9obpeqi" + } } - ], - "graphCoordinates": { "x": 3340.474508360785, "y": 365.6627012838016 } + ] } ], - "variables": [ - { "id": "vgl2m65vej3cjwqvkawnpih2l", "name": "Name" }, - { "id": "vhl1s7qoksnw7r8b1soocxwsd", "name": "Pronoun" }, - { "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" }, - { "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" } - ], "edges": [ { "id": "u0009iy3sakdgh3k1x41i5yr", - "to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" }, - "from": { - "blockId": "wj0uw1i63j4j4xe1q8xxmda0", - "groupId": "f4ef28wxteh0wdjgubtojnkr" - } + "from": { "eventId": "f4ef28wxteh0wdjgubtojnkr" }, + "to": { "groupId": "av0jzkh3qhgdyjrouvl2zywe" } }, { "id": "vl23l0ak8w2qxj9wrgxhznz3", - "to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" }, "from": { - "itemId": "m7l8u4y5vmwozvdtsmhq3q49", "blockId": "dtvbio4qytr3iojc7tq2quvy", - "groupId": "av0jzkh3qhgdyjrouvl2zywe" - } + "itemId": "m7l8u4y5vmwozvdtsmhq3q49" + }, + "to": { "groupId": "dh3wz001jaclg8ifc1vhovlq" } }, { "id": "moj9ezfl6bvpr4aj76cztkiu", - "to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" }, - "from": { - "blockId": "f2902yy6o00fwe5h4xihrntj", - "groupId": "dh3wz001jaclg8ifc1vhovlq" - } + "from": { "blockId": "f2902yy6o00fwe5h4xihrntj" }, + "to": { "groupId": "ynt0ya95bvuqj8mf39e938k4" } }, { "id": "wciafstvwt3m4lhrejlgl0s0", - "to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" }, "from": { - "itemId": "mrca2ini7z81ik4k1o9g3a1s", "blockId": "zuza6om08ubafgqhbadwv60i", - "groupId": "ynt0ya95bvuqj8mf39e938k4" - } + "itemId": "mrca2ini7z81ik4k1o9g3a1s" + }, + "to": { "groupId": "c59xwfc18i4xjpaeu9dzrjcu" } }, { "id": "f60ldz2g58kfkvsfmnf39fjb", - "to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" }, "from": { - "itemId": "ymxxgoxxbfcmnhudwmerfgbx", "blockId": "zuza6om08ubafgqhbadwv60i", - "groupId": "ynt0ya95bvuqj8mf39e938k4" - } + "itemId": "ymxxgoxxbfcmnhudwmerfgbx" + }, + "to": { "groupId": "qzge99trjqvp7vjmjo6rk56o" } }, { "id": "to4im28nzrg3yk0ama07l2oz", - "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }, - "from": { - "blockId": "kqbiaq87al2uq07vuno69syo", - "groupId": "c59xwfc18i4xjpaeu9dzrjcu" - } + "from": { "blockId": "kqbiaq87al2uq07vuno69syo" }, + "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" } }, { "id": "c6x6fubn2qu5vvgfc6d14krl", - "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" }, - "from": { - "blockId": "f9qyzjo67x7zen5q4xih3xv2", - "groupId": "qzge99trjqvp7vjmjo6rk56o" - } + "from": { "blockId": "f9qyzjo67x7zen5q4xih3xv2" }, + "to": { "groupId": "eq1tnkdfxxf8q08vxckl3md6" } }, { "id": "g4do01p1scej1trqlbidbrw1", - "to": { "groupId": "xgulc4hfxlmjmr288ghillwz" }, - "from": { - "blockId": "kxzi32ioxwqpdy9yy0ktoavu", - "groupId": "eq1tnkdfxxf8q08vxckl3md6" - } + "from": { "blockId": "kxzi32ioxwqpdy9yy0ktoavu" }, + "to": { "groupId": "xgulc4hfxlmjmr288ghillwz" } }, { "id": "pehpu3fo38ofsgh6b9dli0i4", - "to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" }, "from": { - "itemId": "vliolql8p4vo58pvsz7olf5w", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "vliolql8p4vo58pvsz7olf5w" + }, + "to": { "groupId": "rly6ojrxf1oo4augnflhj0kj" } }, { "id": "ilvu55d6cmembesg0askzgzh", - "to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" }, "from": { - "itemId": "b3ci3fpppgsu312gsl4hs6au", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "b3ci3fpppgsu312gsl4hs6au" + }, + "to": { "groupId": "trjrsr2xpg0idmldl9pwcqry" } }, { "id": "kvlz0ly8o4h99997ijiejwe8", - "to": { "groupId": "ykjr48s18zp8a0tiwik18mum" }, "from": { - "itemId": "asi8dmhlwnysvm4tmvoipglz", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "asi8dmhlwnysvm4tmvoipglz" + }, + "to": { "groupId": "ykjr48s18zp8a0tiwik18mum" } }, { "id": "y8v7vkh236e4o4f2latpb7mr", - "to": { "groupId": "c1x4umwx2g4j39peylr9rfor" }, "from": { - "itemId": "w9eeiclycv7nm0ennaxbxo1d", "blockId": "y2fcko12ha5n9zjxickaakxt", - "groupId": "xgulc4hfxlmjmr288ghillwz" - } + "itemId": "w9eeiclycv7nm0ennaxbxo1d" + }, + "to": { "groupId": "c1x4umwx2g4j39peylr9rfor" } }, { "id": "wtbthu0nu61a6qijaranccfw", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "cubvtqhhgvf6k9597von95bt", - "groupId": "rly6ojrxf1oo4augnflhj0kj" - } + "from": { "blockId": "cubvtqhhgvf6k9597von95bt" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "dvaakgyx7rteqs23qxz8uqx8", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "gdujudl5bf90oayj6z96ghv8", - "groupId": "trjrsr2xpg0idmldl9pwcqry" - } + "from": { "blockId": "gdujudl5bf90oayj6z96ghv8" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "opipj5xi262umvn98kkga4tx", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "sevhy7y6pkbss80rph5blunn", - "groupId": "ykjr48s18zp8a0tiwik18mum" - } + "from": { "blockId": "sevhy7y6pkbss80rph5blunn" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "ozsoiu70hbqp5pqucstlnh3b", - "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" }, - "from": { - "blockId": "bw9d73ypbvc83ltqme9kwwzc", - "groupId": "c1x4umwx2g4j39peylr9rfor" - } + "from": { "blockId": "bw9d73ypbvc83ltqme9kwwzc" }, + "to": { "groupId": "s4cccw69brg5ipyakvsoaioo" } }, { "id": "bindxs5p6lbkszkuw7rhpvh1", - "to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" }, "from": { - "itemId": "njc0kol8iicj5xo06gezhl52", "blockId": "w8l8qekmkjwdct0f73f64yke", - "groupId": "s4cccw69brg5ipyakvsoaioo" - } + "itemId": "njc0kol8iicj5xo06gezhl52" + }, + "to": { "groupId": "ggiqdlnnh0urjn8r5d0wip5u" } }, { "id": "igwjs895n7q48h47xhpc90wc", - "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }, "from": { - "itemId": "jp5k0mx1drijt7k1v4a2z6t8", "blockId": "w8l8qekmkjwdct0f73f64yke", - "groupId": "s4cccw69brg5ipyakvsoaioo" - } + "itemId": "jp5k0mx1drijt7k1v4a2z6t8" + }, + "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" } }, { "id": "kuh8vfaq0nazrtpkif9pzrpu", - "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" }, - "from": { - "blockId": "ww4zmawu2jbvrykqwqq7fnh5", - "groupId": "ggiqdlnnh0urjn8r5d0wip5u" - } + "from": { "blockId": "ww4zmawu2jbvrykqwqq7fnh5" }, + "to": { "groupId": "j19dlmdh2ojntwk1lzqemo7a" } }, { "id": "bw2ddpla0a4qggv8b7et3m12", - "to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" }, - "from": { - "blockId": "ouu081yxvf9raf522k08vr6g", - "groupId": "j19dlmdh2ojntwk1lzqemo7a" - } + "from": { "blockId": "ouu081yxvf9raf522k08vr6g" }, + "to": { "groupId": "lmrd5falh8nkdizqy9obpeqi" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, + "variables": [ + { "id": "vgl2m65vej3cjwqvkawnpih2l", "name": "Name" }, + { "id": "vhl1s7qoksnw7r8b1soocxwsd", "name": "Pronoun" }, + { "id": "vq61f8ykwadq1pj8389qf9h91", "name": "Estimated price" }, + { "id": "vzhkagzjqqa0amfc78jekl2gz", "name": "Email" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": true, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "settings": {}, + "createdAt": "2023-11-07T07:16:16.866Z", + "updatedAt": "2023-11-07T07:16:16.866Z", + "icon": "🐶", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/faq.json b/apps/builder/public/templates/faq.json index 7c904a86a8..f9b320bbe9 100644 --- a/apps/builder/public/templates/faq.json +++ b/apps/builder/public/templates/faq.json @@ -1,34 +1,23 @@ { - "id": "cl96ns7zc000dky099ku4bmav", - "version": "4", - "createdAt": "2022-10-13T06:07:11.976Z", - "updatedAt": "2022-10-13T06:27:31.951Z", - "icon": "💬", + "version": "6", + "id": "cloo0iymj000b1aoraoto4iom", "name": "FAQ", - "folderId": null, - "groups": [ + "events": [ { "id": "cl96ns7za000309kyewk56s22", - "title": "Start", - "blocks": [ - { - "id": "cl96ns7za000409kydoui7mpu", - "type": "start", - "label": "Start", - "groupId": "cl96ns7za000309kyewk56s22", - "outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl96nv0ij00093b6id4t83dvu", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl96ns9qr00043b6ii07bo25o", - "graphCoordinates": { "x": 392, "y": 181 }, "title": "Menu", + "graphCoordinates": { "x": 385.68, "y": 86.92 }, "blocks": [ { "id": "cl96ns9qr00053b6igebgtl5q", - "groupId": "cl96ns9qr00043b6ii07bo25o", "type": "text", "content": { "richText": [ @@ -45,37 +34,27 @@ }, { "id": "cl96nv877000b3b6i7p69ss2o", - "groupId": "cl96ns9qr00043b6ii07bo25o", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl96nv877000c3b6idyepv694", - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, - "content": "What's Analyzr?", - "outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj" + "outgoingEdgeId": "cl96o2u6h000t3b6izmh4pguj", + "content": "What's Analyzr?" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96nvcwi000d3b6ipyfzcyaw", - "content": "Can I use your tool for free?", - "outgoingEdgeId": "cl96o6hxh00173b6ix83nn581" + "outgoingEdgeId": "cl96o6hxh00173b6ix83nn581", + "content": "Can I use your tool for free?" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96obwgy001k3b6ir1a8qk5w", - "content": "Tell me about the company", - "outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp" + "outgoingEdgeId": "cl96ofn4s001q3b6i482xx6jp", + "content": "Tell me about the company" }, { - "blockId": "cl96nv877000b3b6i7p69ss2o", - "type": 0, "id": "cl96nvstv000e3b6itm8cj1s5", - "content": "I have another question", - "outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq" + "outgoingEdgeId": "cl96ogaa0001x3b6izae2alxq", + "content": "I have another question" } ] } @@ -83,12 +62,11 @@ }, { "id": "cl96nt9ob00063b6ii2pktlxq", - "graphCoordinates": { "x": 26.51592874499341, "y": 202.71976248331134 }, "title": "Welcom", + "graphCoordinates": { "x": 43.5, "y": 89.92 }, "blocks": [ { "id": "cl96nt9ob00073b6ionlvakha", - "groupId": "cl96nt9ob00063b6ii2pktlxq", "type": "text", "content": { "richText": [ @@ -98,7 +76,7 @@ }, { "id": "cl96ntraa00083b6ij922v2qh", - "groupId": "cl96nt9ob00063b6ii2pktlxq", + "outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt", "type": "text", "content": { "richText": [ @@ -111,19 +89,17 @@ ] } ] - }, - "outgoingEdgeId": "cl96nv51s000a3b6i3wmlcmdt" + } } ] }, { "id": "cl96o2cgi000r3b6iljr1iwdl", - "graphCoordinates": { "x": 787, "y": -534 }, "title": "What's Analyzr", + "graphCoordinates": { "x": 774.53, "y": -513.14 }, "blocks": [ { "id": "cl96o2cgi000s3b6ikdv6iogz", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "text", "content": { "richText": [ @@ -140,7 +116,6 @@ }, { "id": "cl96o3260000u3b6i9czqm52g", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "text", "content": { "richText": [ @@ -156,29 +131,28 @@ }, { "id": "cl96o55z3000x3b6ikq14g2tu", - "groupId": "cl96o2cgi000r3b6iljr1iwdl", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ - { - "id": "cl96o55z3000y3b6idpn54byw", - "blockId": "cl96o55z3000x3b6ikq14g2tu", - "type": 0, - "content": "Sounds good!", - "outgoingEdgeId": "cl96o5k4n00103b6irh2dfp2r" - } + { "id": "cl96o55z3000y3b6idpn54byw", "content": "Sounds good!" } ] + }, + { + "id": "qrg1xtxxbmyo8a6mztma3dvr", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } } ] }, { "id": "cl96o6a2700123b6ie4efb6bb", - "graphCoordinates": { "x": 803.5720553542924, "y": 7.420010744791735 }, "title": "Use for free", + "graphCoordinates": { "x": 775.05, "y": 7.42 }, "blocks": [ { "id": "cl96o6a2700133b6ii5n027h2", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "You can!" }] }] @@ -186,7 +160,6 @@ }, { "id": "cl96o6a2700143b6ija9jqhky", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "text", "content": { "richText": [ @@ -203,23 +176,17 @@ }, { "id": "cl96o6a2700153b6il1wj2aev", - "groupId": "cl96o6a2700123b6ie4efb6bb", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl96o6a2700163b6i818ywnqv", - "blockId": "cl96o6a2700153b6il1wj2aev", - "type": 0, - "content": "Awesome!", - "outgoingEdgeId": "cl96oa6kn001g3b6iaormwu2j" + "outgoingEdgeId": "n4rgj2fmqrmnkvo9m9ebzak7", + "content": "Awesome!" }, { - "blockId": "cl96o6a2700153b6il1wj2aev", - "type": 0, "id": "cl96o83lo00183b6igen42ivq", - "content": "What's an event?", - "outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx" + "outgoingEdgeId": "cl96oa83f001h3b6i81wodnjx", + "content": "What's an event?" } ] } @@ -227,12 +194,11 @@ }, { "id": "cl96o8eym001a3b6i3lxh7kw0", - "graphCoordinates": { "x": 1179.4933795363515, "y": 7.7432256889634 }, "title": "User event", + "graphCoordinates": { "x": 1158.01, "y": 322.44 }, "blocks": [ { "id": "cl96o8eyn001b3b6icmbgg7lw", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "text", "content": { "richText": [ @@ -247,7 +213,6 @@ }, { "id": "cl96o990s001c3b6ie2jjefhf", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "text", "content": { "richText": [ @@ -264,38 +229,28 @@ }, { "id": "cl96o9xba001d3b6i9004l33e", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ - { - "id": "cl96o9xbd001e3b6i6ag5ooo7", - "blockId": "cl96o9xba001d3b6i9004l33e", - "type": 0, - "content": "Ok, got it!" - } + { "id": "cl96o9xbd001e3b6i6ag5ooo7", "content": "Ok, got it!" } ] }, { - "id": "cl96oaa8n001j3b6ieqe5r775", - "groupId": "cl96o8eym001a3b6i3lxh7kw0", - "type": "Typebot link", + "id": "bkmgmgxa96k5261su12hv58k", + "type": "Jump", "options": { - "typebotId": "current", "groupId": "cl96ns9qr00043b6ii07bo25o", - "mergeResults": false + "blockId": "cl96nv877000b3b6i7p69ss2o" } } ] }, { "id": "cl96oc274001m3b6ig3beli9v", - "graphCoordinates": { "x": 802.8616130197884, "y": 477.1611550243932 }, "title": "Company", + "graphCoordinates": { "x": 772.59, "y": 432 }, "blocks": [ { "id": "cl96ods3i001o3b6iiyboljuf", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -310,7 +265,6 @@ }, { "id": "cl96oc277001n3b6if8wv6hzl", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -323,7 +277,6 @@ }, { "id": "cl96oenlh001p3b6iutaiw9wl", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "text", "content": { "richText": [ @@ -340,29 +293,26 @@ }, { "id": "cl96oftnv001r3b6ixen8g0bv", - "groupId": "cl96oc274001m3b6ig3beli9v", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "items": [ - { - "id": "cl96oftnv001s3b6i7kjyq7me", - "blockId": "cl96oftnv001r3b6ixen8g0bv", - "type": 0, - "content": "Cool!", - "outgoingEdgeId": "cl96ofyy3001u3b6iro2dkp0w" - } - ] + "items": [{ "id": "cl96oftnv001s3b6i7kjyq7me", "content": "Cool!" }] + }, + { + "id": "js5pbqj76g67yvs6wz99rcbm", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } } ] }, { "id": "cl96og2yr001v3b6ivhzb1x34", - "graphCoordinates": { "x": 798.1737080264639, "y": 1045.5696354649942 }, "title": "Question", + "graphCoordinates": { "x": 773.69, "y": 1020.26 }, "blocks": [ { "id": "cl96og2yu001w3b6ijqgstubu", - "groupId": "cl96og2yr001v3b6ivhzb1x34", "type": "text", "content": { "richText": [ @@ -372,27 +322,24 @@ }, { "id": "cl96ogmjx001y3b6iwfosloet", - "groupId": "cl96og2yr001v3b6ivhzb1x34", + "outgoingEdgeId": "cl96ohn9900213b6ibex8g6my", "type": "text input", "options": { - "isLong": true, "labels": { - "button": "Send", "placeholder": "Type your question..." - } - }, - "outgoingEdgeId": "cl96ohn9900213b6ibex8g6my" + }, + "isLong": true + } } ] }, { "id": "cl96oh3mn001z3b6i2b0no81w", - "graphCoordinates": { "x": 1174.378083740756, "y": 1049.0855642099898 }, "title": "Bye", + "graphCoordinates": { "x": 1174.378083740756, "y": 1049.08556420999 }, "blocks": [ { "id": "cl96oh3mn00203b6iahw2x1ns", - "groupId": "cl96oh3mn001z3b6i2b0no81w", "type": "text", "content": { "richText": [ @@ -408,143 +355,101 @@ } } ] + }, + { + "id": "pqldfrkh43ncm39lzyeartv3", + "title": "", + "graphCoordinates": { "x": 1151.09, "y": 194.39 }, + "blocks": [ + { + "id": "ifaxemnkm6ikjfv2ozzeg1o3", + "type": "Jump", + "options": { + "groupId": "cl96ns9qr00043b6ii07bo25o", + "blockId": "cl96nv877000b3b6i7p69ss2o" + } + } + ] } ], - "variables": [], "edges": [ { - "from": { - "groupId": "cl96ns7za000309kyewk56s22", - "blockId": "cl96ns7za000409kydoui7mpu" - }, - "to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" }, - "id": "cl96nv0ij00093b6id4t83dvu" + "id": "cl96nv0ij00093b6id4t83dvu", + "from": { "eventId": "cl96ns7za000309kyewk56s22" }, + "to": { "groupId": "cl96nt9ob00063b6ii2pktlxq" } }, { - "from": { - "groupId": "cl96nt9ob00063b6ii2pktlxq", - "blockId": "cl96ntraa00083b6ij922v2qh" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96nv51s000a3b6i3wmlcmdt" + "id": "cl96nv51s000a3b6i3wmlcmdt", + "from": { "blockId": "cl96ntraa00083b6ij922v2qh" }, + "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" } }, { + "id": "cl96o2u6h000t3b6izmh4pguj", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nv877000c3b6idyepv694" }, - "to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" }, - "id": "cl96o2u6h000t3b6izmh4pguj" + "to": { "groupId": "cl96o2cgi000r3b6iljr1iwdl" } }, { + "id": "cl96o6hxh00173b6ix83nn581", "from": { - "groupId": "cl96o2cgi000r3b6iljr1iwdl", - "blockId": "cl96o55z3000x3b6ikq14g2tu", - "itemId": "cl96o55z3000y3b6idpn54byw" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96o5k4n00103b6irh2dfp2r" - }, - { - "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nvcwi000d3b6ipyfzcyaw" }, - "to": { "groupId": "cl96o6a2700123b6ie4efb6bb" }, - "id": "cl96o6hxh00173b6ix83nn581" - }, - { - "from": { - "groupId": "cl96o6a2700123b6ie4efb6bb", - "blockId": "cl96o6a2700153b6il1wj2aev", - "itemId": "cl96o6a2700163b6i818ywnqv" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96oa6kn001g3b6iaormwu2j" + "to": { "groupId": "cl96o6a2700123b6ie4efb6bb" } }, { + "id": "cl96oa83f001h3b6i81wodnjx", "from": { - "groupId": "cl96o6a2700123b6ie4efb6bb", "blockId": "cl96o6a2700153b6il1wj2aev", "itemId": "cl96o83lo00183b6igen42ivq" }, - "to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" }, - "id": "cl96oa83f001h3b6i81wodnjx" + "to": { "groupId": "cl96o8eym001a3b6i3lxh7kw0" } }, { + "id": "cl96ofn4s001q3b6i482xx6jp", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96obwgy001k3b6ir1a8qk5w" }, - "to": { "groupId": "cl96oc274001m3b6ig3beli9v" }, - "id": "cl96ofn4s001q3b6i482xx6jp" - }, - { - "from": { - "groupId": "cl96oc274001m3b6ig3beli9v", - "blockId": "cl96oftnv001r3b6ixen8g0bv", - "itemId": "cl96oftnv001s3b6i7kjyq7me" - }, - "to": { "groupId": "cl96ns9qr00043b6ii07bo25o" }, - "id": "cl96ofyy3001u3b6iro2dkp0w" + "to": { "groupId": "cl96oc274001m3b6ig3beli9v" } }, { + "id": "cl96ogaa0001x3b6izae2alxq", "from": { - "groupId": "cl96ns9qr00043b6ii07bo25o", "blockId": "cl96nv877000b3b6i7p69ss2o", "itemId": "cl96nvstv000e3b6itm8cj1s5" }, - "to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" }, - "id": "cl96ogaa0001x3b6izae2alxq" + "to": { "groupId": "cl96og2yr001v3b6ivhzb1x34" } }, { + "id": "cl96ohn9900213b6ibex8g6my", + "from": { "blockId": "cl96ogmjx001y3b6iwfosloet" }, + "to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" } + }, + { + "id": "n4rgj2fmqrmnkvo9m9ebzak7", "from": { - "groupId": "cl96og2yr001v3b6ivhzb1x34", - "blockId": "cl96ogmjx001y3b6iwfosloet" + "blockId": "cl96o6a2700153b6il1wj2aev", + "itemId": "cl96o6a2700163b6i818ywnqv" }, - "to": { "groupId": "cl96oh3mn001z3b6i2b0no81w" }, - "id": "cl96ohn9900213b6ibex8g6my" + "to": { "groupId": "pqldfrkh43ncm39lzyeartv3" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:31:34.987Z", + "updatedAt": "2023-11-07T07:34:11.360Z", + "icon": "💬", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "cl35yesle00188gcpgqu70ia1", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-gen-ai.json b/apps/builder/public/templates/lead-gen-ai.json index eab3ed48a0..e89480c3ed 100644 --- a/apps/builder/public/templates/lead-gen-ai.json +++ b/apps/builder/public/templates/lead-gen-ai.json @@ -1,45 +1,34 @@ { - "id": "pjkxzxkujkbk2oml3d35w6zz", - "version": "4", - "createdAt": "2023-04-20T12:29:18.633Z", - "updatedAt": "2023-04-20T12:50:12.385Z", - "icon": "🦾", + "version": "6", + "id": "clon6cteb000i1avnrdaj92au", "name": "Lead Gen with AI", - "folderId": null, - "groups": [ + "events": [ { "id": "i6xofskq0vdlnfyvf28hzcle", - "title": "Start", - "blocks": [ - { - "id": "22HP69iipkLjJDTUcc1AWW", - "type": "start", - "label": "Start", - "groupId": "i6xofskq0vdlnfyvf28hzcle", - "outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "dkgy7qanybx0d9zl2ke2aa03", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "nmlij3lrk42cymsu1tj6b9nv", "title": "Welcome", + "graphCoordinates": { "x": 1, "y": 148 }, "blocks": [ { "id": "sc1y8VwDabNJgiVTBi4qtif", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey 👋" }] }] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "s7YqZTBeyCa4Hp3wN2j922c", "type": "image", "content": { "url": "https://media0.giphy.com/media/2f7RQiiWMJc40/giphy.gif?cid=fe3852a34jqk83z51tbm8a1jxmqpuckxxwef79p5myafdlw5&rid=giphy.gif&ct=g" - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "z5tydv4qcam6xnh1ehm8hask", @@ -55,8 +44,7 @@ ] } ] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "ygo5cubnk50m5jt6ull3bn0i", @@ -72,38 +60,27 @@ ] } ] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "vw9s76hgwu749gw15bqk4vd3", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Ready?" }] }] - }, - "groupId": "nmlij3lrk42cymsu1tj6b9nv" + } }, { "id": "sbjZWLJGVkHAkDqS4JQeGow", + "outgoingEdgeId": "vgi4r3yjle17balwlhpas25t", "type": "choice input", - "items": [ - { - "id": "hQw2zbp7FDX7XYK9cFpbgC", - "type": 0, - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "content": "Yes!" - } - ], - "groupId": "nmlij3lrk42cymsu1tj6b9nv", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "vgi4r3yjle17balwlhpas25t" + "items": [{ "id": "hQw2zbp7FDX7XYK9cFpbgC", "content": "Yes!" }] } - ], - "graphCoordinates": { "x": 1, "y": 148 } + ] }, { "id": "vrv6xoriyl74wcz34gqlvc0q", "title": "Email", + "graphCoordinates": { "x": 666.07421875, "y": 141 }, "blocks": [ { "id": "scQ5kduafAtfP9T8SHUJnGi", @@ -117,26 +94,22 @@ ] } ] - }, - "groupId": "vrv6xoriyl74wcz34gqlvc0q" + } }, { "id": "snbsad18Bgry8yZ8DZCfdFD", + "outgoingEdgeId": "piew4sf9dpafiweghqvucmax", "type": "email input", - "groupId": "vrv6xoriyl74wcz34gqlvc0q", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "piew4sf9dpafiweghqvucmax" + "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah" + } } - ], - "graphCoordinates": { "x": 666.07421875, "y": 141 } + ] }, { "id": "wlcaalj5zej2sl1t9kkq55se", "title": "Company", + "graphCoordinates": { "x": 325.22265625, "y": 144.37890625 }, "blocks": [ { "id": "sgtE2Sy7cKykac9B223Kq9R", @@ -148,29 +121,26 @@ "children": [{ "text": "What company do you work for?" }] } ] - }, - "groupId": "wlcaalj5zej2sl1t9kkq55se" + } }, { "id": "sqEsMo747LTDnY9FjQcEwUv", + "outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517", "type": "text input", - "groupId": "wlcaalj5zej2sl1t9kkq55se", "options": { - "isLong": false, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "giiLFGw5xXBCHzvp1qAbdX" - }, - "outgoingEdgeId": "wlzesf38jzeyf65i1aj6j517" + } } - ], - "graphCoordinates": { "x": 325.22265625, "y": 144.37890625 } + ] }, { "id": "trcslng32mdxkjmrw8zxpnpj", "title": "Services", + "graphCoordinates": { "x": 999.90625, "y": 143.7578125 }, "blocks": [ { "id": "su7HceVXWyTCzi2vv3m4QbK", @@ -182,52 +152,29 @@ "children": [{ "text": "What services are you interested in?" }] } ] - }, - "groupId": "trcslng32mdxkjmrw8zxpnpj" + } }, { "id": "s5VQGsVF4hQgziQsXVdwPDW", + "outgoingEdgeId": "wtw2lm86g46ehgvp43fcfks6", "type": "choice input", "items": [ - { - "id": "fnLCBF4NdraSwcubnBhk8H", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "content": "Website dev" - }, - { - "id": "a782h8ynMouY84QjH7XSnR", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "content": "Content Marketing" - }, - { - "id": "jGvh94zBByvVFpSS3w97zY", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "content": "Social Media" - }, - { - "id": "6PRLbKUezuFmwWtLVbvAQ7", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "content": "UI / UX Design" - } + { "id": "fnLCBF4NdraSwcubnBhk8H", "content": "Website dev" }, + { "id": "a782h8ynMouY84QjH7XSnR", "content": "Content Marketing" }, + { "id": "jGvh94zBByvVFpSS3w97zY", "content": "Social Media" }, + { "id": "6PRLbKUezuFmwWtLVbvAQ7", "content": "UI / UX Design" } ], - "groupId": "trcslng32mdxkjmrw8zxpnpj", "options": { "variableId": "vi0mmx9o2m4s8z9cccsjcvpj5", - "buttonLabel": "Send", "isMultipleChoice": true - }, - "outgoingEdgeId": "gcbys1rzwi0dscvjodyygfme" + } } - ], - "graphCoordinates": { "x": 999.90625, "y": 143.7578125 } + ] }, { "id": "m4oxxhg9wfv3wc6n8rhzy6ga", "title": "[AI] Additional information", + "graphCoordinates": { "x": 1340.59, "y": 41.79 }, "blocks": [ { "id": "px8ciz2nu2frvdqjporqpg95", @@ -235,28 +182,23 @@ "items": [ { "id": "w1cg5txczy2qmn4kbh1eybkk", - "type": 1, - "blockId": "px8ciz2nu2frvdqjporqpg95", + "outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc", "content": { "comparisons": [ { "id": "r9ju98p1i6tevti45tt6jwk8", - "value": "3", - "variableId": "vpvkbogoj3rmogz0ssh5odmnn", - "comparisonOperator": "Greater than" + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "comparisonOperator": "Greater than", + "value": "5" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "tfixdvay6mxj4g7z7bfmjthc" + ] + } } - ], - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" + ] }, { "id": "dc58mxvcstc2rdwnlg4yd2aa", "type": "OpenAI", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga", "options": { "task": "Create chat completion", "model": "gpt-3.5-turbo", @@ -288,21 +230,28 @@ }, { "id": "j1pgsjm0snn3pz034h8y91vg", - "role": "Messages sequence ✨", - "content": { - "userMessagesVariableId": "vhp0ymgwq4id82l97g0kliglf", - "assistantMessagesVariableId": "vpvkbogoj3rmogz0ssh5odmnn" - } + "role": "Dialogue", + "dialogueVariableId": "vi5ta5lktses2h6skf5ky2zs0", + "startsBy": "assistant" } ], - "credentialsId": "clgp3rhio00011a0b1ai2dfne", "responseMapping": [ { "id": "krixyhr7qw5ow52yf3i11y3a", - "variableId": "vpvkbogoj3rmogz0ssh5odmnn", - "valueToExtract": "Message content" + "valueToExtract": "Message content", + "variableId": "vpvkbogoj3rmogz0ssh5odmnn" } - ] + ], + "credentialsId": "clocxtxlc00031an2uc59hdpb" + } + }, + { + "id": "vssvfz99ain77sc5w07ci5a1", + "type": "Set variable", + "options": { + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "type": "Append value(s)", + "item": "{{AI reply}}" } }, { @@ -310,39 +259,44 @@ "type": "text", "content": { "richText": [ - { "type": "p", "children": [{ "text": "{{AI replies}}" }] } + { "type": "p", "children": [{ "text": "{{AI reply}}" }] } ] - }, - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" + } }, { "id": "sqFy2G3C1mh9p6s3QBdSS5x", "type": "text input", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga", "options": { - "isLong": true, "labels": { - "button": "Send", - "placeholder": "Type your answer..." + "placeholder": "Type your answer...", + "button": "Send" }, "variableId": "vhp0ymgwq4id82l97g0kliglf" - }, - "outgoingEdgeId": "tc9irw81xlw9ghv68fp8p8xl" + } + }, + { + "id": "t8s54i11vfebpp5cbc7xukn5", + "outgoingEdgeId": "buwcxt81dfrh6prteij8cvo8", + "type": "Set variable", + "options": { + "variableId": "vi5ta5lktses2h6skf5ky2zs0", + "type": "Append value(s)", + "item": "{{Additional information}}" + } } - ], - "graphCoordinates": { "x": 1339.1953125, "y": 146.37890625 } + ] }, { "id": "gjahzyusg4mlpvpaeov0awtm", "title": "Bye", + "graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 }, "blocks": [ { "id": "seLegenCgUwMopRFeAefqZ7", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] - }, - "groupId": "gjahzyusg4mlpvpaeov0awtm" + } }, { "id": "s779Q1y51aVaDUJVrFb16vv", @@ -354,15 +308,14 @@ "children": [{ "text": "We'll get back to you at {{Email}}" }] } ] - }, - "groupId": "gjahzyusg4mlpvpaeov0awtm" + } } - ], - "graphCoordinates": { "x": 1676.6171875, "y": 142.7109375 } + ] }, { "id": "l0223zmqvndj1irhk68yh10v", "title": "", + "graphCoordinates": { "x": 1342.76, "y": 692.3 }, "blocks": [ { "id": "l7r996nrnqb937nzyrprcvs0", @@ -378,8 +331,7 @@ ] } ] - }, - "groupId": "l0223zmqvndj1irhk68yh10v" + } }, { "id": "jxrp7xdzmnqnfmzfvid2u4s1", @@ -399,116 +351,74 @@ ] } ] - }, - "groupId": "l0223zmqvndj1irhk68yh10v" + } } - ], - "graphCoordinates": { "x": 1342.1015625, "y": 627.70703125 } + ] } ], - "variables": [ - { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" }, - { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }, - { "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" }, - { "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI replies" }, - { "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional informations" } - ], "edges": [ { "id": "dkgy7qanybx0d9zl2ke2aa03", - "to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" }, - "from": { - "blockId": "22HP69iipkLjJDTUcc1AWW", - "groupId": "i6xofskq0vdlnfyvf28hzcle" - } + "from": { "eventId": "i6xofskq0vdlnfyvf28hzcle" }, + "to": { "groupId": "nmlij3lrk42cymsu1tj6b9nv" } }, { "id": "vgi4r3yjle17balwlhpas25t", - "to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" }, - "from": { - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "groupId": "nmlij3lrk42cymsu1tj6b9nv" - } + "from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" }, + "to": { "groupId": "wlcaalj5zej2sl1t9kkq55se" } }, { "id": "wlzesf38jzeyf65i1aj6j517", - "to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" }, - "from": { - "blockId": "sqEsMo747LTDnY9FjQcEwUv", - "groupId": "wlcaalj5zej2sl1t9kkq55se" - } + "from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" }, + "to": { "groupId": "vrv6xoriyl74wcz34gqlvc0q" } }, { "id": "piew4sf9dpafiweghqvucmax", - "to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" }, - "from": { - "blockId": "snbsad18Bgry8yZ8DZCfdFD", - "groupId": "vrv6xoriyl74wcz34gqlvc0q" - } + "from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" }, + "to": { "groupId": "trcslng32mdxkjmrw8zxpnpj" } }, { "id": "tfixdvay6mxj4g7z7bfmjthc", - "to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" }, "from": { - "itemId": "w1cg5txczy2qmn4kbh1eybkk", "blockId": "px8ciz2nu2frvdqjporqpg95", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" - } + "itemId": "w1cg5txczy2qmn4kbh1eybkk" + }, + "to": { "groupId": "gjahzyusg4mlpvpaeov0awtm" } }, { - "id": "tc9irw81xlw9ghv68fp8p8xl", - "to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" }, - "from": { - "blockId": "sqFy2G3C1mh9p6s3QBdSS5x", - "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" - } + "id": "buwcxt81dfrh6prteij8cvo8", + "from": { "blockId": "t8s54i11vfebpp5cbc7xukn5" }, + "to": { "groupId": "m4oxxhg9wfv3wc6n8rhzy6ga" } }, { - "id": "gcbys1rzwi0dscvjodyygfme", - "to": { "groupId": "l0223zmqvndj1irhk68yh10v" }, "from": { "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "groupId": "trcslng32mdxkjmrw8zxpnpj" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "l0223zmqvndj1irhk68yh10v" }, + "id": "wtw2lm86g46ehgvp43fcfks6" } - }, + ], + "variables": [ + { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Company" }, + { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" }, + { "id": "vi0mmx9o2m4s8z9cccsjcvpj5", "name": "Services" }, + { "id": "vpvkbogoj3rmogz0ssh5odmnn", "name": "AI reply" }, + { "id": "vhp0ymgwq4id82l97g0kliglf", "name": "Additional information" }, + { "id": "vi5ta5lktses2h6skf5ky2zs0", "name": "AI Dialogue" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:26:59.795Z", + "updatedAt": "2023-11-07T06:50:56.154Z", + "icon": "🦾", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-gen.json b/apps/builder/public/templates/lead-gen.json index a4d7144008..5d7187aa0b 100644 --- a/apps/builder/public/templates/lead-gen.json +++ b/apps/builder/public/templates/lead-gen.json @@ -1,33 +1,24 @@ { - "id": "qgMiLSr4W1ftXocFncin1G", - "version": "4", - "createdAt": "2022-02-05T06:21:16.522Z", - "updatedAt": "2022-02-05T06:21:16.522Z", + "version": "6", + "id": "cloiafj9e00091aqj6o9nfrww", "name": "Lead Generation", - "icon": "🤝", - "folderId": null, - "groups": [ + "events": [ { "id": "k6kY6gwRE6noPoYQNGzgUq", - "blocks": [ - { - "id": "22HP69iipkLjJDTUcc1AWW", - "type": "start", - "label": "Start", - "groupId": "k6kY6gwRE6noPoYQNGzgUq", - "outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "oNvqaqNExdSH2kKEhKZHuE", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "kinRXxYop2X4d7F9qt8WNB", + "title": "Welcome", + "graphCoordinates": { "x": 1, "y": 148 }, "blocks": [ { "id": "sc1y8VwDabNJgiVTBi4qtif", "type": "text", - "groupId": "kinRXxYop2X4d7F9qt8WNB", "content": { "richText": [ { @@ -44,37 +35,31 @@ { "id": "s7YqZTBeyCa4Hp3wN2j922c", "type": "image", - "groupId": "kinRXxYop2X4d7F9qt8WNB", "content": { "url": "https://media2.giphy.com/media/XD9o33QG9BoMis7iM4/giphy.gif?cid=fe3852a3ihg8rvipzzky5lybmdyq38fhke2tkrnshwk52c7d&rid=giphy.gif&ct=g" } }, { "id": "sbjZWLJGVkHAkDqS4JQeGow", + "outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim", "type": "choice input", "items": [ { "id": "hQw2zbp7FDX7XYK9cFpbgC", - "type": 0, - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", "content": "Hi!" } - ], - "groupId": "kinRXxYop2X4d7F9qt8WNB", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "i51YhHpk1dtSyduFNf5Wim" + ] } - ], - "title": "Welcome", - "graphCoordinates": { "x": 1, "y": 148 } + ] }, { "id": "o4SH1UtKANnW5N5D67oZUz", + "title": "Email", + "graphCoordinates": { "x": 669, "y": 141 }, "blocks": [ { "id": "sxeYubYN6XzhAfG7m9Fivhc", "type": "text", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "content": { "richText": [ { @@ -87,7 +72,6 @@ { "id": "scQ5kduafAtfP9T8SHUJnGi", "type": "text", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "content": { "richText": [ { @@ -101,26 +85,22 @@ }, { "id": "snbsad18Bgry8yZ8DZCfdFD", + "outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5", "type": "email input", - "groupId": "o4SH1UtKANnW5N5D67oZUz", "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah", - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "w3MiN1Ct38jT5NykVsgmb5" + "variableId": "v3VFChNVSCXQ2rXv4DrJ8Ah" + } } - ], - "title": "Email", - "graphCoordinates": { "x": 669, "y": 141 } + ] }, { "id": "q5dAhqSTCaNdiGSJm9B9Rw", + "title": "Name", + "graphCoordinates": { "x": 340, "y": 143 }, "blocks": [ { "id": "sgtE2Sy7cKykac9B223Kq9R", "type": "text", - "groupId": "q5dAhqSTCaNdiGSJm9B9Rw", "content": { "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } @@ -129,29 +109,22 @@ }, { "id": "sqEsMo747LTDnY9FjQcEwUv", + "outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg", "type": "text input", - "groupId": "q5dAhqSTCaNdiGSJm9B9Rw", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "giiLFGw5xXBCHzvp1qAbdX" - }, - "outgoingEdgeId": "4tYbERpi5Po4goVgt6rWXg" + } } - ], - "title": "Name", - "graphCoordinates": { "x": 340, "y": 143 } + ] }, { "id": "fKqRz7iswk7ULaj5PJocZL", + "title": "Services", + "graphCoordinates": { "x": 1002, "y": 144 }, "blocks": [ { "id": "su7HceVXWyTCzi2vv3m4QbK", "type": "text", - "groupId": "fKqRz7iswk7ULaj5PJocZL", "content": { "richText": [ { @@ -163,48 +136,37 @@ }, { "id": "s5VQGsVF4hQgziQsXVdwPDW", + "outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk", "type": "choice input", "items": [ { "id": "fnLCBF4NdraSwcubnBhk8H", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "content": "Website dev" }, { "id": "a782h8ynMouY84QjH7XSnR", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "content": "Content Marketing" }, { "id": "jGvh94zBByvVFpSS3w97zY", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "content": "Social Media" }, { "id": "6PRLbKUezuFmwWtLVbvAQ7", - "type": 0, - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", "content": "UI / UX Design" } - ], - "groupId": "fKqRz7iswk7ULaj5PJocZL", - "options": { "buttonLabel": "Send", "isMultipleChoice": true }, - "outgoingEdgeId": "ohTRakmcYJ7GdFWRZrWRjk" + ] } - ], - "title": "Services", - "graphCoordinates": { "x": 1002, "y": 144 } + ] }, { "id": "7qHBEyCMvKEJryBHzPmHjV", + "title": "Additional information", + "graphCoordinates": { "x": 1337, "y": 145 }, "blocks": [ { "id": "sqR8Sz9gW21aUYKtUikq7qZ", "type": "text", - "groupId": "7qHBEyCMvKEJryBHzPmHjV", "content": { "richText": [ { @@ -218,25 +180,22 @@ }, { "id": "sqFy2G3C1mh9p6s3QBdSS5x", + "outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY", "type": "text input", - "groupId": "7qHBEyCMvKEJryBHzPmHjV", "options": { - "isLong": true, - "labels": { "button": "Send", "placeholder": "Type your answer..." } - }, - "outgoingEdgeId": "sH5nUssG2XQbm6ZidGv9BY" + "isLong": true + } } - ], - "title": "Additional information", - "graphCoordinates": { "x": 1337, "y": 145 } + ] }, { "id": "vF7AD7zSAj7SNvN3gr9N94", + "title": "Bye", + "graphCoordinates": { "x": 1668, "y": 143 }, "blocks": [ { "id": "seLegenCgUwMopRFeAefqZ7", "type": "text", - "groupId": "vF7AD7zSAj7SNvN3gr9N94", "content": { "richText": [{ "type": "p", "children": [{ "text": "Perfect!" }] }] } @@ -244,7 +203,6 @@ { "id": "s779Q1y51aVaDUJVrFb16vv", "type": "text", - "groupId": "vF7AD7zSAj7SNvN3gr9N94", "content": { "richText": [ { @@ -254,96 +212,57 @@ ] } } - ], - "title": "Bye", - "graphCoordinates": { "x": 1668, "y": 143 } + ] } ], - "variables": [ - { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" }, - { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" } - ], "edges": [ { "id": "oNvqaqNExdSH2kKEhKZHuE", - "to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" }, - "from": { - "blockId": "22HP69iipkLjJDTUcc1AWW", - "groupId": "k6kY6gwRE6noPoYQNGzgUq" - } + "from": { "eventId": "k6kY6gwRE6noPoYQNGzgUq" }, + "to": { "groupId": "kinRXxYop2X4d7F9qt8WNB" } }, { "id": "i51YhHpk1dtSyduFNf5Wim", - "to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" }, - "from": { - "blockId": "sbjZWLJGVkHAkDqS4JQeGow", - "groupId": "kinRXxYop2X4d7F9qt8WNB" - } + "from": { "blockId": "sbjZWLJGVkHAkDqS4JQeGow" }, + "to": { "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" } }, { "id": "4tYbERpi5Po4goVgt6rWXg", - "to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" }, - "from": { - "blockId": "sqEsMo747LTDnY9FjQcEwUv", - "groupId": "q5dAhqSTCaNdiGSJm9B9Rw" - } + "from": { "blockId": "sqEsMo747LTDnY9FjQcEwUv" }, + "to": { "groupId": "o4SH1UtKANnW5N5D67oZUz" } }, { "id": "w3MiN1Ct38jT5NykVsgmb5", - "to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" }, - "from": { - "blockId": "snbsad18Bgry8yZ8DZCfdFD", - "groupId": "o4SH1UtKANnW5N5D67oZUz" - } + "from": { "blockId": "snbsad18Bgry8yZ8DZCfdFD" }, + "to": { "groupId": "fKqRz7iswk7ULaj5PJocZL" } }, { "id": "ohTRakmcYJ7GdFWRZrWRjk", - "to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" }, - "from": { - "blockId": "s5VQGsVF4hQgziQsXVdwPDW", - "groupId": "fKqRz7iswk7ULaj5PJocZL" - } + "from": { "blockId": "s5VQGsVF4hQgziQsXVdwPDW" }, + "to": { "groupId": "7qHBEyCMvKEJryBHzPmHjV" } }, { "id": "sH5nUssG2XQbm6ZidGv9BY", - "to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" }, - "from": { - "blockId": "sqFy2G3C1mh9p6s3QBdSS5x", - "groupId": "7qHBEyCMvKEJryBHzPmHjV" - } + "from": { "blockId": "sqFy2G3C1mh9p6s3QBdSS5x" }, + "to": { "groupId": "vF7AD7zSAj7SNvN3gr9N94" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, - "publicId": null + "variables": [ + { "id": "giiLFGw5xXBCHzvp1qAbdX", "name": "Name" }, + { "id": "v3VFChNVSCXQ2rXv4DrJ8Ah", "name": "Email" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-03T07:22:14.210Z", + "updatedAt": "2023-11-03T07:22:14.210Z", + "icon": "🤝", + "folderId": null, + "publicId": null, + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-magnet.json b/apps/builder/public/templates/lead-magnet.json index f842ba58af..9fca15b92e 100644 --- a/apps/builder/public/templates/lead-magnet.json +++ b/apps/builder/public/templates/lead-magnet.json @@ -1,29 +1,20 @@ { - "id": "clg69gafk00011ar14aryt8ej", - "version": "4", - "createdAt": "2023-04-07T08:03:57.008Z", - "updatedAt": "2023-04-07T08:22:10.285Z", - "icon": "🧲", + "version": "6", + "id": "clon5n2yo00091avnmbju5698", "name": "Lead magnet", - "folderId": null, - "groups": [ + "events": [ { "id": "emejg92oa3743x6z556xi1ig", - "title": "Start", - "blocks": [ - { - "id": "fp82tc3nolkjpw38j60xxemb", - "type": "start", - "label": "Start", - "groupId": "emejg92oa3743x6z556xi1ig", - "outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "hfugjlwxkt5eqvxe5poimt6w", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "gr9wedxcqxie11ki9yss1h5o", "title": "Intro", + "graphCoordinates": { "x": 209.12109375, "y": 176.5703125 }, "blocks": [ { "id": "uaks8b01ec3fln8g5iq9gnv7", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Hi there! 👋" }] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "iy9brewiabfhv7ctsvdd5fg6", @@ -51,8 +41,7 @@ ] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "immlrmjc0tnvc0rd1552c0ey", @@ -68,8 +57,7 @@ ] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "i1pv6t8sj9wdzoheplwj1cnr", @@ -78,26 +66,23 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "gr9wedxcqxie11ki9yss1h5o" + } }, { "id": "uocaxxtg26btl2zytwy09jh9", + "outgoingEdgeId": "rczh7k3r065okzax6za00lvh", "type": "text input", - "groupId": "gr9wedxcqxie11ki9yss1h5o", "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Your first name" }, + "labels": { "placeholder": "Your first name" }, "variableId": "vyu4paeim4jcjgmxr26bdk286" - }, - "outgoingEdgeId": "rczh7k3r065okzax6za00lvh" + } } - ], - "graphCoordinates": { "x": 209.12109375, "y": 176.5703125 } + ] }, { "id": "xaloto3qrrbtcdcrob013xcx", "title": "Email", + "graphCoordinates": { "x": 563.2421875, "y": 177.484375 }, "blocks": [ { "id": "pcx0bo7egsq3il16707mkuzc", @@ -113,26 +98,21 @@ ] } ] - }, - "groupId": "xaloto3qrrbtcdcrob013xcx" + } }, { - "id": "fu17h0e24vpplfnrhla0t5id", - "type": "text input", + "id": "nu9ibw4r4q9piwl3b308bezp", "groupId": "xaloto3qrrbtcdcrob013xcx", - "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Your email address" }, - "variableId": "vrhd0bug6b6dzgijevfoonvo2" - }, - "outgoingEdgeId": "x9hmtjizy3cl3kzyagf0ucnp" + "type": "email input", + "options": { "variableId": "vrhd0bug6b6dzgijevfoonvo2" }, + "outgoingEdgeId": "dxj0x2miwwkxsesp4chyjqek" } - ], - "graphCoordinates": { "x": 563.2421875, "y": 177.484375 } + ] }, { "id": "tp9r95ay5vm9zlgzw8twtxn3", "title": "Goal", + "graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 }, "blocks": [ { "id": "o6helbp9c682dur5e8bt9yov", @@ -144,52 +124,31 @@ "children": [{ "text": "What's your goal with the community?" }] } ] - }, - "groupId": "tp9r95ay5vm9zlgzw8twtxn3" + } }, { "id": "wq7yofni4bqr9rt5qrzk6928", + "outgoingEdgeId": "on3al6xuczmckpu3roboo9te", "type": "choice input", "items": [ - { - "id": "ux0ly8ocxfm8i8ivdbwjnmnt", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Win loyal fans" - }, + { "id": "ux0ly8ocxfm8i8ivdbwjnmnt", "content": "Win loyal fans" }, { "id": "izz0nwo2iy2kmlif5fav2oc5", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", "content": "Competitive advantage" }, - { - "id": "jtkx9v5uqjw84hapq3umqlb5", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Better product" - }, - { - "id": "k7a7rkpoigrtrulilap7q6fw", - "type": 0, - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "content": "Support" - } + { "id": "jtkx9v5uqjw84hapq3umqlb5", "content": "Better product" }, + { "id": "k7a7rkpoigrtrulilap7q6fw", "content": "Support" } ], - "groupId": "tp9r95ay5vm9zlgzw8twtxn3", "options": { - "variableId": "vf49immob0ih3kxn5b0nraqkq", - "buttonLabel": "Send", - "isMultipleChoice": false - }, - "outgoingEdgeId": "on3al6xuczmckpu3roboo9te" + "variableId": "vf49immob0ih3kxn5b0nraqkq" + } } - ], - "graphCoordinates": { "x": 1243.07421875, "y": 172.2421875 } + ] }, { "id": "cszciavjonb2qp0ga0pladoj", "title": "Goal", + "graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 }, "blocks": [ { "id": "tfqqveo72xt7i7ii9imztcd4", @@ -205,8 +164,7 @@ ] } ] - }, - "groupId": "cszciavjonb2qp0ga0pladoj" + } }, { "id": "yxuk1bhfas07i4bxq64hi0vj", @@ -214,102 +172,86 @@ "items": [ { "id": "qn6w72jgckfz777e9ehb421v", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv", "content": { "comparisons": [ { "id": "nt0c7o7w0elbbrfde8nned76", - "value": "Win loyal fans", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Win loyal fans" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "yml7f2btr9q4hptk06cqn2xv" + ] + } }, { "id": "vuun8mijpfzcu0o9qk0vtift", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw", "content": { "comparisons": [ { "id": "yf6asq9i97ap9y2jxibmjylv", - "value": "Competitive advantage", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Competitive advantage" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "qhpximatxzjmmm1njwoqzplw" + ] + } }, { "id": "dg28mo88efs00p8ech81qxmu", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go", "content": { "comparisons": [ { "id": "x7tbo8q47r1wdlg6w3c48mru", - "value": "Better product", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Better product" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "xa5z7a7en5vfevqk5e5q05go" + ] + } }, { "id": "lrj50vf8c0cj46jrtxid5a60", - "type": 1, - "blockId": "yxuk1bhfas07i4bxq64hi0vj", + "outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj", "content": { "comparisons": [ { "id": "hkb9qy6un3yrhhxtm0s6c8rg", - "value": "Support", "variableId": "vf49immob0ih3kxn5b0nraqkq", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Support" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "ogpmoxw3lrt12rgxnq0wajrj" + ] + } } - ], - "groupId": "cszciavjonb2qp0ga0pladoj" + ] } - ], - "graphCoordinates": { "x": 1590.85546875, "y": 164.02734375 } + ] }, { "id": "vvlecgglxadq0x2eg7ozr535", "title": "Send bundle", + "graphCoordinates": { "x": 901.6953125, "y": 180.0546875 }, "blocks": [ { "id": "w53cmmn4iowq753r8jmvk7o7", + "outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3", "type": "Email", - "groupId": "vvlecgglxadq0x2eg7ozr535", "options": { - "body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project 🚀\n\nBest,\nTypebot team.", - "replyTo": "", - "subject": "Here is your community bundle ✨", - "recipients": ["{{Email}}"], "isCustomBody": true, - "credentialsId": "default" - }, - "outgoingEdgeId": "qkrpdn1z0bv1xvsa3wrdyyn3" + "recipients": ["{{Email}}"], + "subject": "Here is your community bundle ✨", + "body": "Hey {{Name}},\n\nHere is a link to download the community bundle:\n\nhttps://typebot.io\n\nI hope it will help you create the right community for your project 🚀\n\nBest,\nTypebot team." + } } - ], - "graphCoordinates": { "x": 901.6953125, "y": 180.0546875 } + ] }, { "id": "k2sbuizycrpuyf44v9eebebr", "title": "Win loyal fans video", + "graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 }, "blocks": [ { "id": "dzcw0vwo23vhp2nwyxl99va8", @@ -321,8 +263,7 @@ "children": [{ "text": "Want to know how to win loyal fans?" }] } ] - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } }, { "id": "yh8ueuio717ceybrcsqa1ekq", @@ -331,25 +272,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } }, { "id": "z3ffqugex7gipsb4ke6ov874", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "k2sbuizycrpuyf44v9eebebr" + } } - ], - "graphCoordinates": { "x": 1969.18359375, "y": -205.76171875 } + ] }, { "id": "v6s5yza7kgretdmbke7lg5u7", "title": "Competitive advantage video", + "graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 }, "blocks": [ { "id": "anu87wo53n3ihq4xl8smprwg", @@ -365,8 +304,7 @@ ] } ] - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } }, { "id": "ku2scubf21eqnip3ig3rc7n9", @@ -375,25 +313,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } }, { "id": "rvdh4tk0ebg7t9tdga9aw8ao", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "v6s5yza7kgretdmbke7lg5u7" + } } - ], - "graphCoordinates": { "x": 1968.1484375, "y": 181.5703125 } + ] }, { "id": "l3pc0992zp0hw8ea83b7aky3", "title": "Better product", + "graphCoordinates": { "x": 1968.703125, "y": 600.07421875 }, "blocks": [ { "id": "ysedrtj5q17usk5ezpa5g88e", @@ -409,8 +345,7 @@ ] } ] - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } }, { "id": "xy08sticb76u82sgcfaeqpe2", @@ -419,25 +354,23 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } }, { "id": "jiz2uvo89456jpy081hazkd4", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "l3pc0992zp0hw8ea83b7aky3" + } } - ], - "graphCoordinates": { "x": 1968.703125, "y": 600.07421875 } + ] }, { "id": "f4hlh2oq8viwxrpl9ppq5d42", "title": "Support", + "graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 }, "blocks": [ { "id": "lu0bevnjfkor1ugbnbkev7t3", @@ -451,8 +384,7 @@ ] } ] - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } }, { "id": "jrhdfrdn4gdstpktq1q0gk1q", @@ -461,142 +393,99 @@ "richText": [ { "type": "p", "children": [{ "text": "Check out this video:" }] } ] - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } }, { "id": "e3tlj1y4vyhtwcabzifv63q2", "type": "video", "content": { - "id": "jp3ggg_42-M", "url": "https://www.youtube.com/watch?v=jp3ggg_42-M&t=22s", + "id": "jp3ggg_42-M", "type": "youtube" - }, - "groupId": "f4hlh2oq8viwxrpl9ppq5d42" + } } - ], - "graphCoordinates": { "x": 1970.0234375, "y": 1025.99609375 } + ] } ], - "variables": [ - { "id": "vyu4paeim4jcjgmxr26bdk286", "name": "Name" }, - { "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" }, - { "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" } - ], "edges": [ { "id": "hfugjlwxkt5eqvxe5poimt6w", - "to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" }, - "from": { - "blockId": "fp82tc3nolkjpw38j60xxemb", - "groupId": "emejg92oa3743x6z556xi1ig" - } + "from": { "eventId": "emejg92oa3743x6z556xi1ig" }, + "to": { "groupId": "gr9wedxcqxie11ki9yss1h5o" } }, { "id": "rczh7k3r065okzax6za00lvh", - "to": { "groupId": "xaloto3qrrbtcdcrob013xcx" }, - "from": { - "blockId": "uocaxxtg26btl2zytwy09jh9", - "groupId": "gr9wedxcqxie11ki9yss1h5o" - } + "from": { "blockId": "uocaxxtg26btl2zytwy09jh9" }, + "to": { "groupId": "xaloto3qrrbtcdcrob013xcx" } }, { "id": "on3al6xuczmckpu3roboo9te", - "to": { "groupId": "cszciavjonb2qp0ga0pladoj" }, - "from": { - "blockId": "wq7yofni4bqr9rt5qrzk6928", - "groupId": "tp9r95ay5vm9zlgzw8twtxn3" - } - }, - { - "id": "x9hmtjizy3cl3kzyagf0ucnp", - "to": { "groupId": "vvlecgglxadq0x2eg7ozr535" }, - "from": { - "blockId": "fu17h0e24vpplfnrhla0t5id", - "groupId": "xaloto3qrrbtcdcrob013xcx" - } + "from": { "blockId": "wq7yofni4bqr9rt5qrzk6928" }, + "to": { "groupId": "cszciavjonb2qp0ga0pladoj" } }, { "id": "qkrpdn1z0bv1xvsa3wrdyyn3", - "to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" }, - "from": { - "blockId": "w53cmmn4iowq753r8jmvk7o7", - "groupId": "vvlecgglxadq0x2eg7ozr535" - } + "from": { "blockId": "w53cmmn4iowq753r8jmvk7o7" }, + "to": { "groupId": "tp9r95ay5vm9zlgzw8twtxn3" } }, { "id": "yml7f2btr9q4hptk06cqn2xv", - "to": { "groupId": "k2sbuizycrpuyf44v9eebebr" }, "from": { - "itemId": "qn6w72jgckfz777e9ehb421v", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "qn6w72jgckfz777e9ehb421v" + }, + "to": { "groupId": "k2sbuizycrpuyf44v9eebebr" } }, { "id": "qhpximatxzjmmm1njwoqzplw", - "to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" }, "from": { - "itemId": "vuun8mijpfzcu0o9qk0vtift", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "vuun8mijpfzcu0o9qk0vtift" + }, + "to": { "groupId": "v6s5yza7kgretdmbke7lg5u7" } }, { "id": "xa5z7a7en5vfevqk5e5q05go", - "to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" }, "from": { - "itemId": "dg28mo88efs00p8ech81qxmu", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } + "itemId": "dg28mo88efs00p8ech81qxmu" + }, + "to": { "groupId": "l3pc0992zp0hw8ea83b7aky3" } }, { "id": "ogpmoxw3lrt12rgxnq0wajrj", - "to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" }, "from": { - "itemId": "lrj50vf8c0cj46jrtxid5a60", "blockId": "yxuk1bhfas07i4bxq64hi0vj", - "groupId": "cszciavjonb2qp0ga0pladoj" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true + "itemId": "lrj50vf8c0cj46jrtxid5a60" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } + "to": { "groupId": "f4hlh2oq8viwxrpl9ppq5d42" } }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + { + "from": { + "blockId": "nu9ibw4r4q9piwl3b308bezp", + "groupId": "xaloto3qrrbtcdcrob013xcx" + }, + "to": { "groupId": "vvlecgglxadq0x2eg7ozr535" }, + "id": "dxj0x2miwwkxsesp4chyjqek" } - }, + ], + "variables": [ + { "id": "vyu4paeim4jcjgmxr26bdk286", "name": "Name" }, + { "id": "vf49immob0ih3kxn5b0nraqkq", "name": "Goal" }, + { "id": "vrhd0bug6b6dzgijevfoonvo2", "name": "Email" } + ], + "theme": {}, "selectedThemeTemplateId": null, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:06:59.136Z", + "updatedAt": "2023-11-06T17:06:59.136Z", + "icon": "🧲", + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/lead-scoring.json b/apps/builder/public/templates/lead-scoring.json index da8e242352..89ae24a8b8 100644 --- a/apps/builder/public/templates/lead-scoring.json +++ b/apps/builder/public/templates/lead-scoring.json @@ -1,34 +1,23 @@ { - "id": "cl1seoz582103xk1at12y4ucb", - "version": "4", - "createdAt": "2022-04-09T22:06:01.196Z", - "updatedAt": "2022-04-09T22:35:22.449Z", - "icon": "🏆", + "version": "6", + "id": "clon58wkg00051avnkor66u6m", "name": "Lead Scoring", - "folderId": null, - "groups": [ + "events": [ { "id": "cl1seoz560000xk1ags8s67b0", - "blocks": [ - { - "id": "cl1seoz570001xk1ab0rd05k6", - "type": "start", - "label": "Start", - "groupId": "cl1seoz560000xk1ags8s67b0", - "outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l" - } - ], - "title": "Start", - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "cl1seraz9001z2e6e85zrx08l", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "cl1sep1c5001w2e6e77bb1uwb", - "graphCoordinates": { "x": 0, "y": 171 }, "title": "Welcome", + "graphCoordinates": { "x": 0, "y": 171 }, "blocks": [ { "id": "cl1sep1cc001x2e6eikrwf9jy", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi! 👋" }] }] @@ -36,7 +25,6 @@ }, { "id": "cl1sep7jn001y2e6ez7ee7eiw", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [ @@ -51,7 +39,6 @@ }, { "id": "cl1seyazl00252e6e3zsbosvm", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", "type": "text", "content": { "richText": [ @@ -66,24 +53,22 @@ }, { "id": "cl1sezuul002a2e6ex7nc444j", - "groupId": "cl1sep1c5001w2e6e77bb1uwb", + "outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "0" - }, - "outgoingEdgeId": "cl1sf8v96003k2e6e2rbcfjmz" + } } ] }, { "id": "cl1sern8w00202e6ez69l190j", - "graphCoordinates": { "x": 377, "y": 166 }, "title": "Q1", + "graphCoordinates": { "x": 377, "y": 166 }, "blocks": [ { "id": "cl1sern9200212e6esrid307i", - "groupId": "cl1sern8w00202e6ez69l190j", "type": "text", "content": { "richText": [ @@ -96,23 +81,17 @@ }, { "id": "cl1ses31000222e6ebrb4wxo0", - "groupId": "cl1sern8w00202e6ez69l190j", "type": "choice input", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, "items": [ { "id": "cl1ses31100232e6eq3nnp2mm", - "blockId": "cl1ses31000222e6ebrb4wxo0", - "type": 0, - "content": "Yes", - "outgoingEdgeId": "cl1sezo4z00292e6ean8s487x" + "outgoingEdgeId": "cl1sezo4z00292e6ean8s487x", + "content": "Yes" }, { - "blockId": "cl1ses31000222e6ebrb4wxo0", - "type": 0, "id": "cl1ses3y400242e6e1qjwkhq4", - "content": "No", - "outgoingEdgeId": "cl1sfertf004i2e6epf68fwri" + "outgoingEdgeId": "cl1sfertf004i2e6epf68fwri", + "content": "No" } ] } @@ -120,12 +99,11 @@ }, { "id": "cl1sez6zd00262e6ebh59k1bs", - "graphCoordinates": { "x": 748, "y": 135 }, "title": "Company", + "graphCoordinates": { "x": 748, "y": 135 }, "blocks": [ { "id": "cl1sf04yl002c2e6eaeu463cq", - "groupId": "cl1sez6zd00262e6ebh59k1bs", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", @@ -134,7 +112,6 @@ }, { "id": "cl1sez6zt00272e6ecsefq05y", - "groupId": "cl1sez6zd00262e6ebh59k1bs", "type": "text", "content": { "richText": [ @@ -144,28 +121,21 @@ }, { "id": "cl1sezlw700282e6eozkzmed0", - "groupId": "cl1sez6zd00262e6ebh59k1bs", + "outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n", "type": "text input", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vcl1sf93s2003l2e6eojomb66g" - }, - "outgoingEdgeId": "cl1sf1mm0002h2e6eurv21l5n" + } } ] }, { "id": "cl1sf0ogu002d2e6edyhcuu6f", - "graphCoordinates": { "x": 1096, "y": -62 }, "title": "Q2", + "graphCoordinates": { "x": 1096, "y": -62 }, "blocks": [ { "id": "cl1sf0ohc002e2e6egrjoj10z", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "text", "content": { "richText": [ @@ -180,22 +150,18 @@ }, { "id": "cl1sf1er7002f2e6eakhc25yy", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "number input", "options": { - "labels": { "button": "Send", "placeholder": "Type a number..." }, "variableId": "vcl1sf1ko5002g2e6egjmyb16v" } }, { "id": "cl1sf1vkf002j2e6e971somqx", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "type": "Condition", "items": [ { "id": "cl1sf1vkg002k2e6ec54p0s4v", - "blockId": "cl1sf1vkf002j2e6e971somqx", - "type": 1, + "outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz", "content": { "comparisons": [ { @@ -204,22 +170,19 @@ "comparisonOperator": "Greater than", "value": "30" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf35fh002t2e6e8u68r9gz" + ] + } } ] }, { "id": "cl1sf2iix002n2e6egibs95yb", - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", + "outgoingEdgeId": "cl1sfen6a004f2e6estkfooss", "type": "Condition", "items": [ { "id": "cl1sf2iix002o2e6eai567rnj", - "blockId": "cl1sf2iix002n2e6egibs95yb", - "type": 1, + "outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd", "content": { "comparisons": [ { @@ -227,58 +190,52 @@ "variableId": "vcl1sf1ko5002g2e6egjmyb16v", "value": "10" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf37rv002x2e6e7wz3lawd" + ] + } } - ], - "outgoingEdgeId": "cl1sfen6a004f2e6estkfooss" + ] } ] }, { "id": "cl1sf2wnu002r2e6ehdp859qv", - "graphCoordinates": { "x": 1458, "y": -72 }, "title": "Add 20", + "graphCoordinates": { "x": 1458, "y": -72 }, "blocks": [ { "id": "cl1sf2wom002s2e6e8cmcnhpn", - "groupId": "cl1sf2wnu002r2e6ehdp859qv", + "outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeq3f004h2e6eglhjyx2o" + } } ] }, { "id": "cl1sf36ia002u2e6e16ifow0z", - "graphCoordinates": { "x": 1458, "y": 88 }, "title": "Add 10", + "graphCoordinates": { "x": 1458, "y": 88 }, "blocks": [ { "id": "cl1sf36ib002v2e6ejyyrrjnh", - "groupId": "cl1sf36ia002u2e6e16ifow0z", + "outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 10" - }, - "outgoingEdgeId": "cl1sfeog5004g2e6eiil842nb" + } } ] }, { "id": "cl1sf4qk500332e6e8gs5mn3t", - "graphCoordinates": { "x": 2442.929831215626, "y": 391 }, "title": "Q4", + "graphCoordinates": { "x": 2442.929831215626, "y": 391 }, "blocks": [ { "id": "cl1sf4ql500342e6ebj863aex", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "type": "text", "content": { "richText": [ @@ -288,12 +245,9 @@ }, { "id": "cl1sf4z8n00352e6ejypaeinl", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "type": "text input", "options": { - "isLong": false, "labels": { - "button": "Send", "placeholder": "Type your country..." }, "variableId": "vcl1sf525q00362e6eoyosycte" @@ -301,13 +255,12 @@ }, { "id": "cl1sf738d003c2e6eswslikio", - "groupId": "cl1sf4qk500332e6e8gs5mn3t", + "outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209", "type": "Condition", "items": [ { "id": "cl1sf738d003d2e6eqpzlxh8f", - "blockId": "cl1sf738d003c2e6eswslikio", - "type": 1, + "outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt", "content": { "comparisons": [ { @@ -316,41 +269,36 @@ "comparisonOperator": "Equal to", "value": "United States" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sf7qlx003h2e6e60635qrt" + ] + } } - ], - "outgoingEdgeId": "cl1sf9acz003n2e6ekwjq7209" + ] } ] }, { "id": "cl1sf7jbi003f2e6euy48woy4", - "graphCoordinates": { "x": 2765.4297996080672, "y": 386.7142676528225 }, "title": "Add 10", + "graphCoordinates": { "x": 2765.429799608067, "y": 386.7142676528225 }, "blocks": [ { "id": "cl1sf7jcx003g2e6ec1z9xh0w", - "groupId": "cl1sf7jbi003f2e6euy48woy4", + "outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "10" - }, - "outgoingEdgeId": "cl1sf99bb003m2e6eywy661ww" + } } ] }, { "id": "cl1sf85am003i2e6e1yq8eoa7", - "graphCoordinates": { "x": 2953.7865857513116, "y": 570.3154133255522 }, "title": "Filtering", + "graphCoordinates": { "x": 2953.786585751312, "y": 570.3154133255522 }, "blocks": [ { "id": "cl1sf85bm003j2e6e04d210vs", - "groupId": "cl1sf85am003i2e6e1yq8eoa7", "type": "text", "content": { "richText": [ @@ -365,13 +313,12 @@ }, { "id": "cl1sfat0h003p2e6e7j0hpilh", - "groupId": "cl1sf85am003i2e6e1yq8eoa7", + "outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr", "type": "Condition", "items": [ { "id": "cl1sfat0h003q2e6eyx6vxe0f", - "blockId": "cl1sfat0h003p2e6e7j0hpilh", - "type": 1, + "outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v", "content": { "comparisons": [ { @@ -380,24 +327,20 @@ "comparisonOperator": "Greater than", "value": "20" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1sfg9fc004k2e6egywpim9v" + ] + } } - ], - "outgoingEdgeId": "cl1sfgtau004n2e6ev68sikcr" + ] } ] }, { "id": "cl1sfbbv0003s2e6eheyhv7ke", - "graphCoordinates": { "x": 1632.8573866868949, "y": 465.7855110942534 }, "title": "Q3", + "graphCoordinates": { "x": 1632.857386686895, "y": 465.7855110942534 }, "blocks": [ { "id": "cl1sfcqjw003z2e6ebmyzey4o", - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "type": "text", "content": { "richText": [ @@ -407,86 +350,64 @@ }, { "id": "cl1sfbbw3003t2e6e16ec9w29", - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", + "outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2", "type": "choice input", - "options": { - "buttonLabel": "Send", - "isMultipleChoice": false - }, "items": [ + { "id": "cl1sfbbw3003u2e6e7luhj0n1", "content": "UI/UX Designer" }, + { "id": "cl1sfbq6z003v2e6egnctk2n2", "content": "Product Owner" }, { - "id": "cl1sfbbw3003u2e6e7luhj0n1", - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, - "content": "UI/UX Designer" - }, - { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, - "id": "cl1sfbq6z003v2e6egnctk2n2", - "content": "Product Owner" - }, - { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, "id": "cl1sfbtz8003w2e6eodbt4ogs", - "content": "Marketing Officer", - "outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo" + "outgoingEdgeId": "cl1sfebs9004a2e6ere0zokyo", + "content": "Marketing Officer" }, { - "blockId": "cl1sfbbw3003t2e6e16ec9w29", - "type": 0, "id": "cl1sfc545003x2e6e833juo6m", - "content": "Developer", - "outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33" + "outgoingEdgeId": "cl1sfedcd004b2e6eerh8hz33", + "content": "Developer" } - ], - "outgoingEdgeId": "cl1sfek9r004e2e6elkh3h7a2" + ] } ] }, { "id": "cl1sfdroa00452e6e5o458z9h", - "graphCoordinates": { "x": 1983.1431822491943, "y": 82.85612238447435 }, "title": "Add 20", + "graphCoordinates": { "x": 1983.143182249194, "y": 82.85612238447435 }, "blocks": [ { "id": "cl1sfdrpi00462e6emfd9sj14", - "groupId": "cl1sfdroa00452e6e5o458z9h", + "outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeg2k004c2e6eu9rjnski" + } } ] }, { "id": "cl1sfe2kn00472e6ead4qs2d9", - "graphCoordinates": { "x": 1984.2856059169358, "y": 240.8562488147158 }, "title": "Add 10", + "graphCoordinates": { "x": 1984.285605916936, "y": 240.8562488147158 }, "blocks": [ { "id": "cl1sfe2kn00482e6eukp8r9bj", - "groupId": "cl1sfe2kn00472e6ead4qs2d9", + "outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn", "type": "Set variable", "options": { "variableId": "vcl1sezzln002b2e6e6ssxh9bf", "expressionToEvaluate": "{{Lead Score}} + 20" - }, - "outgoingEdgeId": "cl1sfeik5004d2e6ejj03f1gn" + } } ] }, { "id": "cl1sffxet004j2e6ec6gfbffh", - "graphCoordinates": { "x": 3350.0874940277185, "y": 509.77356639445065 }, "title": "Conclusion - Qualified", + "graphCoordinates": { "x": 3350.087494027719, "y": 509.7735663944507 }, "blocks": [ { "id": "cl1sfgwox004o2e6evzi0n7hk", - "groupId": "cl1sffxet004j2e6ec6gfbffh", "type": "text", "content": { "richText": [ @@ -503,7 +424,6 @@ }, { "id": "cl1sfhz4f004p2e6esidqktmr", - "groupId": "cl1sffxet004j2e6ec6gfbffh", "type": "text", "content": { "richText": [ @@ -518,12 +438,11 @@ }, { "id": "cl1sfgjlr004l2e6erykli1ud", - "graphCoordinates": { "x": 3352.8943392345736, "y": 786.5865419115444 }, "title": "Conclusion - Not qualified", + "graphCoordinates": { "x": 3352.894339234574, "y": 786.5865419115444 }, "blocks": [ { "id": "cl1sfgjnr004m2e6e63sqh0dh", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -538,7 +457,6 @@ }, { "id": "cl1sfikh5004q2e6elyvzgd0s", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -553,7 +471,6 @@ }, { "id": "cl1sfitz4004r2e6e3ge4x7uy", - "groupId": "cl1sfgjlr004l2e6erykli1ud", "type": "text", "content": { "richText": [ @@ -564,214 +481,150 @@ ] } ], - "variables": [ - { "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" }, - { "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" }, - { "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" }, - { "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" } - ], "edges": [ { - "from": { - "groupId": "cl1seoz560000xk1ags8s67b0", - "blockId": "cl1seoz570001xk1ab0rd05k6" - }, - "to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" }, - "id": "cl1seraz9001z2e6e85zrx08l" + "id": "cl1seraz9001z2e6e85zrx08l", + "from": { "eventId": "cl1seoz560000xk1ags8s67b0" }, + "to": { "groupId": "cl1sep1c5001w2e6e77bb1uwb" } }, { + "id": "cl1sezo4z00292e6ean8s487x", "from": { - "groupId": "cl1sern8w00202e6ez69l190j", "blockId": "cl1ses31000222e6ebrb4wxo0", "itemId": "cl1ses31100232e6eq3nnp2mm" }, - "to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" }, - "id": "cl1sezo4z00292e6ean8s487x" + "to": { "groupId": "cl1sez6zd00262e6ebh59k1bs" } }, { - "from": { - "groupId": "cl1sez6zd00262e6ebh59k1bs", - "blockId": "cl1sezlw700282e6eozkzmed0" - }, - "to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" }, - "id": "cl1sf1mm0002h2e6eurv21l5n" + "id": "cl1sf1mm0002h2e6eurv21l5n", + "from": { "blockId": "cl1sezlw700282e6eozkzmed0" }, + "to": { "groupId": "cl1sf0ogu002d2e6edyhcuu6f" } }, { + "id": "cl1sf35fh002t2e6e8u68r9gz", "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "blockId": "cl1sf1vkf002j2e6e971somqx", "itemId": "cl1sf1vkg002k2e6ec54p0s4v" }, - "to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" }, - "id": "cl1sf35fh002t2e6e8u68r9gz" + "to": { "groupId": "cl1sf2wnu002r2e6ehdp859qv" } }, { + "id": "cl1sf37rv002x2e6e7wz3lawd", "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", "blockId": "cl1sf2iix002n2e6egibs95yb", "itemId": "cl1sf2iix002o2e6eai567rnj" }, - "to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" }, - "id": "cl1sf37rv002x2e6e7wz3lawd" + "to": { "groupId": "cl1sf36ia002u2e6e16ifow0z" } }, { + "id": "cl1sf7qlx003h2e6e60635qrt", "from": { - "groupId": "cl1sf4qk500332e6e8gs5mn3t", "blockId": "cl1sf738d003c2e6eswslikio", "itemId": "cl1sf738d003d2e6eqpzlxh8f" }, - "to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" }, - "id": "cl1sf7qlx003h2e6e60635qrt" + "to": { "groupId": "cl1sf7jbi003f2e6euy48woy4" } }, { - "from": { - "groupId": "cl1sep1c5001w2e6e77bb1uwb", - "blockId": "cl1sezuul002a2e6ex7nc444j" - }, - "to": { "groupId": "cl1sern8w00202e6ez69l190j" }, - "id": "cl1sf8v96003k2e6e2rbcfjmz" + "id": "cl1sf8v96003k2e6e2rbcfjmz", + "from": { "blockId": "cl1sezuul002a2e6ex7nc444j" }, + "to": { "groupId": "cl1sern8w00202e6ez69l190j" } }, { - "from": { - "groupId": "cl1sf7jbi003f2e6euy48woy4", - "blockId": "cl1sf7jcx003g2e6ec1z9xh0w" - }, - "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }, - "id": "cl1sf99bb003m2e6eywy661ww" + "id": "cl1sf99bb003m2e6eywy661ww", + "from": { "blockId": "cl1sf7jcx003g2e6ec1z9xh0w" }, + "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" } }, { - "from": { - "groupId": "cl1sf4qk500332e6e8gs5mn3t", - "blockId": "cl1sf738d003c2e6eswslikio" - }, - "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" }, - "id": "cl1sf9acz003n2e6ekwjq7209" + "id": "cl1sf9acz003n2e6ekwjq7209", + "from": { "blockId": "cl1sf738d003c2e6eswslikio" }, + "to": { "groupId": "cl1sf85am003i2e6e1yq8eoa7" } }, { + "id": "cl1sfebs9004a2e6ere0zokyo", "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "blockId": "cl1sfbbw3003t2e6e16ec9w29", "itemId": "cl1sfbtz8003w2e6eodbt4ogs" }, - "to": { "groupId": "cl1sfdroa00452e6e5o458z9h" }, - "id": "cl1sfebs9004a2e6ere0zokyo" + "to": { "groupId": "cl1sfdroa00452e6e5o458z9h" } }, { + "id": "cl1sfedcd004b2e6eerh8hz33", "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", "blockId": "cl1sfbbw3003t2e6e16ec9w29", "itemId": "cl1sfc545003x2e6e833juo6m" }, - "to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" }, - "id": "cl1sfedcd004b2e6eerh8hz33" + "to": { "groupId": "cl1sfe2kn00472e6ead4qs2d9" } }, { - "from": { - "groupId": "cl1sfdroa00452e6e5o458z9h", - "blockId": "cl1sfdrpi00462e6emfd9sj14" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfeg2k004c2e6eu9rjnski" + "id": "cl1sfeg2k004c2e6eu9rjnski", + "from": { "blockId": "cl1sfdrpi00462e6emfd9sj14" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sfe2kn00472e6ead4qs2d9", - "blockId": "cl1sfe2kn00482e6eukp8r9bj" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfeik5004d2e6ejj03f1gn" + "id": "cl1sfeik5004d2e6ejj03f1gn", + "from": { "blockId": "cl1sfe2kn00482e6eukp8r9bj" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sfbbv0003s2e6eheyhv7ke", - "blockId": "cl1sfbbw3003t2e6e16ec9w29" - }, - "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" }, - "id": "cl1sfek9r004e2e6elkh3h7a2" + "id": "cl1sfek9r004e2e6elkh3h7a2", + "from": { "blockId": "cl1sfbbw3003t2e6e16ec9w29" }, + "to": { "groupId": "cl1sf4qk500332e6e8gs5mn3t" } }, { - "from": { - "groupId": "cl1sf0ogu002d2e6edyhcuu6f", - "blockId": "cl1sf2iix002n2e6egibs95yb" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfen6a004f2e6estkfooss" + "id": "cl1sfen6a004f2e6estkfooss", + "from": { "blockId": "cl1sf2iix002n2e6egibs95yb" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { - "from": { - "groupId": "cl1sf36ia002u2e6e16ifow0z", - "blockId": "cl1sf36ib002v2e6ejyyrrjnh" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfeog5004g2e6eiil842nb" + "id": "cl1sfeog5004g2e6eiil842nb", + "from": { "blockId": "cl1sf36ib002v2e6ejyyrrjnh" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { - "from": { - "groupId": "cl1sf2wnu002r2e6ehdp859qv", - "blockId": "cl1sf2wom002s2e6e8cmcnhpn" - }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfeq3f004h2e6eglhjyx2o" + "id": "cl1sfeq3f004h2e6eglhjyx2o", + "from": { "blockId": "cl1sf2wom002s2e6e8cmcnhpn" }, + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { + "id": "cl1sfertf004i2e6epf68fwri", "from": { - "groupId": "cl1sern8w00202e6ez69l190j", "blockId": "cl1ses31000222e6ebrb4wxo0", "itemId": "cl1ses3y400242e6e1qjwkhq4" }, - "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" }, - "id": "cl1sfertf004i2e6epf68fwri" + "to": { "groupId": "cl1sfbbv0003s2e6eheyhv7ke" } }, { + "id": "cl1sfg9fc004k2e6egywpim9v", "from": { - "groupId": "cl1sf85am003i2e6e1yq8eoa7", "blockId": "cl1sfat0h003p2e6e7j0hpilh", "itemId": "cl1sfat0h003q2e6eyx6vxe0f" }, - "to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" }, - "id": "cl1sfg9fc004k2e6egywpim9v" + "to": { "groupId": "cl1sffxet004j2e6ec6gfbffh" } }, { - "from": { - "groupId": "cl1sf85am003i2e6e1yq8eoa7", - "blockId": "cl1sfat0h003p2e6e7j0hpilh" - }, - "to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" }, - "id": "cl1sfgtau004n2e6ev68sikcr" + "id": "cl1sfgtau004n2e6ev68sikcr", + "from": { "blockId": "cl1sfat0h003p2e6e7j0hpilh" }, + "to": { "groupId": "cl1sfgjlr004l2e6erykli1ud" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [ + { "id": "vcl1sezzln002b2e6e6ssxh9bf", "name": "Lead Score" }, + { "id": "vcl1sf1ko5002g2e6egjmyb16v", "name": "Team size" }, + { "id": "vcl1sf525q00362e6eoyosycte", "name": "Country" }, + { "id": "vcl1sf93s2003l2e6eojomb66g", "name": "Company" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-06T16:55:57.664Z", + "updatedAt": "2023-11-06T16:55:57.664Z", + "icon": "🏆", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/movie-recommendation.json b/apps/builder/public/templates/movie-recommendation.json index e40b70b4ea..369b6f0b10 100644 --- a/apps/builder/public/templates/movie-recommendation.json +++ b/apps/builder/public/templates/movie-recommendation.json @@ -1,34 +1,24 @@ { - "id": "d8z3y5ats5r0lyptw938re79", - "version": "4", - "createdAt": "2023-08-06T05:56:35.727Z", - "updatedAt": "2023-08-06T06:39:16.019Z", - "icon": "🍿", + "version": "6", + "id": "cloo0wet7000h1aor38uwjxjw", "name": "Movie recommendation", - "folderId": null, - "groups": [ + "events": [ { "id": "u6lpjibfjhyoqij5wjf9kvnl", - "title": "Start", - "blocks": [ - { - "id": "rha69fygov33vym1hf6z837p", - "type": "start", - "label": "Start", - "groupId": "u6lpjibfjhyoqij5wjf9kvnl", - "outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "wfec8f4e1jtden2wqna6nrso", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "mjnkukpkpvf4ha2g4n5m804v", "title": "Menu", + "graphCoordinates": { "x": 243.1, "y": 12.32 }, "blocks": [ { "id": "kjlf184vxf0uorniwje28iqb", "type": "Set variable", - "groupId": "mjnkukpkpvf4ha2g4n5m804v", "options": { "variableId": "vh5bxx07kl3016wr1undh2yb3", "expressionToEvaluate": "2f584d1ffe2b7fb082dd4e05038e9bd7" @@ -46,16 +36,14 @@ ] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "c7swi84rmdvrul0wz5kxtplm", "type": "image", "content": { "url": "https://media3.giphy.com/media/BElb9DVpHezcZufOhl/giphy-downsized.gif?cid=fe3852a3uwhsp1sc3j6avr625v5e94h1v8o3wfb1ii3xwswk&rid=giphy-downsized.gif&ct=g" - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "nlihfc4ptxnxoktqblh6mcql", @@ -67,16 +55,14 @@ "children": [{ "text": "It is powered by The Movie DB API 🚀" }] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "vr73urm54d9mq2oqg7ey1xh8", "type": "image", "content": { "url": "https://www.themoviedb.org/assets/2/v4/logos/v2/blue_square_1-5bdc75aaebeb75dc7ae79426ddd9be3b2be1e342510f8202baf6bffa71d7f5c4.svg" - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "g5yyuh9g75x7xa7fgqhhi1zz", @@ -85,8 +71,7 @@ "richText": [ { "type": "p", "children": [{ "text": "How can I we help?" }] } ] - }, - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + } }, { "id": "tzf45bvd8iquoxz7qgta8v94", @@ -94,76 +79,65 @@ "items": [ { "id": "kaimvzg9igdtktgou5m3s1bw", - "type": 0, - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "content": "Select a genre 💅", - "outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj" + "outgoingEdgeId": "t8qyjpigrz7cdl8gxl1wxlwj", + "content": "Select a genre 💅" }, { "id": "i8ls2f8inq2ovuijj6l7rbcq", - "type": 0, - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "content": "See what's trending 🔝", - "outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu" + "outgoingEdgeId": "tjn2ljosqyd4aj9dk8mnifsu", + "content": "See what's trending 🔝" } - ], - "groupId": "mjnkukpkpvf4ha2g4n5m804v", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 255.25, "y": 172.89 } + ] }, { "id": "kq1g5z6pz4buot7sawqdrr3s", "title": "Genre", + "graphCoordinates": { "x": 607.85, "y": 295.32 }, "blocks": [ { "id": "ecwz96cghzp4ji3lyx7taxt1", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] - }, - "groupId": "kq1g5z6pz4buot7sawqdrr3s" + } }, { "id": "gd4lt2pcljer6zaf7v9hkr1k", "type": "Webhook", - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { - "webhook": { - "id": "t4pht3ndfc8tu9geovi7czqm", - "url": "https://api.themoviedb.org/3/genre/movie/list", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "gq6m7x2k20qzrj752qi2zpmu", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" } ], "responseVariableMapping": [ { "id": "bm186wvb4e2aqj1myx5gc251", - "bodyPath": "data.genres.flatMap(item => item.name)", - "variableId": "vx0bbqzug4vk3zpc31ly8k7al" + "variableId": "vx0bbqzug4vk3zpc31ly8k7al", + "bodyPath": "data.genres.flatMap(item => item.name)" }, { "id": "xsrhvxf3hv74e2hkokmdflbc", - "bodyPath": "data.genres.flatMap(item => item.id)", - "variableId": "vwc00rydyp035vtb0nlaqyzwr" + "variableId": "vwc00rydyp035vtb0nlaqyzwr", + "bodyPath": "data.genres.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "gq6m7x2k20qzrj752qi2zpmu", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/genre/movie/list" + } } }, { @@ -176,99 +150,82 @@ "children": [{ "text": "Select your desired genre 👇" }] } ] - }, - "groupId": "kq1g5z6pz4buot7sawqdrr3s" + } }, { "id": "nwuk2clo78hmnh4d0g31u9xg", "type": "choice input", "items": [ - { - "id": "ri3avm9p0i96p8gx4028b6ye", - "type": 0, - "blockId": "eqm19tzeh7kullwld8auoqy4", - "content": "Click to edit" - } + { "id": "ri3avm9p0i96p8gx4028b6ye", "content": "Click to edit" } ], - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { "variableId": "vkmbb3rb2hcfd2io1fhf7rz5x", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vx0bbqzug4vk3zpc31ly8k7al" } }, { "id": "j7pm34um4piuyabwlobjc356", + "outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd", "type": "Set variable", - "groupId": "kq1g5z6pz4buot7sawqdrr3s", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vwewa4yugqch2sswdpneszk3i", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vkmbb3rb2hcfd2io1fhf7rz5x", "baseListVariableId": "vx0bbqzug4vk3zpc31ly8k7al", "targetListVariableId": "vwc00rydyp035vtb0nlaqyzwr" - }, - "expressionToEvaluate": "{{Genre IDs}}.at({{Genres}}.indexOf({{Selected genre}}))" - }, - "outgoingEdgeId": "tfuuwjnpn7mftd5s65mbhytd" + } + } } - ], - "graphCoordinates": { "x": 630.85, "y": 333.68 } + ] }, { "id": "d6v9lh83c7zuwrhf2mmo6nxo", "title": "Trending", + "graphCoordinates": { "x": 599.83, "y": 880.98 }, "blocks": [ { "id": "edokvbp15ubqeuydw9n7wf4w", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Sure!" }] }] - }, - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" + } }, { "id": "pwxb57b8nc2bp764vcdstois", "type": "Webhook", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { - "webhook": { - "id": "a5oaijpqxo5a0mqrnjqg3tyt", - "url": "https://api.themoviedb.org/3/trending/movie/week", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "x9nxr63itm2lvbe8dmi53mi7", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" } ], "responseVariableMapping": [ { "id": "g5ga79m1dzgp28chaxlj2i72", - "bodyPath": "data.results.flatMap(item => item.title)", - "variableId": "vkzk96oh1pmdjv2bt5ps60qc0" + "variableId": "vkzk96oh1pmdjv2bt5ps60qc0", + "bodyPath": "data.results.flatMap(item => item.title)" }, { "id": "albmykstahw37np5gjuafxie", - "bodyPath": "data.results.flatMap(item => item.id)", - "variableId": "vcmybxcoaytd2geo5sqx7v8hw" + "variableId": "vcmybxcoaytd2geo5sqx7v8hw", + "bodyPath": "data.results.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "x9nxr63itm2lvbe8dmi53mi7", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/trending/movie/week" + } } }, { @@ -281,51 +238,39 @@ "children": [{ "text": "Here are popular movies this week 👇" }] } ] - }, - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" + } }, { "id": "krcvvncnqtn99v0qe1dzudrk", "type": "choice input", "items": [ - { - "id": "dicb6lnv5kapkq0tygnx1abh", - "type": 0, - "blockId": "stlcncbupmsjxjipi86s45hy", - "content": "Click to edit" - } + { "id": "dicb6lnv5kapkq0tygnx1abh", "content": "Click to edit" } ], - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { "variableId": "vulnb1om2fk8mvkcesl8s15cr", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vkzk96oh1pmdjv2bt5ps60qc0" } }, { "id": "mgn6uuw2yebmengsukjramjx", + "outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx", "type": "Set variable", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vulnb1om2fk8mvkcesl8s15cr", "baseListVariableId": "vkzk96oh1pmdjv2bt5ps60qc0", "targetListVariableId": "vcmybxcoaytd2geo5sqx7v8hw" - }, - "expressionToEvaluate": "{{Trending IDs}}.at({{Trending Movies}}.indexOf({{Selected Trending Movie}}))" - }, - "outgoingEdgeId": "ual6xszx6tfcxqrnihc6zrvx" + } + } } - ], - "graphCoordinates": { "x": 628.03, "y": 965.53 } + ] }, { "id": "v35sky44jzz9fkwwul2qxufl", "title": "Movies by genre", + "graphCoordinates": { "x": 952.84, "y": 294.85 }, "blocks": [ { "id": "g2pgwx5yr1ou9vkoy6gdwuor", @@ -341,102 +286,86 @@ ] } ] - }, - "groupId": "v35sky44jzz9fkwwul2qxufl" + } }, { "id": "a2datk3pv8o6xgitwjsq61m2", "type": "Webhook", - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { - "webhook": { - "id": "em7huyvp98pd6hr25md0l6hb", - "url": "https://api.themoviedb.org/3/discover/movie", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "mgwlp399a056o9jo93tjqp02", - "key": "api_key", - "value": "{{API Key}}" - }, - { - "id": "dv4wioynywqo57jq8lakq3yr", - "key": "with_genres", - "value": "{{Selected genre ID}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" }, { "id": "rofxlzwrcv1ksy8aub8cfi6p", - "value": "16", - "variableId": "vwewa4yugqch2sswdpneszk3i" + "variableId": "vwewa4yugqch2sswdpneszk3i", + "value": "16" } ], "responseVariableMapping": [ { "id": "w8k1bxjsfkjxt64eev1ib96w", - "bodyPath": "data.results.flatMap(item => item.title)", - "variableId": "vad8vq3jfyybxo4la57hfd529" + "variableId": "vad8vq3jfyybxo4la57hfd529", + "bodyPath": "data.results.flatMap(item => item.title)" }, { "id": "zysikjyevakboax3czzec7nt", - "bodyPath": "data.results.flatMap(item => item.id)", - "variableId": "vhc2pc1sv4xc778r9od2ctooz" + "variableId": "vhc2pc1sv4xc778r9od2ctooz", + "bodyPath": "data.results.flatMap(item => item.id)" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "mgwlp399a056o9jo93tjqp02", + "key": "api_key", + "value": "{{API Key}}" + }, + { + "id": "dv4wioynywqo57jq8lakq3yr", + "key": "with_genres", + "value": "{{Selected genre ID}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/discover/movie" + } } }, { "id": "tr5y76tx9ca336f8ob9odfa6", "type": "choice input", "items": [ - { - "id": "uy2xwxoqhqol852cqsq17r9l", - "type": 0, - "blockId": "dxp0gakw90f3ckahjuphx5ir", - "content": "Click to edit" - } + { "id": "uy2xwxoqhqol852cqsq17r9l", "content": "Click to edit" } ], - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { "variableId": "vyyr3j2pu76uzvf88laai8snl", - "buttonLabel": "Send", - "isMultipleChoice": false, "dynamicVariableId": "vad8vq3jfyybxo4la57hfd529" } }, { "id": "vudr8jrv2k3x0ubemt39tv7a", + "outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9", "type": "Set variable", - "groupId": "v35sky44jzz9fkwwul2qxufl", "options": { - "type": "Map item with same index", - "isCode": true, "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "type": "Map item with same index", "mapListItemParams": { "baseItemVariableId": "vyyr3j2pu76uzvf88laai8snl", "baseListVariableId": "vad8vq3jfyybxo4la57hfd529", "targetListVariableId": "vhc2pc1sv4xc778r9od2ctooz" - }, - "expressionToEvaluate": "const movieIndex = {{Movies}}.indexOf({{Selected Movie}})\n\nreturn {{Movie IDs}}.at(movieIndex)" - }, - "outgoingEdgeId": "r4wyd2185zhen98r5pmx53g9" + } + } } - ], - "graphCoordinates": { "x": 977.48, "y": 330.85 } + ] }, { "id": "uozlg88loeb8xegu6y4le6k8", "title": "Movie details", + "graphCoordinates": { "x": 1151.05, "y": 913.34 }, "blocks": [ { "id": "ve9m7fromxw4tbm8558n8520", @@ -445,66 +374,59 @@ "richText": [ { "type": "p", "children": [{ "text": "Excellent choice 🔥" }] } ] - }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + } }, { "id": "xag9d5i5td40kdt3poyq5g4b", "type": "Webhook", - "groupId": "uozlg88loeb8xegu6y4le6k8", "options": { - "webhook": { - "id": "ewrjdmbrm2yksvjrbp0z9duy", - "url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}", - "method": "GET", - "headers": [], - "queryParams": [ - { - "id": "f33u3unbezibfdv54kbkien3", - "key": "api_key", - "value": "{{API Key}}" - } - ] - }, - "isCustomBody": false, - "isAdvancedConfig": true, "variablesForTest": [ { "id": "oqbhwya4cewto5pfjmftjmpn", - "value": "2f584d1ffe2b7fb082dd4e05038e9bd7", - "variableId": "vh5bxx07kl3016wr1undh2yb3" + "variableId": "vh5bxx07kl3016wr1undh2yb3", + "value": "2f584d1ffe2b7fb082dd4e05038e9bd7" }, { "id": "ja5qwkznouhm00x8zvlghuk4", - "value": "965839", - "variableId": "vzslfw8oyo1f08uo5rpkegn0x" + "variableId": "vzslfw8oyo1f08uo5rpkegn0x", + "value": "965839" } ], "responseVariableMapping": [ { "id": "dsfek7nejs1a7qqs4v61z709", - "bodyPath": "data.imdb_id", - "variableId": "vdvjx1w1sorma4zq0qtsdqrdi" + "variableId": "vdvjx1w1sorma4zq0qtsdqrdi", + "bodyPath": "data.imdb_id" }, { "id": "dtd0rrmz04m5gsi1gq855v1d", - "bodyPath": "data.overview", - "variableId": "vzns0wpumgo8vxjdty2w5t54a" + "variableId": "vzns0wpumgo8vxjdty2w5t54a", + "bodyPath": "data.overview" }, { "id": "y53g06r3xml0f3jmpctlsgm1", - "bodyPath": "data.poster_path", - "variableId": "vzf5ryexokpr4dihiur2spm8z" + "variableId": "vzf5ryexokpr4dihiur2spm8z", + "bodyPath": "data.poster_path" } - ] + ], + "isAdvancedConfig": true, + "webhook": { + "queryParams": [ + { + "id": "f33u3unbezibfdv54kbkien3", + "key": "api_key", + "value": "{{API Key}}" + } + ], + "method": "GET", + "url": "https://api.themoviedb.org/3/movie/{{Selected Movie ID}}" + } } }, { "id": "d0rsus9shxj8iowczbcaw53i", "type": "Set variable", - "groupId": "uozlg88loeb8xegu6y4le6k8", "options": { - "isCode": false, "variableId": "vwitf3um5uweynypc0hxxwm14", "expressionToEvaluate": "https://image.tmdb.org/t/p/w185{{Poster path}}" } @@ -512,8 +434,7 @@ { "id": "nqnry4c1z3wwcni8rwpduuhe", "type": "image", - "content": { "url": "{{Poster URL}}" }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + "content": { "url": "{{Poster URL}}" } }, { "id": "lhljw54rdykyqtjiuh6jsl5c", @@ -522,8 +443,7 @@ "richText": [ { "type": "p", "children": [{ "text": "{{Movie Overview}}" }] } ] - }, - "groupId": "uozlg88loeb8xegu6y4le6k8" + } }, { "id": "yifjhiamifo1y4ay7vols0mm", @@ -531,179 +451,132 @@ "items": [ { "id": "n4818dnrb4arw1xh5v0ot8vz", - "type": 0, - "blockId": "nahhsfc6hsok5sufxcknopxr", - "content": "Watch the movie", - "outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1" + "outgoingEdgeId": "fteu5frsbj8wejfhhwzuv8t1", + "content": "Watch the movie" }, { "id": "j9d1pf2tndax0itezys7t73c", - "type": 0, - "blockId": "nahhsfc6hsok5sufxcknopxr", + "outgoingEdgeId": "zb79atxs2itliks4d00e35uy", "content": "Find something else" } - ], - "groupId": "uozlg88loeb8xegu6y4le6k8", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "ntef5v9bt7vn4wg8s3dfm8yl" + ] } - ], - "graphCoordinates": { "x": 1151.05, "y": 913.34 } + ] }, { "id": "x4d8cdsyzoqz6vzsurnb8twc", "title": "Redirect to IMDB", + "graphCoordinates": { "x": 1523.21, "y": 1433.33 }, "blocks": [ { "id": "mw0e0bzwiokhndkkncp9niu2", "type": "Redirect", - "groupId": "x4d8cdsyzoqz6vzsurnb8twc", "options": { - "url": "https://m.imdb.com/title/{{IMDB ID}}", - "isNewTab": false + "url": "https://m.imdb.com/title/{{IMDB ID}}" } } - ], - "graphCoordinates": { "x": 1616.55, "y": 1411.44 } + ] }, { "id": "x9610wtdv125hg56wicm2qmv", - "title": "Return to menu", + "title": "", + "graphCoordinates": { "x": 1523.2, "y": 1620.1 }, "blocks": [ { "id": "efto9jivvcvomj3kltf57hbb", "type": "Jump", - "groupId": "x9610wtdv125hg56wicm2qmv", "options": { - "blockId": "sodsq9mcigwvogmwx0t4jvil", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" + "groupId": "mjnkukpkpvf4ha2g4n5m804v", + "blockId": "tzf45bvd8iquoxz7qgta8v94" } } - ], - "graphCoordinates": { "x": 1619.34, "y": 1586.5 } + ] } ], - "variables": [ - { "id": "vh5bxx07kl3016wr1undh2yb3", "name": "API Key" }, - { "id": "vx0bbqzug4vk3zpc31ly8k7al", "name": "Genres" }, - { "id": "vkmbb3rb2hcfd2io1fhf7rz5x", "name": "Selected genre" }, - { "id": "vwc00rydyp035vtb0nlaqyzwr", "name": "Genre IDs" }, - { "id": "vwewa4yugqch2sswdpneszk3i", "name": "Selected genre ID" }, - { "id": "vad8vq3jfyybxo4la57hfd529", "name": "Movies" }, - { "id": "vhc2pc1sv4xc778r9od2ctooz", "name": "Movie IDs" }, - { "id": "vyyr3j2pu76uzvf88laai8snl", "name": "Selected Movie" }, - { "id": "vzslfw8oyo1f08uo5rpkegn0x", "name": "Selected Movie ID" }, - { "id": "vdvjx1w1sorma4zq0qtsdqrdi", "name": "IMDB ID" }, - { "id": "vzns0wpumgo8vxjdty2w5t54a", "name": "Movie Overview" }, - { "id": "vzf5ryexokpr4dihiur2spm8z", "name": "Poster path" }, - { "id": "vwitf3um5uweynypc0hxxwm14", "name": "Poster URL" }, - { "id": "vkzk96oh1pmdjv2bt5ps60qc0", "name": "Trending Movies" }, - { "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" }, - { "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" } - ], "edges": [ { "id": "wfec8f4e1jtden2wqna6nrso", - "to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" }, - "from": { - "blockId": "rha69fygov33vym1hf6z837p", - "groupId": "u6lpjibfjhyoqij5wjf9kvnl" - } + "from": { "eventId": "u6lpjibfjhyoqij5wjf9kvnl" }, + "to": { "groupId": "mjnkukpkpvf4ha2g4n5m804v" } }, { "id": "t8qyjpigrz7cdl8gxl1wxlwj", - "to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" }, "from": { - "itemId": "kaimvzg9igdtktgou5m3s1bw", "blockId": "tzf45bvd8iquoxz7qgta8v94", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" - } + "itemId": "kaimvzg9igdtktgou5m3s1bw" + }, + "to": { "groupId": "kq1g5z6pz4buot7sawqdrr3s" } }, { "id": "tfuuwjnpn7mftd5s65mbhytd", - "to": { "groupId": "v35sky44jzz9fkwwul2qxufl" }, - "from": { - "blockId": "j7pm34um4piuyabwlobjc356", - "groupId": "kq1g5z6pz4buot7sawqdrr3s" - } + "from": { "blockId": "j7pm34um4piuyabwlobjc356" }, + "to": { "groupId": "v35sky44jzz9fkwwul2qxufl" } }, { "id": "r4wyd2185zhen98r5pmx53g9", - "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }, - "from": { - "blockId": "vudr8jrv2k3x0ubemt39tv7a", - "groupId": "v35sky44jzz9fkwwul2qxufl" - } + "from": { "blockId": "vudr8jrv2k3x0ubemt39tv7a" }, + "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" } }, { "id": "fteu5frsbj8wejfhhwzuv8t1", - "to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" }, "from": { - "itemId": "n4818dnrb4arw1xh5v0ot8vz", "blockId": "yifjhiamifo1y4ay7vols0mm", - "groupId": "uozlg88loeb8xegu6y4le6k8" - } + "itemId": "n4818dnrb4arw1xh5v0ot8vz" + }, + "to": { "groupId": "x4d8cdsyzoqz6vzsurnb8twc" } }, { "id": "tjn2ljosqyd4aj9dk8mnifsu", - "to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" }, "from": { - "itemId": "i8ls2f8inq2ovuijj6l7rbcq", "blockId": "tzf45bvd8iquoxz7qgta8v94", - "groupId": "mjnkukpkpvf4ha2g4n5m804v" - } + "itemId": "i8ls2f8inq2ovuijj6l7rbcq" + }, + "to": { "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" } }, { - "id": "ntef5v9bt7vn4wg8s3dfm8yl", - "to": { "groupId": "x9610wtdv125hg56wicm2qmv" }, - "from": { - "blockId": "yifjhiamifo1y4ay7vols0mm", - "groupId": "uozlg88loeb8xegu6y4le6k8" - } + "id": "ual6xszx6tfcxqrnihc6zrvx", + "from": { "blockId": "mgn6uuw2yebmengsukjramjx" }, + "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" } }, { - "id": "ual6xszx6tfcxqrnihc6zrvx", - "to": { "groupId": "uozlg88loeb8xegu6y4le6k8" }, + "id": "zb79atxs2itliks4d00e35uy", "from": { - "blockId": "mgn6uuw2yebmengsukjramjx", - "groupId": "d6v9lh83c7zuwrhf2mmo6nxo" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0d253f" }, - "hostAvatar": { - "isEnabled": true + "blockId": "yifjhiamifo1y4ay7vols0mm", + "itemId": "j9d1pf2tndax0itezys7t73c" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#01b4e4" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "x9610wtdv125hg56wicm2qmv" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + ], + "variables": [ + { "id": "vh5bxx07kl3016wr1undh2yb3", "name": "API Key" }, + { "id": "vx0bbqzug4vk3zpc31ly8k7al", "name": "Genres" }, + { "id": "vkmbb3rb2hcfd2io1fhf7rz5x", "name": "Selected genre" }, + { "id": "vwc00rydyp035vtb0nlaqyzwr", "name": "Genre IDs" }, + { "id": "vwewa4yugqch2sswdpneszk3i", "name": "Selected genre ID" }, + { "id": "vad8vq3jfyybxo4la57hfd529", "name": "Movies" }, + { "id": "vhc2pc1sv4xc778r9od2ctooz", "name": "Movie IDs" }, + { "id": "vyyr3j2pu76uzvf88laai8snl", "name": "Selected Movie" }, + { "id": "vzslfw8oyo1f08uo5rpkegn0x", "name": "Selected Movie ID" }, + { "id": "vdvjx1w1sorma4zq0qtsdqrdi", "name": "IMDB ID" }, + { "id": "vzns0wpumgo8vxjdty2w5t54a", "name": "Movie Overview" }, + { "id": "vzf5ryexokpr4dihiur2spm8z", "name": "Poster path" }, + { "id": "vwitf3um5uweynypc0hxxwm14", "name": "Poster URL" }, + { "id": "vkzk96oh1pmdjv2bt5ps60qc0", "name": "Trending Movies" }, + { "id": "vcmybxcoaytd2geo5sqx7v8hw", "name": "Trending IDs" }, + { "id": "vulnb1om2fk8mvkcesl8s15cr", "name": "Selected Trending Movie" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:42:02.490Z", + "updatedAt": "2023-11-07T07:55:03.222Z", + "icon": "🍿", + "folderId": null, "publicId": null, "customDomain": null, + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/nps.json b/apps/builder/public/templates/nps.json index 38f0447acf..0525722872 100644 --- a/apps/builder/public/templates/nps.json +++ b/apps/builder/public/templates/nps.json @@ -1,37 +1,27 @@ { - "id": "clesntjqu00011a4xkgffc3p0", - "version": "4", - "createdAt": "2023-03-03T14:57:41.430Z", - "updatedAt": "2023-03-03T16:14:29.268Z", - "icon": "⭐", + "version": "6", + "id": "cloo0bge500071aorb4dadsju", "name": "NPS Survey", - "folderId": null, - "groups": [ + "events": [ { "id": "yu8qfeteutmum1ghb0wqshu9", - "title": "Start", - "blocks": [ - { - "id": "up8jk4o8xvbfqtzyd63hsrm5", - "type": "start", - "label": "Start", - "groupId": "yu8qfeteutmum1ghb0wqshu9", - "outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "qtd5p5sya9w8yoknvbhy493i", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "g7l1tc86ty1r6x0yn0r2g1xo", "title": "Intro", + "graphCoordinates": { "x": 10.99, "y": 85.96 }, "blocks": [ { "id": "vep990mmfbe64nqczp66xebw", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hey! 👋" }] }] - }, - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" + } }, { "id": "u1oeokc5j8bzwi4lwqyf7c8q", @@ -49,8 +39,7 @@ ] } ] - }, - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" + } }, { "id": "d3asw3zs2gahpxs3usun6lm5", @@ -58,21 +47,17 @@ "items": [ { "id": "wvjhc2vrkqy8512y0wvmciex", - "type": 0, - "blockId": "d3asw3zs2gahpxs3usun6lm5", - "content": "Sure!", - "outgoingEdgeId": "sjeyoptun1yu805ry37je1ni" + "outgoingEdgeId": "sjeyoptun1yu805ry37je1ni", + "content": "Sure!" } - ], - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 8.6484375, "y": 168.64453125 } + ] }, { "id": "xgqei015z6d58gefpviz8053", "title": "Recommendation", + "graphCoordinates": { "x": 360.5, "y": 86.64 }, "blocks": [ { "id": "jcp3qhpb4wf95g0ylrp4e8zb", @@ -88,74 +73,61 @@ ] } ] - }, - "groupId": "xgqei015z6d58gefpviz8053" + } }, { "id": "bfvv74k8oz57kaqeqek3uen7", "type": "rating input", - "groupId": "xgqei015z6d58gefpviz8053", "options": { + "variableId": "vwqc8tzl0380h30vxh07fekmm", "labels": { "left": "Very unlikely", - "right": "Very likely", - "button": "Send" + "right": "Very likely" }, - "length": 10, - "buttonType": "Numbers", - "customIcon": { "isEnabled": false }, - "variableId": "vwqc8tzl0380h30vxh07fekmm", "isOneClickSubmitEnabled": true } }, { "id": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "niec249stbfa2obm9mkd1pgw", "type": "Condition", "items": [ { "id": "xy6ni2aj5dxys27itzbtvdzw", - "type": 1, - "blockId": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc", "content": { "comparisons": [ { "id": "r7s1l7ljsv7ugnbaz4u3gy5a", - "value": "8", "variableId": "vwqc8tzl0380h30vxh07fekmm", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "8" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "zug5c4jy98sywgp1amtms6oc" + ] + } }, { "id": "vrhf4u4dt6u146eywqybgrk2", - "type": 1, - "blockId": "z76m5qjuy15sa6b0p1re0nkp", + "outgoingEdgeId": "qb38wjfqzksaujoppzrrto25", "content": { "comparisons": [ { "id": "chowr4hsu9butjlwo0ul874g", - "value": "6", "variableId": "vwqc8tzl0380h30vxh07fekmm", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "6" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "qb38wjfqzksaujoppzrrto25" + ] + } } - ], - "groupId": "xgqei015z6d58gefpviz8053", - "outgoingEdgeId": "niec249stbfa2obm9mkd1pgw" + ] } - ], - "graphCoordinates": { "x": 368.4088194304369, "y": 168.5078125 } + ] }, { "id": "rp2r31gn1w5t1aeej96bhjj3", "title": "Good", + "graphCoordinates": { "x": 1078.85, "y": 292.9 }, "blocks": [ { "id": "izehojk23xug74tylpm0wbib", @@ -167,11 +139,11 @@ "children": [{ "text": "I'm glad to hear that 😍" }] } ] - }, - "groupId": "rp2r31gn1w5t1aeej96bhjj3" + } }, { "id": "qj3e1cxwjub800r6g3lfa4ei", + "outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx", "type": "text", "content": { "richText": [ @@ -180,36 +152,33 @@ "children": [{ "text": "Could you tell us why?" }] } ] - }, - "groupId": "rp2r31gn1w5t1aeej96bhjj3", - "outgoingEdgeId": "hycn6wx0j9ug4wf5vzz9aytx" + } } - ], - "graphCoordinates": { "x": 1089.022509866445, "y": 366.18359375 } + ] }, { "id": "sk1n3wpfit3uvfrh42fgcykm", "title": "Why?", + "graphCoordinates": { "x": 1425.22, "y": 445.48 }, "blocks": [ { "id": "ro6a6dt7j3x99unduh5jm6an", + "outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1", "type": "text input", - "groupId": "sk1n3wpfit3uvfrh42fgcykm", "options": { - "isLong": true, - "labels": { "button": "Send", "placeholder": "Type your answer..." } - }, - "outgoingEdgeId": "y6gsa6pjrfeu8zi6evtzirs1" + "isLong": true + } } - ], - "graphCoordinates": { "x": 1448.80078125, "y": 435.79296875 } + ] }, { "id": "qj9qgsbfv6u1f5oe1bjnwnu9", "title": "Bad", + "graphCoordinates": { "x": 1067.22, "y": 575.86 }, "blocks": [ { "id": "ou7airondk1mxm4inzzyyr1x", + "outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1", "type": "text", "content": { "richText": [ @@ -218,67 +187,62 @@ "children": [{ "text": "Could you tell us what went wrong?" }] } ] - }, - "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9", - "outgoingEdgeId": "glj5ishgke8i6s6eyjnmbel1" + } } - ], - "graphCoordinates": { "x": 1089.9140625, "y": 574.9296875 } + ] }, { "id": "tavt0nuh54ck1hvq74kt74vf", "title": "Set type", + "graphCoordinates": { "x": 726.83, "y": 234.02 }, "blocks": [ { "id": "vdythdfi91vr47ipbfalddc6", + "outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2", "type": "Set variable", - "groupId": "tavt0nuh54ck1hvq74kt74vf", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Promoter" - }, - "outgoingEdgeId": "r74zv3gamsln3dbmp1gvxpa2" + } } - ], - "graphCoordinates": { "x": 740.34375, "y": 319.4375 } + ] }, { "id": "e887eoxfamv45hj8bz47jize", "title": "Set type", + "graphCoordinates": { "x": 722.39, "y": 399.91 }, "blocks": [ { "id": "w40rjuv0avoetpdj6l5nbiz6", + "outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81", "type": "Set variable", - "groupId": "e887eoxfamv45hj8bz47jize", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Neutral" - }, - "outgoingEdgeId": "x62wj4inzidyj03ktiyu0g81" + } } - ], - "graphCoordinates": { "x": 738.046875, "y": 480.91015625 } + ] }, { "id": "z4qtvedlz3mzcj4jdnfet2dc", "title": "Set type", + "graphCoordinates": { "x": 722.56, "y": 566.11 }, "blocks": [ { "id": "melr0p8nxssxe1qyat748uyy", + "outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi", "type": "Set variable", - "groupId": "z4qtvedlz3mzcj4jdnfet2dc", "options": { "variableId": "vcgkjbh8intf2cql1oteyj4mu", "expressionToEvaluate": "Detractor" - }, - "outgoingEdgeId": "q5xllqzy4x1q3tdvpr1piwgi" + } } - ], - "graphCoordinates": { "x": 738.5078125, "y": 635.96484375 } + ] }, { "id": "l7fupza0yi6os0ix6heyd7jz", "title": "Final segmentation", + "graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 }, "blocks": [ { "id": "z4gsshsckqdu6m1umartgxgb", @@ -286,64 +250,54 @@ "items": [ { "id": "vd6ls562brvt5kld746ao63x", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "fcels3dp2kabntjscmirxtl7", "content": { "comparisons": [ { "id": "gclfcip3hr0p4vzk5o8n60ru", - "value": "Promoter", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Promoter" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "fcels3dp2kabntjscmirxtl7" + ] + } }, { "id": "vey2i7kouphj3dgzz1rtwuxb", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d", "content": { "comparisons": [ { "id": "p7shnc0g3b377oip57r7xneq", - "value": "Neutral", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Neutral" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "jyen1rcq5cxek118gkio0u6d" + ] + } }, { "id": "cdi4c43wbyi3ajdns5klfg1g", - "type": 1, - "blockId": "z4gsshsckqdu6m1umartgxgb", + "outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo", "content": { "comparisons": [ { "id": "iy13qo2guletobbkauklye7a", - "value": "Detractor", "variableId": "vcgkjbh8intf2cql1oteyj4mu", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Detractor" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "jjymvdpeyfqu2qpo6hh2zxeo" + ] + } } - ], - "groupId": "l7fupza0yi6os0ix6heyd7jz" + ] } - ], - "graphCoordinates": { "x": 1777.5859375, "y": 396.8453917968819 } + ] }, { "id": "pp1ncsdaki07pfq5pjl53v6r", "title": "Capterra?", + "graphCoordinates": { "x": 2160.71875, "y": 69.58984375 }, "blocks": [ { "id": "eixinwxcgsng6v8blw6jdgwy", @@ -352,8 +306,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Thank you! 🙏" }] } ] - }, - "groupId": "pp1ncsdaki07pfq5pjl53v6r" + } }, { "id": "cjqu4wje2zr8i5ehivxv5567", @@ -367,8 +320,7 @@ ] } ] - }, - "groupId": "pp1ncsdaki07pfq5pjl53v6r" + } }, { "id": "v9pf4n5kcwon4g0yvwwc6vk3", @@ -376,28 +328,22 @@ "items": [ { "id": "y34d4iij8y9qrt28y240x7vm", - "type": 0, - "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "content": "Sure!", - "outgoingEdgeId": "lw33kviri91z1mvxb87kaew0" + "outgoingEdgeId": "lw33kviri91z1mvxb87kaew0", + "content": "Sure!" }, { "id": "l7txnq6jtm0niynklcpzb21u", - "type": 0, - "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "content": "Maybe later", - "outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf" + "outgoingEdgeId": "wjcvbnj1drs6if1p21a8yokf", + "content": "Maybe later" } - ], - "groupId": "pp1ncsdaki07pfq5pjl53v6r", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "graphCoordinates": { "x": 2160.71875, "y": 69.58984375 } + ] }, { "id": "znljx8q0q2ggih0ipu28ryby", "title": "Bye cheerful", + "graphCoordinates": { "x": 2167.570274174784, "y": 543.712381679639 }, "blocks": [ { "id": "m1my2b6gqq2hgfecw1vs2vcm", @@ -411,8 +357,7 @@ ] } ] - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } }, { "id": "fyl3k7qc6jdmc8t38b9wkcrh", @@ -421,23 +366,21 @@ "richText": [ { "type": "p", "children": [{ "text": "Have a beautiful day!" }] } ] - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } }, { "id": "qobvos2ihgxb8e729ur8b2rv", "type": "image", "content": { "url": "https://media3.giphy.com/media/qC2REWsp3fQ1v2mm74/giphy.gif?cid=fe3852a38k350b15tly68dp7plh5iskmlonklrofvce975cq&rid=giphy.gif&ct=g" - }, - "groupId": "znljx8q0q2ggih0ipu28ryby" + } } - ], - "graphCoordinates": { "x": 2167.5702741747837, "y": 543.712381679639 } + ] }, { "id": "vvbtgh5ptk49shyjn3zn6d71", "title": "Bye sad", + "graphCoordinates": { "x": 2173.366603864535, "y": 949.7063235658585 }, "blocks": [ { "id": "dfisk4xq8csn0t2aute6hbsd", @@ -453,8 +396,7 @@ ] } ] - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } }, { "id": "u6vs0akagfjg63zq8z1rcc14", @@ -471,23 +413,21 @@ ] } ] - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } }, { "id": "lfk1wt96u8yrtfkof6lrianc", "type": "image", "content": { "url": "https://media1.giphy.com/media/kaBU6pgv0OsPHz2yxy/giphy-downsized.gif?cid=fe3852a30aonhd3he63idx7116fsc1sydsan2ggr9uq4hs9j&rid=giphy-downsized.gif&ct=g" - }, - "groupId": "vvbtgh5ptk49shyjn3zn6d71" + } } - ], - "graphCoordinates": { "x": 2173.3666038645347, "y": 949.7063235658585 } + ] }, { "id": "mwfu8ot0z37zfq2fbo5rcyrl", "title": "Redirect Capterra", + "graphCoordinates": { "x": 2531.28515625, "y": 300.828125 }, "blocks": [ { "id": "cd8ftyg6tkjggncxuo242u3j", @@ -496,8 +436,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Amazing 🤩" }] } ] - }, - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" + } }, { "id": "nigypz7fhnt07440o0829o81", @@ -509,209 +448,148 @@ "children": [{ "text": "Let me take you there..." }] } ] - }, - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" + } }, { "id": "xr1or6dcptogabyvv6zepmw8", "type": "Wait", - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl", "options": { "secondsToWaitFor": "1" } }, { "id": "bfyw1eabougkp2aqlrcrf6lz", "type": "Redirect", - "groupId": "mwfu8ot0z37zfq2fbo5rcyrl", "options": { - "url": "https://www.capterra.com/p/233968/Typebot/", - "isNewTab": false + "url": "https://www.capterra.com/p/233968/Typebot/" } } - ], - "graphCoordinates": { "x": 2531.28515625, "y": 300.828125 } + ] } ], - "variables": [ - { "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" }, - { "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" } - ], "edges": [ { "id": "qtd5p5sya9w8yoknvbhy493i", - "to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" }, - "from": { - "blockId": "up8jk4o8xvbfqtzyd63hsrm5", - "groupId": "yu8qfeteutmum1ghb0wqshu9" - } + "from": { "eventId": "yu8qfeteutmum1ghb0wqshu9" }, + "to": { "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" } }, { "id": "glj5ishgke8i6s6eyjnmbel1", - "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }, - "from": { - "blockId": "ou7airondk1mxm4inzzyyr1x", - "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" - } + "from": { "blockId": "ou7airondk1mxm4inzzyyr1x" }, + "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" } }, { "id": "hycn6wx0j9ug4wf5vzz9aytx", - "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" }, - "from": { - "blockId": "qj3e1cxwjub800r6g3lfa4ei", - "groupId": "rp2r31gn1w5t1aeej96bhjj3" - } + "from": { "blockId": "qj3e1cxwjub800r6g3lfa4ei" }, + "to": { "groupId": "sk1n3wpfit3uvfrh42fgcykm" } }, { "id": "zug5c4jy98sywgp1amtms6oc", - "to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" }, "from": { - "itemId": "xy6ni2aj5dxys27itzbtvdzw", "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "itemId": "xy6ni2aj5dxys27itzbtvdzw" + }, + "to": { "groupId": "tavt0nuh54ck1hvq74kt74vf" } }, { "id": "niec249stbfa2obm9mkd1pgw", - "to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" }, - "from": { - "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "from": { "blockId": "z76m5qjuy15sa6b0p1re0nkp" }, + "to": { "groupId": "z4qtvedlz3mzcj4jdnfet2dc" } }, { "id": "qb38wjfqzksaujoppzrrto25", - "to": { "groupId": "e887eoxfamv45hj8bz47jize" }, "from": { - "itemId": "vrhf4u4dt6u146eywqybgrk2", "blockId": "z76m5qjuy15sa6b0p1re0nkp", - "groupId": "xgqei015z6d58gefpviz8053" - } + "itemId": "vrhf4u4dt6u146eywqybgrk2" + }, + "to": { "groupId": "e887eoxfamv45hj8bz47jize" } }, { "id": "r74zv3gamsln3dbmp1gvxpa2", - "to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" }, - "from": { - "blockId": "vdythdfi91vr47ipbfalddc6", - "groupId": "tavt0nuh54ck1hvq74kt74vf" - } + "from": { "blockId": "vdythdfi91vr47ipbfalddc6" }, + "to": { "groupId": "rp2r31gn1w5t1aeej96bhjj3" } }, { "id": "x62wj4inzidyj03ktiyu0g81", + "from": { "blockId": "w40rjuv0avoetpdj6l5nbiz6" }, "to": { - "blockId": "qj3e1cxwjub800r6g3lfa4ei", - "groupId": "rp2r31gn1w5t1aeej96bhjj3" - }, - "from": { - "blockId": "w40rjuv0avoetpdj6l5nbiz6", - "groupId": "e887eoxfamv45hj8bz47jize" + "groupId": "rp2r31gn1w5t1aeej96bhjj3", + "blockId": "qj3e1cxwjub800r6g3lfa4ei" } }, { "id": "q5xllqzy4x1q3tdvpr1piwgi", - "to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" }, - "from": { - "blockId": "melr0p8nxssxe1qyat748uyy", - "groupId": "z4qtvedlz3mzcj4jdnfet2dc" - } + "from": { "blockId": "melr0p8nxssxe1qyat748uyy" }, + "to": { "groupId": "qj9qgsbfv6u1f5oe1bjnwnu9" } }, { "id": "y6gsa6pjrfeu8zi6evtzirs1", - "to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" }, - "from": { - "blockId": "ro6a6dt7j3x99unduh5jm6an", - "groupId": "sk1n3wpfit3uvfrh42fgcykm" - } + "from": { "blockId": "ro6a6dt7j3x99unduh5jm6an" }, + "to": { "groupId": "l7fupza0yi6os0ix6heyd7jz" } }, { "id": "jjymvdpeyfqu2qpo6hh2zxeo", - "to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" }, "from": { - "itemId": "cdi4c43wbyi3ajdns5klfg1g", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } + "itemId": "cdi4c43wbyi3ajdns5klfg1g" + }, + "to": { "groupId": "vvbtgh5ptk49shyjn3zn6d71" } }, { "id": "jyen1rcq5cxek118gkio0u6d", - "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }, "from": { - "itemId": "vey2i7kouphj3dgzz1rtwuxb", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } + "itemId": "vey2i7kouphj3dgzz1rtwuxb" + }, + "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" } }, { "id": "wjcvbnj1drs6if1p21a8yokf", - "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" }, "from": { - "itemId": "l7txnq6jtm0niynklcpzb21u", "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "groupId": "pp1ncsdaki07pfq5pjl53v6r" - } + "itemId": "l7txnq6jtm0niynklcpzb21u" + }, + "to": { "groupId": "znljx8q0q2ggih0ipu28ryby" } }, { "id": "lw33kviri91z1mvxb87kaew0", - "to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" }, "from": { - "itemId": "y34d4iij8y9qrt28y240x7vm", "blockId": "v9pf4n5kcwon4g0yvwwc6vk3", - "groupId": "pp1ncsdaki07pfq5pjl53v6r" - } + "itemId": "y34d4iij8y9qrt28y240x7vm" + }, + "to": { "groupId": "mwfu8ot0z37zfq2fbo5rcyrl" } }, { "id": "sjeyoptun1yu805ry37je1ni", - "to": { "groupId": "xgqei015z6d58gefpviz8053" }, "from": { - "itemId": "wvjhc2vrkqy8512y0wvmciex", "blockId": "d3asw3zs2gahpxs3usun6lm5", - "groupId": "g7l1tc86ty1r6x0yn0r2g1xo" - } + "itemId": "wvjhc2vrkqy8512y0wvmciex" + }, + "to": { "groupId": "xgqei015z6d58gefpviz8053" } }, { "id": "fcels3dp2kabntjscmirxtl7", - "to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" }, "from": { - "itemId": "vd6ls562brvt5kld746ao63x", "blockId": "z4gsshsckqdu6m1umartgxgb", - "groupId": "l7fupza0yi6os0ix6heyd7jz" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" + "itemId": "vd6ls562brvt5kld746ao63x" }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "pp1ncsdaki07pfq5pjl53v6r" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + ], + "variables": [ + { "id": "vwqc8tzl0380h30vxh07fekmm", "name": "Recommend rate" }, + { "id": "vcgkjbh8intf2cql1oteyj4mu", "name": "Type" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:25:44.765Z", + "updatedAt": "2023-11-07T07:26:12.044Z", + "icon": "⭐", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/onboarding.json b/apps/builder/public/templates/onboarding.json index cdc01f27e7..ff0d42556b 100644 --- a/apps/builder/public/templates/onboarding.json +++ b/apps/builder/public/templates/onboarding.json @@ -1,29 +1,20 @@ { - "id": "qkvenb8ur2y0ahlbckmx7law", - "version": "4", - "createdAt": "2023-02-22T14:26:28.592Z", - "updatedAt": "2023-02-22T14:28:05.063Z", - "icon": null, + "version": "6", + "id": "cloo0gjvx00091aoryw72ns37", "name": "Onboarding copy", - "folderId": null, - "groups": [ + "events": [ { "id": "yp9qsayuwzhihxc7gzt68osm", - "title": "Start", - "blocks": [ - { - "id": "cl1265zct0001mb1afel460do", - "type": "start", - "label": "Start", - "groupId": "yp9qsayuwzhihxc7gzt68osm", - "outgoingEdgeId": "qehono05saho85xk59apfvtr" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "qehono05saho85xk59apfvtr", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "az9nafw4tu9b6dyh3cvutlek", "title": "Name", + "graphCoordinates": { "x": 247.01, "y": 1.45 }, "blocks": [ { "id": "cl1267q2c000e2e6dynjeg83n", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Welcome 👋" }] } ] - }, - "groupId": "az9nafw4tu9b6dyh3cvutlek" + } }, { "id": "cl1267y1u000f2e6d4rlglv6g", @@ -42,29 +32,22 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "az9nafw4tu9b6dyh3cvutlek" + } }, { "id": "cl126820m000g2e6dfleq78bt", + "outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j", "type": "text input", - "groupId": "az9nafw4tu9b6dyh3cvutlek", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "cl126f4hf000i2e6d8zvzc3t1" - }, - "outgoingEdgeId": "j6x356fbxo32zd9ezje77t4j" + } } - ], - "graphCoordinates": { "x": 329.13877189828236, "y": 5.648473810990222 } + ] }, { "id": "s3hgjtmb1bzq6ip2bm9w1r53", "title": "Company", + "graphCoordinates": { "x": 603.62, "y": 1.09 }, "blocks": [ { "id": "cl1266v6f000a2e6db7wj3ux7", @@ -73,8 +56,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Welcome {{Name}} 👋" }] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126hb9m000l2e6d5qk3mohn", @@ -90,8 +72,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126hpw1000m2e6dneousygl", @@ -107,8 +88,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126guhd000k2e6d6ypkex9z", @@ -122,8 +102,7 @@ ] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126ixp9000q2e6dslh0zypi", @@ -135,50 +114,37 @@ "children": [{ "text": "Do you work for a specific company?" }] } ] - }, - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" + } }, { "id": "cl126jb2q000r2e6dgqlnxnt8", "type": "choice input", "items": [ - { - "id": "cl126jb2q000s2e6dm60yq5p2", - "type": 0, - "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "content": "Yes" - }, + { "id": "cl126jb2q000s2e6dm60yq5p2", "content": "Yes" }, { "id": "cl126jc5a000t2e6dqv91w7j6", - "type": 0, - "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "content": "No", - "outgoingEdgeId": "dhva247te6v1cwfbte78bx4v" + "outgoingEdgeId": "dhva247te6v1cwfbte78bx4v", + "content": "No" } - ], - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] }, { "id": "cl126jioz000v2e6dwrk1f2cb", + "outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft", "type": "text input", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53", "options": { - "isLong": false, "labels": { - "button": "Send", "placeholder": "Type the company name..." }, "variableId": "cl126jqww000w2e6dq9yv4ifq" - }, - "outgoingEdgeId": "c5qdoivxsbhu1mkxkmw9yxft" + } } - ], - "graphCoordinates": { "x": 679.828061917379, "y": 3.351428911218571 } + ] }, { "id": "m8k3pv1rjckh3arxgitwo43i", "title": "Bot category", + "graphCoordinates": { "x": 972.94, "y": -0.07 }, "blocks": [ { "id": "cl126krck00112e6d1m6ctxpn", @@ -194,8 +160,7 @@ ] } ] - }, - "groupId": "m8k3pv1rjckh3arxgitwo43i" + } }, { "id": "cl126lb8v00142e6duv5qe08l", @@ -203,91 +168,57 @@ "items": [ { "id": "cl126onz9001g2e6dk0nbjeu6", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Lead qualification" }, { "id": "cl126lm6c00172e6d1pfvdiju", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Customer support" }, { "id": "cl126orr2001h2e6d0fqs7737", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Customer research" }, - { - "id": "cl126oudu001i2e6dktwi7qwv", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "User onboarding" - }, - { - "id": "cl126luv500192e6dl317ssyr", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "Quizzes" - }, + { "id": "cl126oudu001i2e6dktwi7qwv", "content": "User onboarding" }, + { "id": "cl126luv500192e6dl317ssyr", "content": "Quizzes" }, { "id": "cl126lz8q001a2e6d8b9lb3b5", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", "content": "Content distribution" }, - { - "id": "cl126nf7k001d2e6dg2zczjgz", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "FAQ" - }, - { - "id": "cl126ngy8001e2e6ddfo5s9fm", - "type": 0, - "blockId": "cl126lb8v00142e6duv5qe08l", - "content": "Other" - } + { "id": "cl126nf7k001d2e6dg2zczjgz", "content": "FAQ" }, + { "id": "cl126ngy8001e2e6ddfo5s9fm", "content": "Other" } ], - "groupId": "m8k3pv1rjckh3arxgitwo43i", "options": { "variableId": "cl126mo3t001b2e6dvyi16bkd", - "buttonLabel": "Send", "isMultipleChoice": true } }, { "id": "cl1278gyk002w2e6d744eb87n", + "outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku", "type": "Condition", "items": [ { "id": "cl1278gyk002x2e6dwmpzs3nf", - "type": 1, - "blockId": "cl1278gyk002w2e6d744eb87n", + "outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf", "content": { "comparisons": [ { "id": "cl1278irq002y2e6dv4965diw", - "value": "Other", "variableId": "cl126mo3t001b2e6dvyi16bkd", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Other" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "mgsnzw7w104odi0mz9qjg8hf" + ] + } } - ], - "groupId": "m8k3pv1rjckh3arxgitwo43i", - "outgoingEdgeId": "zvr4qou4drmkvyyikya9y6ku" + ] } - ], - "graphCoordinates": { "x": 1030.2081982319628, "y": -0.2818258211374715 } + ] }, { "id": "cnf2ljrlt875d005783ju7hc", "title": "Bye", + "graphCoordinates": { "x": 1522.31, "y": 220.27 }, "blocks": [ { "id": "cl126p76d001k2e6dbhnf2ysq", @@ -301,20 +232,17 @@ ] } ] - }, - "groupId": "cnf2ljrlt875d005783ju7hc" + } }, { "id": "cl126rfy6001t2e6d21gcb6b0", "type": "image", "content": { "url": "https://media4.giphy.com/media/l0amJzVHIAfl7jMDos/giphy.gif?cid=fe3852a3i4c33635xdtj3nesr9uq4zteujaab6b0jr42gpxx&rid=giphy.gif&ct=g" - }, - "groupId": "cnf2ljrlt875d005783ju7hc" + } }, { "id": "agi2i9xxed4jvv40rnrkf23r", - "groupId": "cnf2ljrlt875d005783ju7hc", "type": "text", "content": { "richText": [ @@ -322,12 +250,12 @@ ] } } - ], - "graphCoordinates": { "x": 1585.6402200792238, "y": 219.28927860860924 } + ] }, { "id": "hduy797g246pj8qnhsxy5kt5", "title": "Other category", + "graphCoordinates": { "x": 1310.68, "y": -6.8 }, "blocks": [ { "id": "cl127yxym000b2e6d9hksxo6h", @@ -336,126 +264,80 @@ "richText": [ { "type": "p", "children": [{ "text": "What else?" }] } ] - }, - "groupId": "hduy797g246pj8qnhsxy5kt5" + } }, { "id": "cl126pv7n001o2e6dajltc4qz", + "outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv", "type": "text input", - "groupId": "hduy797g246pj8qnhsxy5kt5", "options": { - "isLong": false, - "labels": { "button": "Send", "placeholder": "Type your answer" }, "variableId": "cl126q38p001q2e6d0hj23f6b" - }, - "outgoingEdgeId": "vk0mgizwhw761s9eo9lx88yv" + } } - ], - "graphCoordinates": { "x": 1369.6844213687823, "y": -7.90789096298402 } + ] } ], - "variables": [ - { "id": "cl126f4hf000i2e6d8zvzc3t1", "name": "Name" }, - { "id": "cl126jqww000w2e6dq9yv4ifq", "name": "Company" }, - { "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" }, - { "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" } - ], "edges": [ + { + "id": "qehono05saho85xk59apfvtr", + "from": { "eventId": "yp9qsayuwzhihxc7gzt68osm" }, + "to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" } + }, { "id": "dhva247te6v1cwfbte78bx4v", - "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }, "from": { - "itemId": "cl126jc5a000t2e6dqv91w7j6", "blockId": "cl126jb2q000r2e6dgqlnxnt8", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" - } + "itemId": "cl126jc5a000t2e6dqv91w7j6" + }, + "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" } }, { "id": "mgsnzw7w104odi0mz9qjg8hf", - "to": { "groupId": "hduy797g246pj8qnhsxy5kt5" }, "from": { - "itemId": "cl1278gyk002x2e6dwmpzs3nf", "blockId": "cl1278gyk002w2e6d744eb87n", - "groupId": "m8k3pv1rjckh3arxgitwo43i" - } + "itemId": "cl1278gyk002x2e6dwmpzs3nf" + }, + "to": { "groupId": "hduy797g246pj8qnhsxy5kt5" } }, { "id": "zvr4qou4drmkvyyikya9y6ku", - "to": { "groupId": "cnf2ljrlt875d005783ju7hc" }, - "from": { - "blockId": "cl1278gyk002w2e6d744eb87n", - "groupId": "m8k3pv1rjckh3arxgitwo43i" - } + "from": { "blockId": "cl1278gyk002w2e6d744eb87n" }, + "to": { "groupId": "cnf2ljrlt875d005783ju7hc" } }, { "id": "c5qdoivxsbhu1mkxkmw9yxft", - "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" }, - "from": { - "blockId": "cl126jioz000v2e6dwrk1f2cb", - "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" - } + "from": { "blockId": "cl126jioz000v2e6dwrk1f2cb" }, + "to": { "groupId": "m8k3pv1rjckh3arxgitwo43i" } }, { "id": "j6x356fbxo32zd9ezje77t4j", - "to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" }, - "from": { - "blockId": "cl126820m000g2e6dfleq78bt", - "groupId": "az9nafw4tu9b6dyh3cvutlek" - } - }, - { - "id": "qehono05saho85xk59apfvtr", - "to": { "groupId": "az9nafw4tu9b6dyh3cvutlek" }, - "from": { - "blockId": "cl1265zct0001mb1afel460do", - "groupId": "yp9qsayuwzhihxc7gzt68osm" - } + "from": { "blockId": "cl126820m000g2e6dfleq78bt" }, + "to": { "groupId": "s3hgjtmb1bzq6ip2bm9w1r53" } }, { "id": "vk0mgizwhw761s9eo9lx88yv", - "to": { "groupId": "cnf2ljrlt875d005783ju7hc" }, - "from": { - "blockId": "cl126pv7n001o2e6dajltc4qz", - "groupId": "hduy797g246pj8qnhsxy5kt5" - } + "from": { "blockId": "cl126pv7n001o2e6dajltc4qz" }, + "to": { "groupId": "cnf2ljrlt875d005783ju7hc" } } ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } - } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "variables": [ + { "id": "cl126f4hf000i2e6d8zvzc3t1", "name": "Name" }, + { "id": "cl126jqww000w2e6dq9yv4ifq", "name": "Company" }, + { "id": "cl126mo3t001b2e6dvyi16bkd", "name": "Categories" }, + { "id": "cl126q38p001q2e6d0hj23f6b", "name": "Other categories" } + ], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": {}, + "createdAt": "2023-11-07T07:29:42.573Z", + "updatedAt": "2023-11-07T07:30:16.347Z", + "icon": null, + "folderId": null, "publicId": null, "customDomain": null, - "workspaceId": "freeWorkspace", + "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/product-recommendation.json b/apps/builder/public/templates/product-recommendation.json index 4a8690206d..5a18fd7d28 100644 --- a/apps/builder/public/templates/product-recommendation.json +++ b/apps/builder/public/templates/product-recommendation.json @@ -1,29 +1,20 @@ { - "id": "mdbjvgqhqypbsdd0airkzcwu", - "version": "4", - "createdAt": "2023-06-05T15:40:37.278Z", - "updatedAt": "2023-06-05T15:45:43.049Z", - "icon": "🍫", + "version": "6", + "id": "clon5zh7w000e1avnec16apet", "name": "Product recommendation", - "folderId": null, - "groups": [ + "events": [ { "id": "af8ny8rpbejnlkitr2s29ro1", - "title": "Start", - "blocks": [ - { - "id": "li6nyybzaojujnz241jv5rr1", - "type": "start", - "label": "Start", - "groupId": "af8ny8rpbejnlkitr2s29ro1", - "outgoingEdgeId": "aj9vphwwva87uh9f1w7mm999" - } - ], - "graphCoordinates": { "x": 0, "y": 0 } - }, + "outgoingEdgeId": "aj9vphwwva87uh9f1w7mm999", + "graphCoordinates": { "x": 0, "y": 0 }, + "type": "start" + } + ], + "groups": [ { "id": "buk5exhk13g3npkaiaw87tvs", "title": "Continent", + "graphCoordinates": { "x": 367.8151290581508, "y": 175.39453125 }, "blocks": [ { "id": "ub5tforva9nlqky5lbrfrsdb", @@ -32,8 +23,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Ok {{Name}}" }] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "jaj0pyfmlf4hb4suglr3v0be", @@ -49,8 +39,7 @@ ] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "x6lj1mhze2xtc0h3ln42xg84", @@ -59,42 +48,26 @@ "richText": [ { "type": "p", "children": [{ "text": "Where do you live?" }] } ] - }, - "groupId": "buk5exhk13g3npkaiaw87tvs" + } }, { "id": "lwtynqjykiem5zdtns3fwhu2", + "outgoingEdgeId": "zlab2pp5tfih56jcw6vtjs03", "type": "choice input", "items": [ - { - "id": "b6mg694wlrmx4k1fgc46co57", - "type": 0, - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "content": "North America" - }, - { - "id": "fpey0ohbvgvg7b86y4ol8wr7", - "type": 0, - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "content": "Europe" - } + { "id": "b6mg694wlrmx4k1fgc46co57", "content": "North America" }, + { "id": "fpey0ohbvgvg7b86y4ol8wr7", "content": "Europe" } ], - "groupId": "buk5exhk13g3npkaiaw87tvs", "options": { - "variableId": "vma96g9rw8oaosc0ei2iacqig", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "zlab2pp5tfih56jcw6vtjs03" + "variableId": "vma96g9rw8oaosc0ei2iacqig" + } } - ], - "graphCoordinates": { "x": 367.81512905815083, "y": 175.39453125 } + ] }, { "id": "gafkgilrandk3cwydpzq21oy", "title": "Name", + "graphCoordinates": { "x": 21.63671875, "y": 176.3203125 }, "blocks": [ { "id": "mu6ygqqpi48dacy1n4xj6x4y", @@ -110,8 +83,7 @@ ] } ] - }, - "groupId": "gafkgilrandk3cwydpzq21oy" + } }, { "id": "w9rc4yf0ytnzqy16r938h094", @@ -120,29 +92,22 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your name?" }] } ] - }, - "groupId": "gafkgilrandk3cwydpzq21oy" + } }, { "id": "xobx3g928f9zj220n5qe1ih6", + "outgoingEdgeId": "gnh6uloe0a8ciwahgq0gnx4k", "type": "text input", - "groupId": "gafkgilrandk3cwydpzq21oy", "options": { - "isLong": false, - "labels": { - "button": "Send", - "placeholder": "Type your answer..." - }, "variableId": "vp1r2yrb6xgmi2aq3x6x73vaz" - }, - "outgoingEdgeId": "gnh6uloe0a8ciwahgq0gnx4k" + } } - ], - "graphCoordinates": { "x": 21.63671875, "y": 176.3203125 } + ] }, { "id": "z40ynhndj5r4038u3ha39c14", "title": "Sport", + "graphCoordinates": { "x": 721.140625, "y": 173.953125 }, "blocks": [ { "id": "xpbrytz3gucp0xzf1qs8mlwe", @@ -151,64 +116,48 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your sport?" }] } ] - }, - "groupId": "z40ynhndj5r4038u3ha39c14" + } }, { "id": "zesp4ro7ltjmh64sn8d4912c", + "outgoingEdgeId": "hwbbi48q0u8xnlqbpq53cdju", "type": "picture choice input", "items": [ { "id": "l4y5s4rz63g3kl91sq5h6401", - "type": 3, - "title": "Running", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1456613820599-bfe244172af5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHx0cmFpbHxlbnwwfDB8fHwxNjg1MzYyOTQ2fDA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1456613820599-bfe244172af5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHx0cmFpbHxlbnwwfDB8fHwxNjg1MzYyOTQ2fDA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Running" }, { "id": "urqlzmsiixatiamg06pexhsn", - "type": 3, - "title": "Cycling", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1545575439-3261931f52f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxjeWNsaW5nfGVufDB8MHx8fDE2ODUzNjI5NjJ8MA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1545575439-3261931f52f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxjeWNsaW5nfGVufDB8MHx8fDE2ODUzNjI5NjJ8MA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Cycling" }, { "id": "go2ko2zs5haeairrtfw7jqb2", - "type": 3, - "title": "Triathlon", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1627900258552-50850df9dbc5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHxUcmlhdGhsb258ZW58MHwwfHx8MTY4NTM2Mjk3N3ww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1627900258552-50850df9dbc5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw0fHxUcmlhdGhsb258ZW58MHwwfHx8MTY4NTM2Mjk3N3ww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Triathlon" }, { "id": "ctvsb2gsogkbaj9sxsgw25p9", - "type": 3, - "title": "Hiking", - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "pictureSrc": "https://images.unsplash.com/photo-1551632811-561732d1e306?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwyfHxIaWtpbmd8ZW58MHwwfHx8MTY4NTM2Mjk5NXww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1551632811-561732d1e306?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwyfHxIaWtpbmd8ZW58MHwwfHx8MTY4NTM2Mjk5NXww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Hiking" } - ], - "groupId": "z40ynhndj5r4038u3ha39c14", - "options": { - "buttonLabel": "Send", - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "hwbbi48q0u8xnlqbpq53cdju" + ] } - ], - "graphCoordinates": { "x": 721.140625, "y": 173.953125 } + ] }, { "id": "mncr0l180vs07gc1difaovjx", "title": "Gender", + "graphCoordinates": { "x": 1071, "y": 173.953125 }, "blocks": [ { "id": "ahuasm8oa058gl4np96qadox", "type": "text", "content": { "richText": [{ "type": "p", "children": [{ "text": "Nice! 😎" }] }] - }, - "groupId": "mncr0l180vs07gc1difaovjx" + } }, { "id": "phbeq3fg1jp2ktmz2blr6bzf", @@ -217,61 +166,27 @@ "richText": [ { "type": "p", "children": [{ "text": "What's your gender?" }] } ] - }, - "groupId": "mncr0l180vs07gc1difaovjx" + } }, { "id": "mfz600vwgfjcisahf5tdnz7l", + "outgoingEdgeId": "bf16js59cs2hmicrkbc7nv1q", "type": "choice input", "items": [ { "id": "zv2np66vgqoruntfh9h9vidx", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "♂️ Men", - "displayCondition": { - "condition": { - "comparisons": [ - { - "id": "r7gcyof1nhavgaap1uhvw3ox", - "value": "test", - "variableId": "vp1r2yrb6xgmi2aq3x6x73vaz", - "comparisonOperator": "Equal to" - } - ], - "logicalOperator": "AND" - }, - "isEnabled": false - } + "content": "♂️ Men" }, - { - "id": "w5e2h4n10u1l2pap1vtm68ma", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "♀️ Women" - }, - { - "id": "m1t9qrfs4z998ogqd4ttueus", - "type": 0, - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "content": "Other" - } - ], - "groupId": "mncr0l180vs07gc1difaovjx", - "options": { - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "bf16js59cs2hmicrkbc7nv1q" + { "id": "w5e2h4n10u1l2pap1vtm68ma", "content": "♀️ Women" }, + { "id": "m1t9qrfs4z998ogqd4ttueus", "content": "Other" } + ] } - ], - "graphCoordinates": { "x": 1071, "y": 173.953125 } + ] }, { "id": "mqt2qcyld5du8ecmbphjxpwu", "title": "Goals", + "graphCoordinates": { "x": 1412.34375, "y": 174.76953125 }, "blocks": [ { "id": "pksck9ppag8q24ou26ewgodw", @@ -285,50 +200,40 @@ ] } ] - }, - "groupId": "mqt2qcyld5du8ecmbphjxpwu" + } }, { "id": "cx2v8nfb4kxvk58bbu6w85uy", + "outgoingEdgeId": "drxu7gyz2trqjtv5nnfv1x9l", "type": "picture choice input", "items": [ { "id": "fmhwukhd2112743tgrmv85st", - "type": 3, - "title": "Energy", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1615845522103-82f98cd2a9de?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw5fHxlbmR1cmFuY2V8ZW58MHwwfHx8MTY4NTM2MzY3Nnww&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1615845522103-82f98cd2a9de?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw5fHxlbmR1cmFuY2V8ZW58MHwwfHx8MTY4NTM2MzY3Nnww&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Energy" }, { "id": "hkzoroc6mf9tt9g2uxppweay", - "type": 3, - "title": "Hydration", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1536044635785-467d51fc5880?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwxMnx8ZHJpbmslMjBzcG9ydHxlbnwwfDB8fHwxNjg1MzYzNzIxfDA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1536044635785-467d51fc5880?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHwxMnx8ZHJpbmslMjBzcG9ydHxlbnwwfDB8fHwxNjg1MzYzNzIxfDA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Hydration" }, { "id": "nn5629jaux41qo0fhl1yj3zi", - "type": 3, - "title": "Recovery", - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "pictureSrc": "https://images.unsplash.com/photo-1531403939386-c08a16cd7eef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxzdHJldGNofGVufDB8MHx8fDE2ODUzNjM2OTl8MA&ixlib=rb-4.0.3&q=80&w=1080" + "pictureSrc": "https://images.unsplash.com/photo-1531403939386-c08a16cd7eef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0MjU2MDR8MHwxfHNlYXJjaHw3fHxzdHJldGNofGVufDB8MHx8fDE2ODUzNjM2OTl8MA&ixlib=rb-4.0.3&q=80&w=1080", + "title": "Recovery" } ], - "groupId": "mqt2qcyld5du8ecmbphjxpwu", "options": { "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "drxu7gyz2trqjtv5nnfv1x9l" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 1412.34375, "y": 174.76953125 } + ] }, { "id": "n3zqahk50kb05th7zbycin5w", "title": "Protein source", + "graphCoordinates": { "x": 1745.61328125, "y": 183.87109375 }, "blocks": [ { "id": "ife4ujh1l5ljpp3x4gnram1z", @@ -342,42 +247,27 @@ ] } ] - }, - "groupId": "n3zqahk50kb05th7zbycin5w" + } }, { "id": "ogy9ng7q9jglxg2ivb39tzeh", + "outgoingEdgeId": "umuilo9l4t27kcpnx5ybnr08", "type": "choice input", "items": [ - { - "id": "exj60v3j83wx9yjbdsm8gwzj", - "type": 0, - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "content": "Cricket-based" - }, - { - "id": "kvqeznudz85jbqwxzfpwz8z8", - "type": 0, - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "content": "Plant-based" - } + { "id": "exj60v3j83wx9yjbdsm8gwzj", "content": "Cricket-based" }, + { "id": "kvqeznudz85jbqwxzfpwz8z8", "content": "Plant-based" } ], - "groupId": "n3zqahk50kb05th7zbycin5w", "options": { "variableId": "vlgo7i0r514jkd9a9f24otm4m", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "umuilo9l4t27kcpnx5ybnr08" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 1745.61328125, "y": 183.87109375 } + ] }, { "id": "y2jfx62oea6q0rxjby9tzqi6", "title": "Flavours", + "graphCoordinates": { "x": 2077.765625, "y": 182.74609375 }, "blocks": [ { "id": "muy0ptwahuy20bhs5b9npz2m", @@ -389,88 +279,38 @@ "children": [{ "text": "What are flavors do you enjoy?" }] } ] - }, - "groupId": "y2jfx62oea6q0rxjby9tzqi6" + } }, { "id": "p71conb1ln7f3m41ca6pxetz", + "outgoingEdgeId": "i3za7jvz8g7m7588g7i1ue9i", "type": "choice input", "items": [ { "id": "t7fkowjzn7eygfn6q1r4a8l9", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Chocolate", - "displayCondition": { - "condition": { "comparisons": [], "logicalOperator": "AND" }, - "isEnabled": false - } - }, - { - "id": "b1a0qlhtirnxqaqudskc4hnb", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Vanilla" - }, - { - "id": "vef4uodxrj05lp2i5k3uhdd5", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Berries" - }, - { - "id": "oyyx5j4j5fee37rc47adb5m8", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Caramel" - }, - { - "id": "myapux2pojdtbdy0gyc47rhq", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Nuts" - }, - { - "id": "aegltvuw163qqx88rwzjrg3v", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Coffee" - }, - { - "id": "zql5o66rry2ab3ofxa1y8kll", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Lime" + "content": "Chocolate" }, - { - "id": "ecvbkdakesh18zn5bfkylvt1", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Watermelon" - }, - { - "id": "b1xcrk5tv1b1rkjy40uhp44d", - "type": 0, - "blockId": "p71conb1ln7f3m41ca6pxetz", - "content": "Maple Syrup" - } + { "id": "b1a0qlhtirnxqaqudskc4hnb", "content": "Vanilla" }, + { "id": "vef4uodxrj05lp2i5k3uhdd5", "content": "Berries" }, + { "id": "oyyx5j4j5fee37rc47adb5m8", "content": "Caramel" }, + { "id": "myapux2pojdtbdy0gyc47rhq", "content": "Nuts" }, + { "id": "aegltvuw163qqx88rwzjrg3v", "content": "Coffee" }, + { "id": "zql5o66rry2ab3ofxa1y8kll", "content": "Lime" }, + { "id": "ecvbkdakesh18zn5bfkylvt1", "content": "Watermelon" }, + { "id": "b1xcrk5tv1b1rkjy40uhp44d", "content": "Maple Syrup" } ], - "groupId": "y2jfx62oea6q0rxjby9tzqi6", "options": { "variableId": "vhbd5800sc98l1lk8wf7fe742", - "buttonLabel": "Next", - "isSearchable": false, "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "i3za7jvz8g7m7588g7i1ue9i" + "buttonLabel": "Next" + } } - ], - "graphCoordinates": { "x": 2077.765625, "y": 182.74609375 } + ] }, { "id": "x14lejru0gv2c7afc68nuezy", "title": "Diet restrictions", + "graphCoordinates": { "x": 2424.828125, "y": 184.4765625 }, "blocks": [ { "id": "bwqiy7w4x6egwozthsvraeup", @@ -479,8 +319,7 @@ "richText": [ { "type": "p", "children": [{ "text": "Great choice 😋" }] } ] - }, - "groupId": "x14lejru0gv2c7afc68nuezy" + } }, { "id": "n6ns6i9z8qyk83wg5f8bn2j8", @@ -494,54 +333,28 @@ ] } ] - }, - "groupId": "x14lejru0gv2c7afc68nuezy" + } }, { "id": "cbcz08dj67rkx8k1cbj2ybz8", + "outgoingEdgeId": "erx9wo3svpfxs2cteknbhfaz", "type": "choice input", "items": [ - { - "id": "u9gi0gnaza6ottid74l82wlm", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Non GMO" - }, - { - "id": "yr7q8fcyi6l1sw83t37fjosj", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "No palm oil" - }, - { - "id": "gckqnnt2but4d6wwsfia3035", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Gluten free" - }, - { - "id": "m3qdwzep7uugpejvga0yqorg", - "type": 0, - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "content": "Nut free" - } + { "id": "u9gi0gnaza6ottid74l82wlm", "content": "Non GMO" }, + { "id": "yr7q8fcyi6l1sw83t37fjosj", "content": "No palm oil" }, + { "id": "gckqnnt2but4d6wwsfia3035", "content": "Gluten free" }, + { "id": "m3qdwzep7uugpejvga0yqorg", "content": "Nut free" } ], - "groupId": "x14lejru0gv2c7afc68nuezy", "options": { - "variableId": "vz4fqc40gkk99h0qeus2tjwhx", - "buttonLabel": "Send", - "isSearchable": false, - "isMultipleChoice": false, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "erx9wo3svpfxs2cteknbhfaz" + "variableId": "vz4fqc40gkk99h0qeus2tjwhx" + } } - ], - "graphCoordinates": { "x": 2424.828125, "y": 184.4765625 } + ] }, { "id": "q9z4xrzf9z7sgl69rrrhiyoh", "title": "Email", + "graphCoordinates": { "x": 2765.89453125, "y": 187.64453125 }, "blocks": [ { "id": "fynckthiy3zq7selucjvp44q", @@ -557,8 +370,7 @@ ] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "pbn0oib7yt3uspici7to3i9f", @@ -574,8 +386,7 @@ ] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "rez1phkqpkeoj7u2kzmde653", @@ -587,63 +398,53 @@ "children": [{ "text": "We will also send a little gift 🎁" }] } ] - }, - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" + } }, { "id": "vdzzxwdocfxdvqnqwwvjymzw", - "type": "email input", - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh", - "options": { - "labels": { "button": "Send", "placeholder": "Type your email..." }, - "retryMessageContent": "This email doesn't seem to be valid. Can you type it again?" - }, - "outgoingEdgeId": "vnqu52ld3usezpnrgu2l7ul0" + "outgoingEdgeId": "vnqu52ld3usezpnrgu2l7ul0", + "type": "email input" } - ], - "graphCoordinates": { "x": 2765.89453125, "y": 187.64453125 } + ] }, { "id": "g27q0psplvzht5xg9erxw738", "title": "If cricket", + "graphCoordinates": { "x": 3107.953125, "y": 187.3515625 }, "blocks": [ { "id": "l16y2qzslakgl2up4jybj5m4", + "outgoingEdgeId": "j6d1kch478t4ov4bbz1yshhl", "type": "Condition", "items": [ { "id": "yffl8ja17g5fr9rpi4d0cl36", - "type": 1, - "blockId": "l16y2qzslakgl2up4jybj5m4", + "outgoingEdgeId": "iszgvtfetursv4ktm9mdtxhy", "content": { "comparisons": [ { "id": "g995jwhkyj8e5tv4ci7gd5fi", - "value": "Cricket-based", "variableId": "vlgo7i0r514jkd9a9f24otm4m", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Cricket-based" }, { "id": "qjhmaage7fe1i5e0nscr0954", - "value": "Europe", "variableId": "vma96g9rw8oaosc0ei2iacqig", - "comparisonOperator": "Equal to" + "comparisonOperator": "Equal to", + "value": "Europe" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "iszgvtfetursv4ktm9mdtxhy" + ] + } } - ], - "groupId": "g27q0psplvzht5xg9erxw738", - "outgoingEdgeId": "j6d1kch478t4ov4bbz1yshhl" + ] } - ], - "graphCoordinates": { "x": 3107.953125, "y": 187.3515625 } + ] }, { "id": "qjoc17kdjrpkaoxesoeqzmjt", "title": "No cricket in Europe", + "graphCoordinates": { "x": 3452.45703125, "y": 113.35546875 }, "blocks": [ { "id": "c3m4f1kcyf3dnsdlykjrxytm", @@ -659,11 +460,11 @@ ] } ] - }, - "groupId": "qjoc17kdjrpkaoxesoeqzmjt" + } }, { "id": "pxb59zd4bjqmva9er47l6x15", + "outgoingEdgeId": "apvktyu7x3wks4z9xflecu91", "type": "text", "content": { "richText": [ @@ -676,80 +477,70 @@ ] } ] - }, - "groupId": "qjoc17kdjrpkaoxesoeqzmjt", - "outgoingEdgeId": "apvktyu7x3wks4z9xflecu91" + } } - ], - "graphCoordinates": { "x": 3452.45703125, "y": 113.35546875 } + ] }, { "id": "b94nqmbqp0ezfazu0kekqioa", "title": "If Energy", + "graphCoordinates": { "x": 3646.396113301624, "y": 447.8859463616741 }, "blocks": [ { "id": "okl6akklm8djknl7lofqr3cm", + "outgoingEdgeId": "xblzklrcdkmxeu8y5xbicz09", "type": "Condition", "items": [ { "id": "vyjgfexvyrijez06kpxi1mva", - "type": 1, - "blockId": "okl6akklm8djknl7lofqr3cm", + "outgoingEdgeId": "lk5ghbqljt2f43w1d47rowns", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Energy", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Energy" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "lk5ghbqljt2f43w1d47rowns" + ] + } } - ], - "groupId": "b94nqmbqp0ezfazu0kekqioa", - "outgoingEdgeId": "xblzklrcdkmxeu8y5xbicz09" + ] } - ], - "graphCoordinates": { "x": 3646.396113301624, "y": 447.8859463616741 } + ] }, { "id": "co7gxaoxtf1xukmgbby73u6v", "title": "If hydration", + "graphCoordinates": { "x": 4165.908336104726, "y": 568.072108305734 }, "blocks": [ { "id": "styhci2fh3yi17b7cmv3x8cc", + "outgoingEdgeId": "dyvib6xwm0jieqp37mac1diq", "type": "Condition", "items": [ { "id": "okd2sbmr1mgoubpf7kdjr9ey", - "type": 1, - "blockId": "styhci2fh3yi17b7cmv3x8cc", + "outgoingEdgeId": "r2cx0lm6xkzjgv1hycekcp25", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Hydration", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Hydration" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "r2cx0lm6xkzjgv1hycekcp25" + ] + } } - ], - "groupId": "co7gxaoxtf1xukmgbby73u6v", - "outgoingEdgeId": "dyvib6xwm0jieqp37mac1diq" + ] } - ], - "graphCoordinates": { "x": 4165.908336104726, "y": 568.072108305734 } + ] }, { "id": "rcr9zqm4lnevx5dqf9k23m5u", "title": "If recovery", + "graphCoordinates": { "x": 4634.078450031568, "y": 886.3561931535737 }, "blocks": [ { "id": "m8o93n92t5wcy5bi8tgauc5f", @@ -757,30 +548,26 @@ "items": [ { "id": "yw3cil1rvf3iduc0mko0c8og", - "type": 1, - "blockId": "m8o93n92t5wcy5bi8tgauc5f", + "outgoingEdgeId": "choo26oflyx4c2em6msd7bum", "content": { "comparisons": [ { "id": "w3ii2flw8vz608pm45j92nli", - "value": "Recovery", "variableId": "vgz8fr5u7q0p4jdef1krz2vm3", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Recovery" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "choo26oflyx4c2em6msd7bum" + ] + } } - ], - "groupId": "rcr9zqm4lnevx5dqf9k23m5u" + ] } - ], - "graphCoordinates": { "x": 4634.078450031568, "y": 886.3561931535737 } + ] }, { "id": "ho2hskojxz8ac631driot5kh", "title": "Energy", + "graphCoordinates": { "x": 4001.801919721875, "y": -860.9371698075208 }, "blocks": [ { "id": "v4tvmb615jdg52vofgzlz7ai", @@ -795,8 +582,7 @@ ] } ] - }, - "groupId": "ho2hskojxz8ac631driot5kh" + } }, { "id": "vxadalubq6hnsywwt7w9tzoc", @@ -812,70 +598,65 @@ ] } ] - }, - "groupId": "ho2hskojxz8ac631driot5kh" + } }, { "id": "zzws62fe3zha7x7kln3kp0ko", + "outgoingEdgeId": "pk7d58d6qmxrylte434czz4x", "type": "Condition", "items": [ { "id": "kb6eovh6di5xqnkegms0ljee", - "type": 1, - "blockId": "zzws62fe3zha7x7kln3kp0ko", + "outgoingEdgeId": "achb4p7q0hnox3hy62ru7dtx", "content": { "comparisons": [ { "id": "ysu7q0adna5tyhaghtq9qzrj", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" }, { "id": "j7sune97lh32xukeil8poeif", - "value": "Berries", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Berries" }, { "id": "tsrm85u8demtuc95aootakrj", - "value": "Caramel", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Caramel" }, { "id": "gfqvik3txgrinlslj0jvs9gt", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "yv3jre55h7w9qp55t5m8ax2p", - "value": "Coffee", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Coffee" }, { "id": "xksf2b1la2h8yy9lvn96yqo1", - "value": "Vanilla", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Vanilla" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "achb4p7q0hnox3hy62ru7dtx" + ] + } } - ], - "groupId": "ho2hskojxz8ac631driot5kh", - "outgoingEdgeId": "pk7d58d6qmxrylte434czz4x" + ] } - ], - "graphCoordinates": { "x": 4001.8019197218755, "y": -860.9371698075208 } + ] }, { "id": "w3f8ya4hmkuab55dh2ogsvtz", "title": "Hydration", + "graphCoordinates": { "x": 4604.393180386735, "y": 102.6192979908871 }, "blocks": [ { "id": "qsd35sfqjq1eskoovubrjc7k", @@ -890,8 +671,7 @@ ] } ] - }, - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" + } }, { "id": "eobb04nb37ezx24go2iipm85", @@ -907,72 +687,50 @@ ] } ] - }, - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" + } }, { "id": "ph2jgb8r0lyui0j6v3jtifo2", + "outgoingEdgeId": "l8g4gblcmzmiv4fsgjufviws", "type": "picture choice input", "items": [ { "id": "pkv4omwvnr338lkhwh6jglh6", - "type": 3, + "pictureSrc": "https://www.naak.com/cdn/shop/files/naak-energy-drink-mix-energy-drink-mix-lime-42434407891248_600x.png?v=1692717400", "title": "Lime Energy Drink Mix", - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-drink-mix-1-sac-3-50-portion-energy-drink-mix-lime-eu-29868312887382_600x.png?v=1677355814", "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "ntnhk9cqrvogutrldgpm7d56", - "value": "Lime", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Lime" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "s6nx86xyuclsjtqmr53ijea1", - "type": 3, + "pictureSrc": "https://eu.naak.com/cdn/shop/files/NewDrinkMixWatermelonBulk-Front_5_600x.png?v=1692716818", "title": "Watermelon Energy Drink Mix", - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-drink-mix-1-sac-3-50-portion-energy-drink-mix-watermelon-eu-29868346605654_600x.png?v=1677355821", - "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue", - "displayCondition": { - "condition": { - "comparisons": [ - { - "id": "r20yudlu77l7fhss45z87f7l", - "value": "Watermelon", - "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" - } - ], - "logicalOperator": "AND" - }, - "isEnabled": false - } + "description": "- 250 calories: get all your calories in a liquid form\n- 55g carbohydrates: simple and complex natural carbohydrates\n- 650mg electrolytes: replenish minerals lost in sweat\n- 1300mg BCAAs: prevent muscle breakdown during exercise\n- 8g protein: all essential amino acids to reduce muscle fatigue" } ], - "groupId": "w3f8ya4hmkuab55dh2ogsvtz", "options": { - "buttonLabel": "Next", "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "l8g4gblcmzmiv4fsgjufviws" + "buttonLabel": "Next" + } } - ], - "graphCoordinates": { "x": 4604.393180386735, "y": 102.6192979908871 } + ] }, { "id": "jdd417tfj6hdu4pj6bkksgwa", "title": "Recovery", + "graphCoordinates": { "x": 5092.137492973015, "y": 286.5579598199387 }, "blocks": [ { "id": "xbbsd6xsl44fukz2ygdpjbd1", @@ -989,8 +747,7 @@ ] } ] - }, - "groupId": "jdd417tfj6hdu4pj6bkksgwa" + } }, { "id": "cgb8mt2krmq3mdddwjehtrzu", @@ -1006,8 +763,7 @@ ] } ] - }, - "groupId": "jdd417tfj6hdu4pj6bkksgwa" + } }, { "id": "mtj2j6zgnp50wpw9ewuwui5u", @@ -1015,54 +771,46 @@ "items": [ { "id": "s9nop23fmq55jilo9mntgpn8", - "type": 3, - "title": "Protein Nut Butter", - "blockId": "mtj2j6zgnp50wpw9ewuwui5u", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-breakfast-340g-protein-nut-butter-peanut-40637318365488_600x.png?v=1678033822", + "title": "Protein Nut Butter", "description": "- 500mg super fats: promote heart and gut health\n- 640mg BCAAs: reduce muscle damage & soreness\n- 120mg electrolytes: replenish minerals lost in sweat\n- 4.3g protein: build & repair muscle post-workout", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "rm8omv5htisk7s4nzvmsvc5c", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "xde05nklbld4u80qhs422y47", - "value": "Nut free", "variableId": "vz4fqc40gkk99h0qeus2tjwhx", - "comparisonOperator": "Does not contain" + "comparisonOperator": "Does not contain", + "value": "Nut free" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "snr3wam9c0p1f191rf2587wz", - "type": 3, - "title": "Vanilla Protein Powder", - "blockId": "mtj2j6zgnp50wpw9ewuwui5u", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-protein-powder-1-bag-2-75-serving-protein-powder-vanilla-29774755954774_600x.png?v=1677355777", + "title": "Vanilla Protein Powder", "description": "- 25g complete protein: build & repair muscle post-workout\n- 4g BCAAs: reduce muscle damage & soreness\n- 430mg electrolytes: replenish minerals lost in sweat\n- 1g carbohydrates: no added sugar" } ], - "groupId": "jdd417tfj6hdu4pj6bkksgwa", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." + "isMultipleChoice": true } } - ], - "graphCoordinates": { "x": 5092.137492973015, "y": 286.5579598199387 } + ] }, { "id": "nh69j0kgfd5wdqshpdpjgqdh", "title": "", + "graphCoordinates": { "x": 4425.493571638971, "y": -1989.578763047769 }, "blocks": [ { "id": "bqq8o994nr8ltkkdc8bax01i", @@ -1078,464 +826,361 @@ ] } ] - }, - "groupId": "nh69j0kgfd5wdqshpdpjgqdh" + } }, { "id": "np8236cce7e79h8i21hg5ncp", + "outgoingEdgeId": "u57y4cl6042u5r34dahfhwus", "type": "picture choice input", "items": [ { "id": "smabu9g31qcovytdu2yyi86n", - "type": 3, - "title": "Bars - Variety pack", - "blockId": "np8236cce7e79h8i21hg5ncp", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_8_600x.png?v=1680032168", + "title": "Bars - Variety pack", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue" }, { "id": "f8rm4b7ic73nq92u52717th5", - "type": 3, - "title": "Waffle - Variety pack", - "blockId": "np8236cce7e79h8i21hg5ncp", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_7_600x.png?v=1680032183", + "title": "Waffle - Variety pack", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 200mg electrolytes: replenish minerals lost in sweat\n- 3g protein: all essential amino acids to reduce muscle fatigue" } ], - "groupId": "nh69j0kgfd5wdqshpdpjgqdh", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "u57y4cl6042u5r34dahfhwus" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 4425.493571638971, "y": -1989.578763047769 } + ] }, { "id": "oq9jemd1endd8naxzatkkjbb", "title": "", + "graphCoordinates": { "x": 4431.336411421283, "y": -1425.83493478683 }, "blocks": [ { "id": "r5hq4sr8iovxqyixejparma7", + "outgoingEdgeId": "xevaekw7nv6zfmkijsortgk5", "type": "picture choice input", "items": [ { "id": "zc1c5ahukxhalbu9p6oqz4tw", - "type": 3, - "title": "Chocolate Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-chocolate-40633672728880_600x.png?v=1677355844", + "title": "Chocolate Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 17g carbohydrates: simple and complex natural carbohydrates\n- 200mg electrolytes: replenish minerals lost in sweat\n- 3g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "pkmq8tabhm9nqi5oo8cmz2gz", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "j953heg9dx2xzdhwk773fha0", - "type": 3, - "title": "Vanilla Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-vanilla-40633799246128_600x.png?v=1677355758", + "title": "Vanilla Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 210mg electrolytes: replenish minerals lost in sweat\n- 4g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "l4cye2ndoqcdmhiylc4zyho9", - "value": "Vanilla", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Vanilla" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "z8brrxkvbxfxfwryit6bjqb9", - "type": 3, - "title": "Maple Syrup Energy Waffle", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/naak-energy-waffle-energy-waffle-maple-syrup-40633783877936_600x.png?v=1678034628", + "title": "Maple Syrup Energy Waffle", "description": "- 140 calories: quick energy boost from high-quality ingredients\n- 16g carbohydrates: simple and complex natural carbohydrates\n- 210mg electrolytes: replenish minerals lost in sweat\n- 4g protein: all essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "l4cye2ndoqcdmhiylc4zyho9", - "value": "Maple Syrup", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Maple Syrup" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "ex1l3ynwk2iiz6wmavsr3l8y", - "type": 3, - "title": "Peanut Butter & Chocolate Bar", - "blockId": "r5hq4sr8iovxqyixejparma7", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/PACKS_600x.png?v=1678223153", + "title": "Peanut Butter & Chocolate Bar", "description": "- 200 calories: long-lasting energy with no sugar crash\n- 27g carbohydrates: simple and complex natural carbohydrates\n- 445mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "ez9ppwlsy77hzum27l7vxnu6", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" }, { "id": "s4khjdtxicrwpdelg41fs6d8", - "value": "Chocolate", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Chocolate" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "x2octz0rxe0s8ach4zdf2gch", - "type": 3, - "title": "Mocha Energy Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/98_600x.png?v=1678223518", + "title": "Mocha Energy Bar", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Coffee", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Coffee" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "hxcd05xn9rzhrvreh9bjqdbr", - "type": 3, - "title": "Caramel Macchiato Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/101_600x.png?v=1678223652", + "title": "Caramel Macchiato Bar", "description": "- 180 calories: long-lasting energy with no sugar crash\n- 65mg caffeine: increase focus and stamina\n- 29g carbohydrates: simple and complex natural carbohydrates\n- 480mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Caramel", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Caramel" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } }, { "id": "qw9p8xrmvli4xsn019cddxbh", - "type": 3, - "title": "Berries & Nuts Bar", - "blockId": "kl9cacv5pde99co9w9d9pmmq", "pictureSrc": "https://cdn.shopify.com/s/files/1/0704/1744/9254/products/92_600x.png?v=1678222928", + "title": "Berries & Nuts Bar", "description": "- 200 calories: long-lasting energy with no sugar crash\n- 28g carbohydrates: simple and complex natural carbohydrates\n- 405mg electrolytes: replenish minerals lost in sweat\n- 7g protein: essential amino acids to reduce muscle fatigue", "displayCondition": { + "isEnabled": true, "condition": { "comparisons": [ { "id": "mz7hwzkpjycizegz5216as63", - "value": "Berries", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Berries" }, { "id": "m48fa084tvurk9nzcibm0d2d", - "value": "Nuts", "variableId": "vhbd5800sc98l1lk8wf7fe742", - "comparisonOperator": "Contains" + "comparisonOperator": "Contains", + "value": "Nuts" } - ], - "logicalOperator": "AND" - }, - "isEnabled": true + ] + } } } ], - "groupId": "oq9jemd1endd8naxzatkkjbb", "options": { - "buttonLabel": "Send", - "isMultipleChoice": true, - "searchInputPlaceholder": "Filter the options..." - }, - "outgoingEdgeId": "xevaekw7nv6zfmkijsortgk5" + "isMultipleChoice": true + } } - ], - "graphCoordinates": { "x": 4431.336411421283, "y": -1425.8349347868302 } + ] } ], - "variables": [ - { "id": "vp1r2yrb6xgmi2aq3x6x73vaz", "name": "Name" }, - { "id": "vhbd5800sc98l1lk8wf7fe742", "name": "Flavour" }, - { "id": "vma96g9rw8oaosc0ei2iacqig", "name": "Continent" }, - { "id": "vlgo7i0r514jkd9a9f24otm4m", "name": "Protein source" }, - { "id": "vgz8fr5u7q0p4jdef1krz2vm3", "name": "Goals" }, - { "id": "vz4fqc40gkk99h0qeus2tjwhx", "name": "Diet restrictions" } - ], "edges": [ { "id": "aj9vphwwva87uh9f1w7mm999", - "to": { "groupId": "gafkgilrandk3cwydpzq21oy" }, - "from": { - "blockId": "li6nyybzaojujnz241jv5rr1", - "groupId": "af8ny8rpbejnlkitr2s29ro1" - } + "from": { "eventId": "af8ny8rpbejnlkitr2s29ro1" }, + "to": { "groupId": "gafkgilrandk3cwydpzq21oy" } }, { "id": "gnh6uloe0a8ciwahgq0gnx4k", - "to": { "groupId": "buk5exhk13g3npkaiaw87tvs" }, - "from": { - "blockId": "xobx3g928f9zj220n5qe1ih6", - "groupId": "gafkgilrandk3cwydpzq21oy" - } + "from": { "blockId": "xobx3g928f9zj220n5qe1ih6" }, + "to": { "groupId": "buk5exhk13g3npkaiaw87tvs" } }, { "id": "zlab2pp5tfih56jcw6vtjs03", - "to": { "groupId": "z40ynhndj5r4038u3ha39c14" }, - "from": { - "blockId": "lwtynqjykiem5zdtns3fwhu2", - "groupId": "buk5exhk13g3npkaiaw87tvs" - } + "from": { "blockId": "lwtynqjykiem5zdtns3fwhu2" }, + "to": { "groupId": "z40ynhndj5r4038u3ha39c14" } }, { "id": "hwbbi48q0u8xnlqbpq53cdju", - "to": { "groupId": "mncr0l180vs07gc1difaovjx" }, - "from": { - "blockId": "zesp4ro7ltjmh64sn8d4912c", - "groupId": "z40ynhndj5r4038u3ha39c14" - } + "from": { "blockId": "zesp4ro7ltjmh64sn8d4912c" }, + "to": { "groupId": "mncr0l180vs07gc1difaovjx" } }, { "id": "bf16js59cs2hmicrkbc7nv1q", - "to": { "groupId": "mqt2qcyld5du8ecmbphjxpwu" }, - "from": { - "blockId": "mfz600vwgfjcisahf5tdnz7l", - "groupId": "mncr0l180vs07gc1difaovjx" - } + "from": { "blockId": "mfz600vwgfjcisahf5tdnz7l" }, + "to": { "groupId": "mqt2qcyld5du8ecmbphjxpwu" } }, { "id": "umuilo9l4t27kcpnx5ybnr08", - "to": { "groupId": "y2jfx62oea6q0rxjby9tzqi6" }, - "from": { - "blockId": "ogy9ng7q9jglxg2ivb39tzeh", - "groupId": "n3zqahk50kb05th7zbycin5w" - } + "from": { "blockId": "ogy9ng7q9jglxg2ivb39tzeh" }, + "to": { "groupId": "y2jfx62oea6q0rxjby9tzqi6" } }, { "id": "i3za7jvz8g7m7588g7i1ue9i", - "to": { "groupId": "x14lejru0gv2c7afc68nuezy" }, - "from": { - "blockId": "p71conb1ln7f3m41ca6pxetz", - "groupId": "y2jfx62oea6q0rxjby9tzqi6" - } + "from": { "blockId": "p71conb1ln7f3m41ca6pxetz" }, + "to": { "groupId": "x14lejru0gv2c7afc68nuezy" } }, { "id": "erx9wo3svpfxs2cteknbhfaz", - "to": { "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" }, - "from": { - "blockId": "cbcz08dj67rkx8k1cbj2ybz8", - "groupId": "x14lejru0gv2c7afc68nuezy" - } + "from": { "blockId": "cbcz08dj67rkx8k1cbj2ybz8" }, + "to": { "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" } }, { "id": "drxu7gyz2trqjtv5nnfv1x9l", - "to": { "groupId": "n3zqahk50kb05th7zbycin5w" }, - "from": { - "blockId": "cx2v8nfb4kxvk58bbu6w85uy", - "groupId": "mqt2qcyld5du8ecmbphjxpwu" - } + "from": { "blockId": "cx2v8nfb4kxvk58bbu6w85uy" }, + "to": { "groupId": "n3zqahk50kb05th7zbycin5w" } }, { "id": "iszgvtfetursv4ktm9mdtxhy", - "to": { "groupId": "qjoc17kdjrpkaoxesoeqzmjt" }, "from": { - "itemId": "yffl8ja17g5fr9rpi4d0cl36", "blockId": "l16y2qzslakgl2up4jybj5m4", - "groupId": "g27q0psplvzht5xg9erxw738" - } + "itemId": "yffl8ja17g5fr9rpi4d0cl36" + }, + "to": { "groupId": "qjoc17kdjrpkaoxesoeqzmjt" } }, { "id": "vnqu52ld3usezpnrgu2l7ul0", - "to": { "groupId": "g27q0psplvzht5xg9erxw738" }, - "from": { - "blockId": "vdzzxwdocfxdvqnqwwvjymzw", - "groupId": "q9z4xrzf9z7sgl69rrrhiyoh" - } + "from": { "blockId": "vdzzxwdocfxdvqnqwwvjymzw" }, + "to": { "groupId": "g27q0psplvzht5xg9erxw738" } }, { "id": "apvktyu7x3wks4z9xflecu91", - "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" }, - "from": { - "blockId": "pxb59zd4bjqmva9er47l6x15", - "groupId": "qjoc17kdjrpkaoxesoeqzmjt" - } + "from": { "blockId": "pxb59zd4bjqmva9er47l6x15" }, + "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" } }, { "id": "j6d1kch478t4ov4bbz1yshhl", - "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" }, - "from": { - "blockId": "l16y2qzslakgl2up4jybj5m4", - "groupId": "g27q0psplvzht5xg9erxw738" - } + "from": { "blockId": "l16y2qzslakgl2up4jybj5m4" }, + "to": { "groupId": "b94nqmbqp0ezfazu0kekqioa" } }, { "id": "lk5ghbqljt2f43w1d47rowns", - "to": { "groupId": "ho2hskojxz8ac631driot5kh" }, "from": { - "itemId": "vyjgfexvyrijez06kpxi1mva", "blockId": "okl6akklm8djknl7lofqr3cm", - "groupId": "b94nqmbqp0ezfazu0kekqioa" - } + "itemId": "vyjgfexvyrijez06kpxi1mva" + }, + "to": { "groupId": "ho2hskojxz8ac631driot5kh" } }, { "id": "xblzklrcdkmxeu8y5xbicz09", - "to": { "groupId": "co7gxaoxtf1xukmgbby73u6v" }, - "from": { - "blockId": "okl6akklm8djknl7lofqr3cm", - "groupId": "b94nqmbqp0ezfazu0kekqioa" - } + "from": { "blockId": "okl6akklm8djknl7lofqr3cm" }, + "to": { "groupId": "co7gxaoxtf1xukmgbby73u6v" } }, { "id": "r2cx0lm6xkzjgv1hycekcp25", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, "from": { - "itemId": "okd2sbmr1mgoubpf7kdjr9ey", "blockId": "styhci2fh3yi17b7cmv3x8cc", - "groupId": "co7gxaoxtf1xukmgbby73u6v" - } + "itemId": "okd2sbmr1mgoubpf7kdjr9ey" + }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } }, { "id": "dyvib6xwm0jieqp37mac1diq", - "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" }, - "from": { - "blockId": "styhci2fh3yi17b7cmv3x8cc", - "groupId": "co7gxaoxtf1xukmgbby73u6v" - } + "from": { "blockId": "styhci2fh3yi17b7cmv3x8cc" }, + "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" } }, { "id": "choo26oflyx4c2em6msd7bum", - "to": { "groupId": "jdd417tfj6hdu4pj6bkksgwa" }, "from": { - "itemId": "yw3cil1rvf3iduc0mko0c8og", "blockId": "m8o93n92t5wcy5bi8tgauc5f", - "groupId": "rcr9zqm4lnevx5dqf9k23m5u" - } + "itemId": "yw3cil1rvf3iduc0mko0c8og" + }, + "to": { "groupId": "jdd417tfj6hdu4pj6bkksgwa" } }, { "id": "l8g4gblcmzmiv4fsgjufviws", - "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" }, - "from": { - "blockId": "ph2jgb8r0lyui0j6v3jtifo2", - "groupId": "w3f8ya4hmkuab55dh2ogsvtz" - } + "from": { "blockId": "ph2jgb8r0lyui0j6v3jtifo2" }, + "to": { "groupId": "rcr9zqm4lnevx5dqf9k23m5u" } }, { "id": "achb4p7q0hnox3hy62ru7dtx", - "to": { "groupId": "nh69j0kgfd5wdqshpdpjgqdh" }, "from": { - "itemId": "kb6eovh6di5xqnkegms0ljee", "blockId": "zzws62fe3zha7x7kln3kp0ko", - "groupId": "ho2hskojxz8ac631driot5kh" - } + "itemId": "kb6eovh6di5xqnkegms0ljee" + }, + "to": { "groupId": "nh69j0kgfd5wdqshpdpjgqdh" } }, { "id": "pk7d58d6qmxrylte434czz4x", - "to": { "groupId": "oq9jemd1endd8naxzatkkjbb" }, - "from": { - "blockId": "zzws62fe3zha7x7kln3kp0ko", - "groupId": "ho2hskojxz8ac631driot5kh" - } + "from": { "blockId": "zzws62fe3zha7x7kln3kp0ko" }, + "to": { "groupId": "oq9jemd1endd8naxzatkkjbb" } }, { "id": "xevaekw7nv6zfmkijsortgk5", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, - "from": { - "blockId": "r5hq4sr8iovxqyixejparma7", - "groupId": "oq9jemd1endd8naxzatkkjbb" - } + "from": { "blockId": "r5hq4sr8iovxqyixejparma7" }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } }, { "id": "u57y4cl6042u5r34dahfhwus", - "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" }, - "from": { - "blockId": "np8236cce7e79h8i21hg5ncp", - "groupId": "nh69j0kgfd5wdqshpdpjgqdh" - } + "from": { "blockId": "np8236cce7e79h8i21hg5ncp" }, + "to": { "groupId": "w3f8ya4hmkuab55dh2ogsvtz" } } ], + "variables": [ + { "id": "vp1r2yrb6xgmi2aq3x6x73vaz", "name": "Name" }, + { "id": "vhbd5800sc98l1lk8wf7fe742", "name": "Flavour" }, + { "id": "vma96g9rw8oaosc0ei2iacqig", "name": "Continent" }, + { "id": "vlgo7i0r514jkd9a9f24otm4m", "name": "Protein source" }, + { "id": "vgz8fr5u7q0p4jdef1krz2vm3", "name": "Goals" }, + { "id": "vz4fqc40gkk99h0qeus2tjwhx", "name": "Diet restrictions" } + ], "theme": { + "general": { + "background": { "type": "Color", "content": "#010000" } + }, "chat": { + "hostBubbles": { "backgroundColor": "#1B1A1A", "color": "#ffffff" }, + "guestBubbles": { "color": "#010000", "backgroundColor": "#FFFFFF" }, + "buttons": { "backgroundColor": "#FFEF02", "color": "#010000" }, "inputs": { - "color": "#ffffff", "backgroundColor": "#1B1A1A", + "color": "#ffffff", "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#010000", "backgroundColor": "#FFEF02" }, - "roundness": "medium", - "hostAvatar": { - "isEnabled": true - }, - "hostBubbles": { "color": "#ffffff", "backgroundColor": "#1B1A1A" }, - "guestBubbles": { "color": "#010000", "backgroundColor": "#FFFFFF" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#010000" } + } } }, "selectedThemeTemplateId": "typebot-dark", - "settings": { - "general": { - "rememberUser": { "isEnabled": false }, - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isHideQueryParamsEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + "settings": {}, + "createdAt": "2023-11-06T17:16:37.483Z", + "updatedAt": "2023-11-06T17:20:11.754Z", + "icon": "🍫", + "folderId": null, "publicId": null, "customDomain": null, "workspaceId": "proWorkspace", "resultsTablePreferences": null, "isArchived": false, - "isClosed": false + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/public/templates/quiz.json b/apps/builder/public/templates/quiz.json index 8196602398..4e1a6c1e26 100644 --- a/apps/builder/public/templates/quiz.json +++ b/apps/builder/public/templates/quiz.json @@ -1,33 +1,24 @@ { - "id": "cl1qz4luj04007w1ai7rk1j5q", - "version": "4", - "createdAt": "2022-04-08T22:02:30.427Z", - "updatedAt": "2022-04-08T23:03:34.726Z", - "icon": "🕹️", + "version": "6", + "id": "clon582of00031avnefkrpwrl", "name": "Digital Marketing Quiz", - "folderId": null, - "groups": [ + "events": [ { "id": "cl1qz4lui00017w1a505z15p0", - "blocks": [ - { - "id": "cl1qz4lui00027w1a19prdgzd", - "type": "start", - "label": "Start", - "groupId": "cl1qz4lui00017w1a505z15p0", - "outgoingEdgeId": "cl1r17gv3006h2e6dc9e7xob7" - } - ], - "title": "Start", - "graphCoordinates": { "x": -541.1926699141732, "y": -27.363674321503076 } - }, + "outgoingEdgeId": "cl1r17gv3006h2e6dc9e7xob7", + "graphCoordinates": { "x": -541.1926699141732, "y": -27.36367432150308 }, + "type": "start" + } + ], + "groups": [ { "id": "cl1r09bc6000h2e6dqml18p4p", + "title": "Q1", + "graphCoordinates": { "x": 3, "y": 180 }, "blocks": [ { "id": "cl1r0bva2000y2e6d2g88vmjk", "type": "Set variable", - "groupId": "cl1r09bc6000h2e6dqml18p4p", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "0" @@ -36,7 +27,6 @@ { "id": "cl1r09bcc000i2e6dyyvskx75", "type": "text", - "groupId": "cl1r09bc6000h2e6dqml18p4p", "content": { "richText": [ { @@ -48,49 +38,35 @@ }, { "id": "cl1r09dl9000j2e6dhkc2h97y", + "outgoingEdgeId": "cl1r0cfjt00122e6dzwtamycl", "type": "choice input", "items": [ - { - "id": "cl1r09dl9000k2e6dvf7llzkd", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "content": "Send Email Out" - }, + { "id": "cl1r09dl9000k2e6dvf7llzkd", "content": "Send Email Out" }, { "id": "cl1r0a80k000l2e6dngppwyhm", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", "content": "Serial Editorial Output" }, { "id": "cl1r0adei000m2e6dfc8w5y4k", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "content": "Search Engine Optimization", - "outgoingEdgeId": "cl1r0dfip00152e6doo9duexn" + "outgoingEdgeId": "cl1r0dfip00152e6doo9duexn", + "content": "Search Engine Optimization" }, { "id": "cl1r0aiks000n2e6dc31e2db6", - "type": 0, - "blockId": "cl1r09dl9000j2e6dhkc2h97y", "content": "Search Expectation Order" } - ], - "groupId": "cl1r09bc6000h2e6dqml18p4p", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0cfjt00122e6dzwtamycl" + ] } - ], - "title": "Q1", - "graphCoordinates": { "x": 3, "y": 180 } + ] }, { "id": "cl1r0b3ww000q2e6d4aihat41", + "title": "Q2", + "graphCoordinates": { "x": 457.878775226166, "y": 159.8383669682208 }, "blocks": [ { "id": "cl1r0e8gq00172e6dq0bpxqsc", "type": "Set variable", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -99,7 +75,6 @@ { "id": "cl1r0d8zi00142e6d4tl2yenk", "type": "text", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -109,7 +84,6 @@ { "id": "cl1r0bgit000x2e6dvdre9wsj", "type": "text", - "groupId": "cl1r0b3ww000q2e6d4aihat41", "content": { "richText": [ { "type": "p", "children": [{ "text": "What is anchor text?" }] } @@ -118,49 +92,38 @@ }, { "id": "cl1r0b3x5000r2e6dqk8gzoim", + "outgoingEdgeId": "cl1r0f53y001q2e6dvuq434ru", "type": "choice input", "items": [ { "id": "cl1r0b3x5000s2e6dyq6bklbf", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "content": "The visible text that is hyperlinked to another page", - "outgoingEdgeId": "cl1r0i4dj001r2e6dgb96tx9q" + "outgoingEdgeId": "cl1r0i4dj001r2e6dgb96tx9q", + "content": "The visible text that is hyperlinked to another page" }, { "id": "cl1r0b6jd000t2e6dkp3dxpp9", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "The text in the top left of a webpage" }, { "id": "cl1r0b835000u2e6d22rw2gb5", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "The most prominent text on a page, used by search engines to assign a title to the page" }, { "id": "cl1r0b9tl000v2e6dkligryj3", - "type": 0, - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", "content": "A slogan that sticks in a consumer’s mind" } - ], - "groupId": "cl1r0b3ww000q2e6d4aihat41", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0f53y001q2e6dvuq434ru" + ] } - ], - "title": "Q2", - "graphCoordinates": { "x": 457.878775226166, "y": 159.83836696822075 } + ] }, { "id": "cl1r0erik00182e6dfzezujj0", + "title": "Q3", + "graphCoordinates": { "x": 876.6414289028069, "y": 165.4393876130828 }, "blocks": [ { "id": "cl1r0eril00192e6d9yrtownz", "type": "Set variable", - "groupId": "cl1r0erik00182e6dfzezujj0", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -169,7 +132,6 @@ { "id": "cl1r0eril001b2e6dh43cqhv5", "type": "text", - "groupId": "cl1r0erik00182e6dfzezujj0", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -179,7 +141,6 @@ { "id": "cl1r0eril001d2e6d3gay9cls", "type": "text", - "groupId": "cl1r0erik00182e6dfzezujj0", "content": { "richText": [ { "type": "p", "children": [{ "text": "What is a persona ?" }] } @@ -188,49 +149,38 @@ }, { "id": "cl1r0eril001f2e6dk0fd0qpw", + "outgoingEdgeId": "cl1r0khb6002c2e6ddssbpj9z", "type": "choice input", "items": [ { "id": "cl1r0erim001g2e6d5zzn8q22", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "Your target audience" }, { "id": "cl1r0erim001h2e6dnwtiturl", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "Someone who joins your mailing list" }, { "id": "cl1r0erim001i2e6dbfhck09o", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", "content": "A repeat customer" }, { "id": "cl1r0erim001j2e6d2waa3374", - "type": 0, - "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "content": "A fictional representation of a group of customers", - "outgoingEdgeId": "cl1r0k27y00262e6dflgcp3wa" + "outgoingEdgeId": "cl1r0k27y00262e6dflgcp3wa", + "content": "A fictional representation of a group of customers" } - ], - "groupId": "cl1r0erik00182e6dfzezujj0", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0khb6002c2e6ddssbpj9z" + ] } - ], - "title": "Q3", - "graphCoordinates": { "x": 876.6414289028069, "y": 165.43938761308277 } + ] }, { "id": "cl1r0j8u1001t2e6d42mjfcqo", + "title": "Q4", + "graphCoordinates": { "x": 1262.722245418697, "y": 156.2726513569937 }, "blocks": [ { "id": "cl1r0j8u2001u2e6dgdpvrnz5", "type": "Set variable", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -239,7 +189,6 @@ { "id": "cl1r0j8u2001w2e6d3wnpzcj5", "type": "text", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done!" }] } @@ -249,7 +198,6 @@ { "id": "cl1r0j8u2001y2e6dr24ieifw", "type": "text", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", "content": { "richText": [ { @@ -261,57 +209,46 @@ }, { "id": "cl1r0j8u200202e6dun2d04gu", + "outgoingEdgeId": "cl1r0ktet002i2e6d5sh8gd2b", "type": "choice input", "items": [ { "id": "cl1r0j8u200212e6dov1xy5m4", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Consequence To Advert" }, { "id": "cl1r0j8u300222e6dnj0i5fm8", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", - "content": "Call To Action", - "outgoingEdgeId": "cl1r0lm4e002m2e6d0g3h9pm7" + "outgoingEdgeId": "cl1r0lm4e002m2e6d0g3h9pm7", + "content": "Call To Action" }, { "id": "cl1r0j8u300232e6dxd8abojt", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Computer Tracked Actions" }, { "id": "cl1r0j8u300242e6d0pki60w6", - "type": 0, - "blockId": "cl1r0j8u200202e6dun2d04gu", "content": "Characteristic Tracking Advert" } - ], - "groupId": "cl1r0j8u1001t2e6d42mjfcqo", - "options": { "buttonLabel": "Send", "isMultipleChoice": false }, - "outgoingEdgeId": "cl1r0ktet002i2e6d5sh8gd2b" + ] } - ], - "title": "Q4", - "graphCoordinates": { "x": 1262.7222454186965, "y": 156.27265135699366 } + ] }, { "id": "cl1r0c85100102e6d7uohf0cu", + "title": "Q1 - Wrong", + "graphCoordinates": { "x": 79.08, "y": 821.49 }, "blocks": [ { "id": "cl1r0c85i00112e6d8iwtrpvb", "type": "text", - "groupId": "cl1r0c85100102e6d7uohf0cu", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0crx600132e6d0u54j506", + "outgoingEdgeId": "cl1r0dibf00162e6dwuvli71j", "type": "text", - "groupId": "cl1r0c85100102e6d7uohf0cu", "content": { "richText": [ { @@ -321,28 +258,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0dibf00162e6dwuvli71j" + } } - ], - "title": "Q1 - Wrong", - "graphCoordinates": { "x": 172.5253073532824, "y": 1013.0204128972396 } + ] }, { "id": "cl1r0exdi001l2e6drdwj3u96", + "title": "Q2 - Wrong", + "graphCoordinates": { "x": 542.94, "y": 996.75 }, "blocks": [ { "id": "cl1r0exdi001m2e6d7kge562x", "type": "text", - "groupId": "cl1r0exdi001l2e6drdwj3u96", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0exdi001o2e6d70s7si5y", + "outgoingEdgeId": "cl1r0ic5f001s2e6dw777scrq", "type": "text", - "groupId": "cl1r0exdi001l2e6drdwj3u96", "content": { "richText": [ { @@ -354,28 +289,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0ic5f001s2e6dw777scrq" + } } - ], - "title": "Q2 - Wrong", - "graphCoordinates": { "x": 636.9595917420552, "y": 991.1969380654137 } + ] }, { "id": "cl1r0k3tq00272e6d1fwyajjx", + "title": "Q3 - Wrong", + "graphCoordinates": { "x": 916.73, "y": 925.61 }, "blocks": [ { "id": "cl1r0k3tq00282e6dl0av81kz", "type": "text", - "groupId": "cl1r0k3tq00272e6d1fwyajjx", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0k3tq002a2e6dv3s1eb6d", + "outgoingEdgeId": "cl1r0l7oa002j2e6dgtx0y1gh", "type": "text", - "groupId": "cl1r0k3tq00272e6d1fwyajjx", "content": { "richText": [ { @@ -387,28 +320,26 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0l7oa002j2e6dgtx0y1gh" + } } - ], - "title": "Q3 - Wrong", - "graphCoordinates": { "x": 1050.202041289724, "y": 980.9697981906751 } + ] }, { "id": "cl1r0kqof002d2e6doqhpnuqy", + "title": "Q4 - Wrong", + "graphCoordinates": { "x": 1316.88, "y": 861.75 }, "blocks": [ { "id": "cl1r0kqof002e2e6dzjcw0kvs", "type": "text", - "groupId": "cl1r0kqof002d2e6doqhpnuqy", "content": { "richText": [{ "type": "p", "children": [{ "text": "WRONG!" }] }] } }, { "id": "cl1r0kqog002g2e6dizmxvz64", + "outgoingEdgeId": "cl1r0p4my00312e6d1wsgwohi", "type": "text", - "groupId": "cl1r0kqof002d2e6doqhpnuqy", "content": { "richText": [ { @@ -420,20 +351,18 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0p4my00312e6d1wsgwohi" + } } - ], - "title": "Q4 - Wrong", - "graphCoordinates": { "x": 1443.1059151009042, "y": 986.0153096729298 } + ] }, { "id": "cl1r0lfb5002k2e6dd6as5kj5", + "title": "Filter", + "graphCoordinates": { "x": 1647.16, "y": 167.69 }, "blocks": [ { "id": "cl1r0lo97002n2e6dfx7fohju", "type": "Set variable", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5", "options": { "variableId": "vcl1r0bxdj000z2e6d65u7n41b", "expressionToEvaluate": "{{Score}} + 5" @@ -445,60 +374,53 @@ "items": [ { "id": "cl1r0oqrr002z2e6dl821aaow", - "type": 1, - "blockId": "cl1r0oqrr002y2e6dsg0sa64g", + "outgoingEdgeId": "cl1r0rt88003a2e6dgq6beaq1", "content": { + "logicalOperator": "AND", "comparisons": [ { "id": "cl1r0osjs00302e6dc60nuk4y", - "value": "14", "variableId": "vcl1r0bxdj000z2e6d65u7n41b", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "14" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1r0rt88003a2e6dgq6beaq1" + ] + } } - ], - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" + ] }, { "id": "cl1r0qvwy00342e6d7ww0oqar", + "outgoingEdgeId": "cl1r0sg9m003i2e6dbsc4cqjn", "type": "Condition", "items": [ { "id": "cl1r0qvwy00352e6dui5itgd1", - "type": 1, - "blockId": "cl1r0qvwy00342e6d7ww0oqar", + "outgoingEdgeId": "cl1r0s6qt003d2e6d5tk2um7y", "content": { + "logicalOperator": "AND", "comparisons": [ { "id": "cl1r0qx3k00362e6dg30jgpdt", - "value": "9", "variableId": "vcl1r0bxdj000z2e6d65u7n41b", - "comparisonOperator": "Greater than" + "comparisonOperator": "Greater than", + "value": "9" } - ], - "logicalOperator": "AND" - }, - "outgoingEdgeId": "cl1r0s6qt003d2e6d5tk2um7y" + ] + } } - ], - "groupId": "cl1r0lfb5002k2e6dd6as5kj5", - "outgoingEdgeId": "cl1r0sg9m003i2e6dbsc4cqjn" + ] } - ], - "title": "Filter", - "graphCoordinates": { "x": 1625.4393876130825, "y": 163.71203897007632 } + ] }, { "id": "cl1r0mn2p002p2e6dijqbjzlh", + "title": "Result", + "graphCoordinates": { "x": 2508.594129051806, "y": 405.664166830421 }, "blocks": [ { "id": "cl1r0mn3t002q2e6dcmv4bzth", "type": "text", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", "content": { "richText": [ { @@ -511,7 +433,6 @@ { "id": "cl1r0nkdx002r2e6dwv0wclo0", "type": "text", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", "content": { "richText": [ { "type": "p", "children": [{ "text": "Try again?" }] } @@ -524,50 +445,40 @@ "items": [ { "id": "cl1r0nt85002t2e6dvb7si7ny", - "type": 0, - "blockId": "cl1r0nt85002s2e6dloupnhdq", - "content": "Yes!", - "outgoingEdgeId": "cl1r15gko005i2e6dn6rhifwe" + "outgoingEdgeId": "cl1r15gko005i2e6dn6rhifwe", + "content": "Yes!" }, - { - "id": "cl1r0nveb002u2e6dotjk6nuf", - "type": 0, - "blockId": "cl1r0nt85002s2e6dloupnhdq", - "content": "No, bye!" - } - ], - "groupId": "cl1r0mn2p002p2e6dijqbjzlh", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + { "id": "cl1r0nveb002u2e6dotjk6nuf", "content": "No, bye!" } + ] } - ], - "title": "Result", - "graphCoordinates": { "x": 2508.594129051806, "y": 405.664166830421 } + ] }, { "id": "cl1r0rgex00382e6dkayjbys6", + "title": "Great score", + "graphCoordinates": { "x": 1999.325745846056, "y": 159.3910979368924 }, "blocks": [ { "id": "cl1r0rggf00392e6dcc941700", + "outgoingEdgeId": "cl1r0s9g8003e2e6d5if2ywz9", "type": "text", - "groupId": "cl1r0rgex00382e6dkayjbys6", "content": { "richText": [ { "type": "p", "children": [{ "text": "Well done 👏" }] } ] - }, - "outgoingEdgeId": "cl1r0s9g8003e2e6d5if2ywz9" + } } - ], - "title": "Great score", - "graphCoordinates": { "x": 1999.3257458460557, "y": 159.39109793689235 } + ] }, { "id": "cl1r0rvak003b2e6dejcdrooq", + "title": "Medium score", + "graphCoordinates": { "x": 2008.44697061989, "y": 315.9721232210492 }, "blocks": [ { "id": "cl1r0rvce003c2e6diusd3pxq", + "outgoingEdgeId": "cl1r0sarx003f2e6dbzmed9te", "type": "text", - "groupId": "cl1r0rvak003b2e6dejcdrooq", "content": { "richText": [ { @@ -577,20 +488,19 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0sarx003f2e6dbzmed9te" + } } - ], - "title": "Medium score", - "graphCoordinates": { "x": 2008.4469706198897, "y": 315.9721232210492 } + ] }, { "id": "cl1r0seuj003h2e6dandwc43r", + "title": "Bad score", + "graphCoordinates": { "x": 2009.967174748862, "y": 499.9168228267089 }, "blocks": [ { "id": "cl1r0pe0x00332e6dxg6xdt2f", + "outgoingEdgeId": "cl1r0sbzh003g2e6dsqs48aoz", "type": "text", - "groupId": "cl1r0seuj003h2e6dandwc43r", "content": { "richText": [ { @@ -602,37 +512,34 @@ ] } ] - }, - "outgoingEdgeId": "cl1r0sbzh003g2e6dsqs48aoz" + } } - ], - "title": "Bad score", - "graphCoordinates": { "x": 2009.9671747488621, "y": 499.91682282670894 } + ] }, { "id": "cl1r15f68005f2e6dvdtal7cp", + "title": "Restart", + "graphCoordinates": { "x": 2850.766985281865, "y": 609.1892251509271 }, "blocks": [ { "id": "cl1r15f87005g2e6dp3srll8r", "type": "Typebot link", - "groupId": "cl1r15f68005f2e6dvdtal7cp", "options": { - "groupId": "cl1r09bc6000h2e6dqml18p4p", "typebotId": "current", + "groupId": "cl1r09bc6000h2e6dqml18p4p", "mergeResults": false } } - ], - "title": "Restart", - "graphCoordinates": { "x": 2850.766985281865, "y": 609.1892251509271 } + ] }, { "id": "cl1r15w3o005s2e6dr5l7csao", + "title": "Welcome", + "graphCoordinates": { "x": -361.5512664480758, "y": 166.9921185817542 }, "blocks": [ { "id": "cl1r16nes005z2e6d3aj23kfz", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [{ "type": "p", "children": [{ "text": "Hi there!" }] }] } @@ -640,7 +547,6 @@ { "id": "cl1r15w5p005t2e6d670v9nbi", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { @@ -657,7 +563,6 @@ { "id": "cl1r16rt400622e6d32uta7mi", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { @@ -670,7 +575,6 @@ { "id": "cl1r1708n00662e6dv8900ixk", "type": "text", - "groupId": "cl1r15w3o005s2e6dr5l7csao", "content": { "richText": [ { "type": "p", "children": [{ "bold": true, "text": "Ready?" }] } @@ -683,243 +587,170 @@ "items": [ { "id": "cl1r176e9006a2e6dpvp0974z", - "type": 0, - "blockId": "cl1r176e900692e6d8u3k6sdq", - "content": "Go!", - "outgoingEdgeId": "cl1r17pzv006n2e6dpibxp9th" + "outgoingEdgeId": "cl1r17pzv006n2e6dpibxp9th", + "content": "Go!" } - ], - "groupId": "cl1r15w3o005s2e6dr5l7csao", - "options": { "buttonLabel": "Send", "isMultipleChoice": false } + ] } - ], - "title": "Welcome", - "graphCoordinates": { "x": -361.5512664480758, "y": 166.99211858175423 } + ] } ], - "variables": [{ "id": "vcl1r0bxdj000z2e6d65u7n41b", "name": "Score" }], "edges": [ + { + "id": "cl1r17gv3006h2e6dc9e7xob7", + "from": { "eventId": "cl1qz4lui00017w1a505z15p0" }, + "to": { "groupId": "cl1r15w3o005s2e6dr5l7csao" } + }, { "id": "cl1r0cfjt00122e6dzwtamycl", - "to": { "groupId": "cl1r0c85100102e6d7uohf0cu" }, - "from": { - "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "groupId": "cl1r09bc6000h2e6dqml18p4p" - } + "from": { "blockId": "cl1r09dl9000j2e6dhkc2h97y" }, + "to": { "groupId": "cl1r0c85100102e6d7uohf0cu" } }, { "id": "cl1r0dfip00152e6doo9duexn", - "to": { "groupId": "cl1r0b3ww000q2e6d4aihat41" }, "from": { - "itemId": "cl1r0adei000m2e6dfc8w5y4k", "blockId": "cl1r09dl9000j2e6dhkc2h97y", - "groupId": "cl1r09bc6000h2e6dqml18p4p" - } + "itemId": "cl1r0adei000m2e6dfc8w5y4k" + }, + "to": { "groupId": "cl1r0b3ww000q2e6d4aihat41" } }, { "id": "cl1r0dibf00162e6dwuvli71j", + "from": { "blockId": "cl1r0crx600132e6d0u54j506" }, "to": { - "blockId": "cl1r0bgit000x2e6dvdre9wsj", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - }, - "from": { - "blockId": "cl1r0crx600132e6d0u54j506", - "groupId": "cl1r0c85100102e6d7uohf0cu" + "groupId": "cl1r0b3ww000q2e6d4aihat41", + "blockId": "cl1r0bgit000x2e6dvdre9wsj" } }, { "id": "cl1r0f53y001q2e6dvuq434ru", - "to": { "groupId": "cl1r0exdi001l2e6drdwj3u96" }, - "from": { - "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - } + "from": { "blockId": "cl1r0b3x5000r2e6dqk8gzoim" }, + "to": { "groupId": "cl1r0exdi001l2e6drdwj3u96" } }, { "id": "cl1r0i4dj001r2e6dgb96tx9q", - "to": { "groupId": "cl1r0erik00182e6dfzezujj0" }, "from": { - "itemId": "cl1r0b3x5000s2e6dyq6bklbf", "blockId": "cl1r0b3x5000r2e6dqk8gzoim", - "groupId": "cl1r0b3ww000q2e6d4aihat41" - } + "itemId": "cl1r0b3x5000s2e6dyq6bklbf" + }, + "to": { "groupId": "cl1r0erik00182e6dfzezujj0" } }, { "id": "cl1r0ic5f001s2e6dw777scrq", + "from": { "blockId": "cl1r0exdi001o2e6d70s7si5y" }, "to": { - "blockId": "cl1r0eril001d2e6d3gay9cls", - "groupId": "cl1r0erik00182e6dfzezujj0" - }, - "from": { - "blockId": "cl1r0exdi001o2e6d70s7si5y", - "groupId": "cl1r0exdi001l2e6drdwj3u96" + "groupId": "cl1r0erik00182e6dfzezujj0", + "blockId": "cl1r0eril001d2e6d3gay9cls" } }, { "id": "cl1r0k27y00262e6dflgcp3wa", - "to": { "groupId": "cl1r0j8u1001t2e6d42mjfcqo" }, "from": { - "itemId": "cl1r0erim001j2e6d2waa3374", "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "groupId": "cl1r0erik00182e6dfzezujj0" - } + "itemId": "cl1r0erim001j2e6d2waa3374" + }, + "to": { "groupId": "cl1r0j8u1001t2e6d42mjfcqo" } }, { "id": "cl1r0khb6002c2e6ddssbpj9z", - "to": { "groupId": "cl1r0k3tq00272e6d1fwyajjx" }, - "from": { - "blockId": "cl1r0eril001f2e6dk0fd0qpw", - "groupId": "cl1r0erik00182e6dfzezujj0" - } + "from": { "blockId": "cl1r0eril001f2e6dk0fd0qpw" }, + "to": { "groupId": "cl1r0k3tq00272e6d1fwyajjx" } }, { "id": "cl1r0ktet002i2e6d5sh8gd2b", - "to": { "groupId": "cl1r0kqof002d2e6doqhpnuqy" }, - "from": { - "blockId": "cl1r0j8u200202e6dun2d04gu", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - } + "from": { "blockId": "cl1r0j8u200202e6dun2d04gu" }, + "to": { "groupId": "cl1r0kqof002d2e6doqhpnuqy" } }, { "id": "cl1r0l7oa002j2e6dgtx0y1gh", + "from": { "blockId": "cl1r0k3tq002a2e6dv3s1eb6d" }, "to": { - "blockId": "cl1r0j8u2001y2e6dr24ieifw", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - }, - "from": { - "blockId": "cl1r0k3tq002a2e6dv3s1eb6d", - "groupId": "cl1r0k3tq00272e6d1fwyajjx" + "groupId": "cl1r0j8u1001t2e6d42mjfcqo", + "blockId": "cl1r0j8u2001y2e6dr24ieifw" } }, { "id": "cl1r0lm4e002m2e6d0g3h9pm7", - "to": { "groupId": "cl1r0lfb5002k2e6dd6as5kj5" }, "from": { - "itemId": "cl1r0j8u300222e6dnj0i5fm8", "blockId": "cl1r0j8u200202e6dun2d04gu", - "groupId": "cl1r0j8u1001t2e6d42mjfcqo" - } + "itemId": "cl1r0j8u300222e6dnj0i5fm8" + }, + "to": { "groupId": "cl1r0lfb5002k2e6dd6as5kj5" } }, { "id": "cl1r0p4my00312e6d1wsgwohi", + "from": { "blockId": "cl1r0kqog002g2e6dizmxvz64" }, "to": { - "blockId": "cl1r0oqrr002y2e6dsg0sa64g", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - }, - "from": { - "blockId": "cl1r0kqog002g2e6dizmxvz64", - "groupId": "cl1r0kqof002d2e6doqhpnuqy" + "groupId": "cl1r0lfb5002k2e6dd6as5kj5", + "blockId": "cl1r0oqrr002y2e6dsg0sa64g" } }, { "id": "cl1r0rt88003a2e6dgq6beaq1", - "to": { "groupId": "cl1r0rgex00382e6dkayjbys6" }, "from": { - "itemId": "cl1r0oqrr002z2e6dl821aaow", "blockId": "cl1r0oqrr002y2e6dsg0sa64g", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "itemId": "cl1r0oqrr002z2e6dl821aaow" + }, + "to": { "groupId": "cl1r0rgex00382e6dkayjbys6" } }, { "id": "cl1r0s6qt003d2e6d5tk2um7y", - "to": { "groupId": "cl1r0rvak003b2e6dejcdrooq" }, "from": { - "itemId": "cl1r0qvwy00352e6dui5itgd1", "blockId": "cl1r0qvwy00342e6d7ww0oqar", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "itemId": "cl1r0qvwy00352e6dui5itgd1" + }, + "to": { "groupId": "cl1r0rvak003b2e6dejcdrooq" } }, { "id": "cl1r0s9g8003e2e6d5if2ywz9", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0rggf00392e6dcc941700", - "groupId": "cl1r0rgex00382e6dkayjbys6" - } + "from": { "blockId": "cl1r0rggf00392e6dcc941700" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sarx003f2e6dbzmed9te", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0rvce003c2e6diusd3pxq", - "groupId": "cl1r0rvak003b2e6dejcdrooq" - } + "from": { "blockId": "cl1r0rvce003c2e6diusd3pxq" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sbzh003g2e6dsqs48aoz", - "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" }, - "from": { - "blockId": "cl1r0pe0x00332e6dxg6xdt2f", - "groupId": "cl1r0seuj003h2e6dandwc43r" - } + "from": { "blockId": "cl1r0pe0x00332e6dxg6xdt2f" }, + "to": { "groupId": "cl1r0mn2p002p2e6dijqbjzlh" } }, { "id": "cl1r0sg9m003i2e6dbsc4cqjn", - "to": { "groupId": "cl1r0seuj003h2e6dandwc43r" }, - "from": { - "blockId": "cl1r0qvwy00342e6d7ww0oqar", - "groupId": "cl1r0lfb5002k2e6dd6as5kj5" - } + "from": { "blockId": "cl1r0qvwy00342e6d7ww0oqar" }, + "to": { "groupId": "cl1r0seuj003h2e6dandwc43r" } }, { "id": "cl1r15gko005i2e6dn6rhifwe", - "to": { "groupId": "cl1r15f68005f2e6dvdtal7cp" }, "from": { - "itemId": "cl1r0nt85002t2e6dvb7si7ny", "blockId": "cl1r0nt85002s2e6dloupnhdq", - "groupId": "cl1r0mn2p002p2e6dijqbjzlh" - } - }, - { - "id": "cl1r17gv3006h2e6dc9e7xob7", - "to": { "groupId": "cl1r15w3o005s2e6dr5l7csao" }, - "from": { - "blockId": "cl1qz4lui00027w1a19prdgzd", - "groupId": "cl1qz4lui00017w1a505z15p0" - } + "itemId": "cl1r0nt85002t2e6dvb7si7ny" + }, + "to": { "groupId": "cl1r15f68005f2e6dvdtal7cp" } }, { "id": "cl1r17pzv006n2e6dpibxp9th", - "to": { "groupId": "cl1r09bc6000h2e6dqml18p4p" }, "from": { - "itemId": "cl1r176e9006a2e6dpvp0974z", "blockId": "cl1r176e900692e6d8u3k6sdq", - "groupId": "cl1r15w3o005s2e6dr5l7csao" - } - } - ], - "theme": { - "chat": { - "inputs": { - "color": "#303235", - "backgroundColor": "#FFFFFF", - "placeholderColor": "#9095A0" - }, - "buttons": { "color": "#FFFFFF", "backgroundColor": "#0042DA" }, - "hostAvatar": { - "isEnabled": true + "itemId": "cl1r176e9006a2e6dpvp0974z" }, - "hostBubbles": { "color": "#303235", "backgroundColor": "#F7F8FF" }, - "guestBubbles": { "color": "#FFFFFF", "backgroundColor": "#FF8E21" } - }, - "general": { - "font": "Open Sans", - "background": { "type": "Color", "content": "#ffffff" } + "to": { "groupId": "cl1r09bc6000h2e6dqml18p4p" } } - }, - "settings": { - "general": { - "isBrandingEnabled": false, - "isInputPrefillEnabled": true, - "isResultSavingEnabled": true, - "isHideQueryParamsEnabled": true, - "isNewResultOnRefreshEnabled": true - }, - "metadata": { - "description": "Build beautiful conversational forms and embed them directly in your applications without a line of code. Triple your response rate and collect answers that has more value compared to a traditional form." - }, - "typingEmulation": { "speed": 300, "enabled": true, "maxDelay": 1.5 } - }, + ], + "variables": [{ "id": "vcl1r0bxdj000z2e6d65u7n41b", "name": "Score" }], + "theme": {}, + "selectedThemeTemplateId": null, + "settings": { "general": {} }, + "createdAt": "2023-11-06T16:55:18.927Z", + "updatedAt": "2023-11-06T16:55:18.927Z", + "icon": "🕹️", + "folderId": null, "publicId": null, - "customDomain": null + "customDomain": null, + "workspaceId": "proWorkspace", + "resultsTablePreferences": null, + "isArchived": false, + "isClosed": false, + "whatsAppCredentialsId": null } diff --git a/apps/builder/src/assets/styles/plate.css b/apps/builder/src/assets/styles/plate.css index 4523f1ee48..784a9a2414 100644 --- a/apps/builder/src/assets/styles/plate.css +++ b/apps/builder/src/assets/styles/plate.css @@ -1,3 +1,10 @@ +.slate-inline-code { + background-color: #805ad5; + color: white; + padding: 0.125rem 0.25rem; + border-radius: 0.35rem; +} + .slate-variable { background-color: #ff8b1a; color: #ffffff; diff --git a/apps/builder/src/components/DropdownList.tsx b/apps/builder/src/components/DropdownList.tsx index 4792d01761..45d33fdfc8 100644 --- a/apps/builder/src/components/DropdownList.tsx +++ b/apps/builder/src/components/DropdownList.tsx @@ -10,7 +10,7 @@ import { Stack, } from '@chakra-ui/react' import { ChevronLeftIcon } from '@/components/icons' -import React, { ReactNode } from 'react' +import React from 'react' // eslint-disable-next-line @typescript-eslint/no-explicit-any type Props = { @@ -42,7 +42,7 @@ export const DropdownList = ({ {...props} > - {(currentItem ?? placeholder) as unknown as ReactNode} + {currentItem ?? placeholder} @@ -57,7 +57,7 @@ export const DropdownList = ({ textOverflow="ellipsis" onClick={handleMenuItemClick(item)} > - {item as unknown as ReactNode} + {item} ))} diff --git a/apps/builder/src/components/TableList.tsx b/apps/builder/src/components/TableList.tsx index f74e1c5c9e..f1cff3e1d0 100644 --- a/apps/builder/src/components/TableList.tsx +++ b/apps/builder/src/components/TableList.tsx @@ -11,6 +11,10 @@ import { TrashIcon, PlusIcon } from '@/components/icons' import { createId } from '@paralleldrive/cuid2' import React, { useEffect, useState } from 'react' +const defaultItem = { + id: createId(), +} + type ItemWithId = T & { id: string } export type TableListItemProps = { @@ -19,10 +23,11 @@ export type TableListItemProps = { } type Props = { - initialItems: ItemWithId[] + initialItems?: ItemWithId[] isOrdered?: boolean addLabel?: string newItemDefaultProps?: Partial + hasDefaultItem?: boolean Item: (props: TableListItemProps) => JSX.Element ComponentBetweenItems?: (props: unknown) => JSX.Element onItemsChange: (items: ItemWithId[]) => void @@ -33,15 +38,19 @@ export const TableList = ({ isOrdered, addLabel = 'Add', newItemDefaultProps, + hasDefaultItem, Item, ComponentBetweenItems, onItemsChange, }: Props) => { - const [items, setItems] = useState(initialItems) + const [items, setItems] = useState( + initialItems ?? hasDefaultItem ? ([defaultItem] as ItemWithId[]) : [] + ) const [showDeleteIndex, setShowDeleteIndex] = useState(null) useEffect(() => { - if (items.length && initialItems.length === 0) setItems(initialItems) + if (items.length && initialItems && initialItems?.length === 0) + setItems(initialItems) }, [initialItems, items.length]) const createItem = () => { diff --git a/apps/builder/src/components/inputs/AutocompleteInput.tsx b/apps/builder/src/components/inputs/AutocompleteInput.tsx index b7391586e4..8e85cf5629 100644 --- a/apps/builder/src/components/inputs/AutocompleteInput.tsx +++ b/apps/builder/src/components/inputs/AutocompleteInput.tsx @@ -9,9 +9,8 @@ import { Input, HStack, FormControl, - FormLabel, } from '@chakra-ui/react' -import { useState, useRef, useEffect, ReactNode } from 'react' +import { useState, useRef, useEffect } from 'react' import { useDebouncedCallback } from 'use-debounce' import { isDefined } from '@typebot.io/lib' import { useOutsideClick } from '@/hooks/useOutsideClick' @@ -20,7 +19,6 @@ import { VariablesButton } from '@/features/variables/components/VariablesButton import { Variable } from '@typebot.io/schemas' import { injectVariableInText } from '@/features/variables/helpers/injectVariableInTextInput' import { focusInput } from '@/helpers/focusInput' -import { MoreInfoTooltip } from '../MoreInfoTooltip' import { env } from '@typebot.io/env' type Props = { @@ -30,7 +28,6 @@ type Props = { debounceTimeout?: number placeholder?: string withVariableButton?: boolean - label?: ReactNode moreInfoTooltip?: string isRequired?: boolean onChange: (value: string) => void @@ -44,8 +41,6 @@ export const AutocompleteInput = ({ withVariableButton = true, value, defaultValue, - label, - moreInfoTooltip, isRequired, }: Props) => { const bg = useColorModeValue('gray.200', 'gray.700') @@ -161,14 +156,6 @@ export const AutocompleteInput = ({ return ( - {label && ( - - {label}{' '} - {moreInfoTooltip && ( - {moreInfoTooltip} - )} - - )} ({ pr={selectedItem ? 16 : 8} w="full" > - {!isTouched && ( + {!isTouched && items && ( {inputValue} diff --git a/apps/builder/src/features/account/UserProvider.tsx b/apps/builder/src/features/account/UserProvider.tsx index 2cc4130280..79a75cb45a 100644 --- a/apps/builder/src/features/account/UserProvider.tsx +++ b/apps/builder/src/features/account/UserProvider.tsx @@ -19,12 +19,8 @@ export const userContext = createContext<{ updateUser: (newUser: Partial) => void }>({ isLoading: false, - logOut: () => { - console.log('logOut not implemented') - }, - updateUser: () => { - console.log('updateUser not implemented') - }, + logOut: () => {}, + updateUser: () => {}, }) const debounceTimeout = 1000 diff --git a/apps/builder/src/features/analytics/api/getTotalAnswersInBlocks.ts b/apps/builder/src/features/analytics/api/getTotalAnswers.ts similarity index 63% rename from apps/builder/src/features/analytics/api/getTotalAnswersInBlocks.ts rename to apps/builder/src/features/analytics/api/getTotalAnswers.ts index 837336d01c..e6e3c0200b 100644 --- a/apps/builder/src/features/analytics/api/getTotalAnswersInBlocks.ts +++ b/apps/builder/src/features/analytics/api/getTotalAnswers.ts @@ -1,12 +1,13 @@ import prisma from '@typebot.io/lib/prisma' import { authenticatedProcedure } from '@/helpers/server/trpc' import { TRPCError } from '@trpc/server' -import { PublicTypebot } from '@typebot.io/schemas' import { z } from 'zod' import { canReadTypebots } from '@/helpers/databaseRules' -import { totalAnswersInBlock } from '@typebot.io/schemas/features/analytics' +import { totalAnswersSchema } from '@typebot.io/schemas/features/analytics' +import { parseGroups } from '@typebot.io/schemas' +import { isInputBlock } from '@typebot.io/lib' -export const getTotalAnswersInBlocks = authenticatedProcedure +export const getTotalAnswers = authenticatedProcedure .meta({ openapi: { method: 'GET', @@ -21,7 +22,7 @@ export const getTotalAnswersInBlocks = authenticatedProcedure typebotId: z.string(), }) ) - .output(z.object({ totalAnswersInBlocks: z.array(totalAnswersInBlock) })) + .output(z.object({ totalAnswers: z.array(totalAnswersSchema) })) .query(async ({ input: { typebotId }, ctx: { user } }) => { const typebot = await prisma.typebot.findFirst({ where: canReadTypebots(typebotId, user), @@ -33,17 +34,17 @@ export const getTotalAnswersInBlocks = authenticatedProcedure message: 'Published typebot not found', }) - const publishedTypebot = typebot.publishedTypebot as PublicTypebot - const totalAnswersPerBlock = await prisma.answer.groupBy({ - by: ['itemId', 'blockId'], + by: ['blockId'], where: { result: { typebotId: typebot.publishedTypebot.typebotId, }, blockId: { - in: publishedTypebot.groups.flatMap((group) => - group.blocks.map((block) => block.id) + in: parseGroups(typebot.publishedTypebot.groups, { + typebotVersion: typebot.publishedTypebot.version, + }).flatMap((group) => + group.blocks.filter(isInputBlock).map((block) => block.id) ), }, }, @@ -51,10 +52,9 @@ export const getTotalAnswersInBlocks = authenticatedProcedure }) return { - totalAnswersInBlocks: totalAnswersPerBlock.map((answer) => ({ - blockId: answer.blockId, - itemId: answer.itemId ?? undefined, - total: answer._count._all, + totalAnswers: totalAnswersPerBlock.map((a) => ({ + blockId: a.blockId, + total: a._count._all, })), } }) diff --git a/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts b/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts new file mode 100644 index 0000000000..9be16c0984 --- /dev/null +++ b/apps/builder/src/features/analytics/api/getTotalVisitedEdges.ts @@ -0,0 +1,55 @@ +import prisma from '@typebot.io/lib/prisma' +import { authenticatedProcedure } from '@/helpers/server/trpc' +import { TRPCError } from '@trpc/server' +import { z } from 'zod' +import { canReadTypebots } from '@/helpers/databaseRules' +import { totalVisitedEdgesSchema } from '@typebot.io/schemas' + +export const getTotalVisitedEdges = authenticatedProcedure + .meta({ + openapi: { + method: 'GET', + path: '/typebots/{typebotId}/analytics/totalVisitedEdges', + protect: true, + summary: 'List total edges used in results', + tags: ['Analytics'], + }, + }) + .input( + z.object({ + typebotId: z.string(), + }) + ) + .output( + z.object({ + totalVisitedEdges: z.array(totalVisitedEdgesSchema), + }) + ) + .query(async ({ input: { typebotId }, ctx: { user } }) => { + const typebot = await prisma.typebot.findFirst({ + where: canReadTypebots(typebotId, user), + select: { id: true }, + }) + if (!typebot?.id) + throw new TRPCError({ + code: 'NOT_FOUND', + message: 'Published typebot not found', + }) + + const edges = await prisma.visitedEdge.groupBy({ + by: ['edgeId'], + where: { + result: { + typebotId: typebot.id, + }, + }, + _count: { resultId: true }, + }) + + return { + totalVisitedEdges: edges.map((e) => ({ + edgeId: e.edgeId, + total: e._count.resultId, + })), + } + }) diff --git a/apps/builder/src/features/analytics/api/router.ts b/apps/builder/src/features/analytics/api/router.ts index 77fee56174..d51c3d0ae3 100644 --- a/apps/builder/src/features/analytics/api/router.ts +++ b/apps/builder/src/features/analytics/api/router.ts @@ -1,6 +1,8 @@ import { router } from '@/helpers/server/trpc' -import { getTotalAnswersInBlocks } from './getTotalAnswersInBlocks' +import { getTotalAnswers } from './getTotalAnswers' +import { getTotalVisitedEdges } from './getTotalVisitedEdges' export const analyticsRouter = router({ - getTotalAnswersInBlocks, + getTotalAnswers, + getTotalVisitedEdges, }) diff --git a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx index fe68b5f5bb..eeec583aa4 100644 --- a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx +++ b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx @@ -15,20 +15,25 @@ import { GroupsCoordinatesProvider } from '@/features/graph/providers/GroupsCoor import { useTranslate } from '@tolgee/react' import { trpc } from '@/lib/trpc' import { isDefined } from '@typebot.io/lib' +import { EventsCoordinatesProvider } from '@/features/graph/providers/EventsCoordinateProvider' export const AnalyticsGraphContainer = ({ stats }: { stats?: Stats }) => { const { t } = useTranslate() const { isOpen, onOpen, onClose } = useDisclosure() const { typebot, publishedTypebot } = useTypebot() - const { data } = trpc.analytics.getTotalAnswersInBlocks.useQuery( + const { data } = trpc.analytics.getTotalAnswers.useQuery( + { + typebotId: typebot?.id as string, + }, + { enabled: isDefined(publishedTypebot) } + ) + + const { data: edgesData } = trpc.analytics.getTotalVisitedEdges.useQuery( { typebotId: typebot?.id as string, }, { enabled: isDefined(publishedTypebot) } ) - const startBlockId = publishedTypebot?.groups - .find((group) => group.blocks.at(0)?.type === 'start') - ?.blocks.at(0)?.id return ( { h="full" justifyContent="center" > - {publishedTypebot && - data?.totalAnswersInBlocks && - stats && - startBlockId ? ( + {publishedTypebot && stats ? ( - + + + ) : ( diff --git a/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts b/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts deleted file mode 100644 index a461529244..0000000000 --- a/apps/builder/src/features/analytics/helpers/computePreviousTotalAnswers.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { isInputBlock } from '@typebot.io/lib' -import { PublicTypebot } from '@typebot.io/schemas' -import { TotalAnswersInBlock } from '@typebot.io/schemas/features/analytics' - -export const computePreviousTotalAnswers = ( - publishedTypebot: PublicTypebot, - currentBlockId: string, - totalAnswersInBlocks: TotalAnswersInBlock[], - visitedBlocks: string[] = [] -): number => { - let totalAnswers = 0 - const allBlocks = publishedTypebot.groups.flatMap((group) => group.blocks) - const currentGroup = publishedTypebot.groups.find((group) => - group.blocks.find((block) => block.id === currentBlockId) - ) - if (!currentGroup) return 0 - const currentBlockIndex = currentGroup.blocks.findIndex( - (block) => block.id === currentBlockId - ) - const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1) - for (const block of previousBlocks.reverse()) { - if (visitedBlocks.includes(block.id)) continue - if ( - currentBlockId !== block.id && - (isInputBlock(block) || block.type === 'start') - ) { - visitedBlocks.push(block.id) - return ( - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === block.id && - totalAnswersInBlock.itemId === undefined - )?.total ?? 0 - ) - } - const connectedEdges = publishedTypebot.edges.filter( - (edge) => edge.to.blockId === block.id - ) - if (connectedEdges.length) { - for (const connectedEdge of connectedEdges) { - const connectedBlock = allBlocks.find( - (block) => block.id === connectedEdge.from.blockId - ) - if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) { - if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') { - visitedBlocks.push(connectedBlock.id) - totalAnswers += - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === connectedEdge.from.blockId && - totalAnswersInBlock.itemId === connectedEdge.from.itemId - )?.total ?? 0 - } else { - totalAnswers += computePreviousTotalAnswers( - publishedTypebot, - connectedBlock.id, - totalAnswersInBlocks, - visitedBlocks - ) - } - } - } - } - } - const edgesConnectedToGroup = publishedTypebot.edges.filter( - (edge) => edge.to.groupId === currentGroup.id - ) - - if (edgesConnectedToGroup.length) { - for (const connectedEdge of edgesConnectedToGroup) { - const connectedBlock = allBlocks.find( - (block) => block.id === connectedEdge.from.blockId - ) - if (connectedBlock && !visitedBlocks.includes(connectedBlock.id)) { - if (isInputBlock(connectedBlock) || connectedBlock.type === 'start') { - visitedBlocks.push(connectedBlock.id) - totalAnswers += - totalAnswersInBlocks.find( - (totalAnswersInBlock) => - totalAnswersInBlock.blockId === connectedEdge.from.blockId && - totalAnswersInBlock.itemId === connectedEdge.from.itemId - )?.total ?? 0 - } else { - totalAnswers += computePreviousTotalAnswers( - publishedTypebot, - connectedBlock.id, - totalAnswersInBlocks, - visitedBlocks - ) - } - } - } - } - - return totalAnswers -} diff --git a/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts b/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts new file mode 100644 index 0000000000..e2c944c5f6 --- /dev/null +++ b/apps/builder/src/features/analytics/helpers/computeTotalUsersAtBlock.ts @@ -0,0 +1,60 @@ +import { isInputBlock, isNotDefined } from '@typebot.io/lib' +import { PublicTypebotV6 } from '@typebot.io/schemas' +import { + TotalAnswers, + TotalVisitedEdges, +} from '@typebot.io/schemas/features/analytics' + +export const computeTotalUsersAtBlock = ( + currentBlockId: string, + { + publishedTypebot, + totalVisitedEdges, + totalAnswers, + }: { + publishedTypebot: PublicTypebotV6 + totalVisitedEdges: TotalVisitedEdges[] + totalAnswers: TotalAnswers[] + } +): number => { + let totalUsers = 0 + const currentGroup = publishedTypebot.groups.find((group) => + group.blocks.find((block) => block.id === currentBlockId) + ) + if (!currentGroup) return 0 + const currentBlockIndex = currentGroup.blocks.findIndex( + (block) => block.id === currentBlockId + ) + const previousBlocks = currentGroup.blocks.slice(0, currentBlockIndex + 1) + for (const block of previousBlocks.reverse()) { + if (currentBlockId !== block.id && isInputBlock(block)) + return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0 + const incomingEdges = publishedTypebot.edges.filter( + (edge) => edge.to.blockId === block.id + ) + if (!incomingEdges.length) continue + totalUsers += incomingEdges.reduce( + (acc, incomingEdge) => + acc + + (totalVisitedEdges.find( + (totalEdge) => totalEdge.edgeId === incomingEdge.id + )?.total ?? 0), + 0 + ) + } + const edgesConnectedToGroup = publishedTypebot.edges.filter( + (edge) => + edge.to.groupId === currentGroup.id && isNotDefined(edge.to.blockId) + ) + + totalUsers += edgesConnectedToGroup.reduce( + (acc, connectedEdge) => + acc + + (totalVisitedEdges.find( + (totalEdge) => totalEdge.edgeId === connectedEdge.id + )?.total ?? 0), + 0 + ) + + return totalUsers +} diff --git a/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts b/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts new file mode 100644 index 0000000000..c17769e707 --- /dev/null +++ b/apps/builder/src/features/analytics/helpers/getTotalAnswersAtBlock.ts @@ -0,0 +1,20 @@ +import { byId } from '@typebot.io/lib' +import { PublicTypebotV6 } from '@typebot.io/schemas' +import { TotalAnswers } from '@typebot.io/schemas/features/analytics' + +export const getTotalAnswersAtBlock = ( + currentBlockId: string, + { + publishedTypebot, + totalAnswers, + }: { + publishedTypebot: PublicTypebotV6 + totalAnswers: TotalAnswers[] + } +): number => { + const block = publishedTypebot.groups + .flatMap((g) => g.blocks) + .find(byId(currentBlockId)) + if (!block) throw new Error(`Block ${currentBlockId} not found`) + return totalAnswers.find((t) => t.blockId === block.id)?.total ?? 0 +} diff --git a/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts b/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts index 4cddcadc6b..9288a24e13 100644 --- a/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { BubbleBlockType, defaultAudioBubbleContent } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' +import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants' const audioSampleUrl = 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' @@ -16,7 +16,6 @@ test('should work as expected', async ({ page }) => { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.AUDIO, - content: defaultAudioBubbleContent, }), }, ]) diff --git a/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleForm.tsx b/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleForm.tsx index 56557bb3b1..83500d4dba 100644 --- a/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleForm.tsx +++ b/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleForm.tsx @@ -1,16 +1,17 @@ import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react' -import { AudioBubbleContent } from '@typebot.io/schemas' import { TextInput } from '@/components/inputs' import { useState } from 'react' import { UploadButton } from '@/components/ImageUploadContent/UploadButton' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { useTranslate } from '@tolgee/react' import { FilePathUploadProps } from '@/features/upload/api/generateUploadUrl' +import { AudioBubbleBlock } from '@typebot.io/schemas' +import { defaultAudioBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/audio/constants' type Props = { uploadFileProps: FilePathUploadProps - content: AudioBubbleContent - onContentChange: (content: AudioBubbleContent) => void + content: AudioBubbleBlock['content'] + onContentChange: (content: AudioBubbleBlock['content']) => void } export const AudioBubbleForm = ({ @@ -64,7 +65,7 @@ export const AudioBubbleForm = ({ placeholder={t( 'editor.blocks.bubbles.audio.settings.worksWith.placeholder' )} - defaultValue={content.url ?? ''} + defaultValue={content?.url ?? ''} onChange={updateUrl} /> @@ -75,7 +76,10 @@ export const AudioBubbleForm = ({ diff --git a/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx b/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx index 27f53fbcbb..8c6599756f 100644 --- a/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx +++ b/apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx @@ -1,10 +1,10 @@ import { Text } from '@chakra-ui/react' -import { AudioBubbleContent } from '@typebot.io/schemas' import { isDefined } from '@typebot.io/lib' import { useTranslate } from '@tolgee/react' +import { AudioBubbleBlock } from '@typebot.io/schemas' type Props = { - url: AudioBubbleContent['url'] + url: NonNullable['url'] } export const AudioBubbleNode = ({ url }: Props) => { diff --git a/apps/builder/src/features/blocks/bubbles/embed/components/EmbedUploadContent.tsx b/apps/builder/src/features/blocks/bubbles/embed/components/EmbedUploadContent.tsx index c661310ff0..7bd29fd9e0 100644 --- a/apps/builder/src/features/blocks/bubbles/embed/components/EmbedUploadContent.tsx +++ b/apps/builder/src/features/blocks/bubbles/embed/components/EmbedUploadContent.tsx @@ -1,12 +1,13 @@ import { TextInput, NumberInput } from '@/components/inputs' import { Stack, Text } from '@chakra-ui/react' -import { EmbedBubbleContent } from '@typebot.io/schemas' +import { EmbedBubbleBlock } from '@typebot.io/schemas' import { sanitizeUrl } from '@typebot.io/lib' import { useTranslate } from '@tolgee/react' +import { defaultEmbedBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/embed/constants' type Props = { - content: EmbedBubbleContent - onSubmit: (content: EmbedBubbleContent) => void + content: EmbedBubbleBlock['content'] + onSubmit: (content: EmbedBubbleBlock['content']) => void } export const EmbedUploadContent = ({ content, onSubmit }: Props) => { @@ -18,8 +19,9 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => { onSubmit({ ...content, url: iframeUrl }) } - const handleHeightChange = (height?: EmbedBubbleContent['height']) => - height && onSubmit({ ...content, height }) + const handleHeightChange = ( + height?: NonNullable['height'] + ) => height && onSubmit({ ...content, height }) return ( @@ -38,7 +40,7 @@ export const EmbedUploadContent = ({ content, onSubmit }: Props) => { { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.EMBED, - content: defaultEmbedBubbleContent, }), }, ]) diff --git a/apps/builder/src/features/blocks/bubbles/image/components/ImageBubbleSettings.tsx b/apps/builder/src/features/blocks/bubbles/image/components/ImageBubbleSettings.tsx index 472589c8fa..409e0696d3 100644 --- a/apps/builder/src/features/blocks/bubbles/image/components/ImageBubbleSettings.tsx +++ b/apps/builder/src/features/blocks/bubbles/image/components/ImageBubbleSettings.tsx @@ -7,6 +7,7 @@ import { Stack } from '@chakra-ui/react' import { isDefined, isNotEmpty } from '@typebot.io/lib' import { ImageBubbleBlock } from '@typebot.io/schemas' import React, { useState } from 'react' +import { defaultImageBubbleContent } from '@typebot.io/schemas/features/blocks/bubbles/image/constants' type Props = { uploadFileProps: FilePathUploadProps @@ -21,7 +22,7 @@ export const ImageBubbleSettings = ({ }: Props) => { const { t } = useTranslate() const [showClickLinkInput, setShowClickLinkInput] = useState( - isNotEmpty(block.content.clickLink?.url) + isNotEmpty(block.content?.clickLink?.url) ) const updateImage = (url: string) => { @@ -31,19 +32,19 @@ export const ImageBubbleSettings = ({ const updateClickLinkUrl = (url: string) => { onContentChange({ ...block.content, - clickLink: { ...block.content.clickLink, url }, + clickLink: { ...block.content?.clickLink, url }, }) } const updateClickLinkAltText = (alt: string) => { onContentChange({ ...block.content, - clickLink: { ...block.content.clickLink, alt }, + clickLink: { ...block.content?.clickLink, alt }, }) } const toggleClickLink = () => { - if (isDefined(block.content.clickLink) && showClickLinkInput) { + if (isDefined(block.content?.clickLink) && showClickLinkInput) { onContentChange({ ...block.content, clickLink: undefined }) } setShowClickLinkInput(!showClickLinkInput) @@ -55,6 +56,7 @@ export const ImageBubbleSettings = ({ uploadFileProps={uploadFileProps} defaultUrl={block.content?.url} onSubmit={updateImage} + excludedTabs={['emoji']} /> )} diff --git a/apps/builder/src/features/blocks/bubbles/image/image.spec.ts b/apps/builder/src/features/blocks/bubbles/image/image.spec.ts index 08861d9b72..55bf55dafb 100644 --- a/apps/builder/src/features/blocks/bubbles/image/image.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/image/image.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { BubbleBlockType, defaultImageBubbleContent } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' import { proWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' +import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants' const unsplashImageSrc = 'https://images.unsplash.com/photo-1504297050568-910d24c426d3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80' @@ -18,7 +18,6 @@ test.describe.parallel('Image bubble block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.IMAGE, - content: defaultImageBubbleContent, }), }, ]) @@ -44,7 +43,6 @@ test.describe.parallel('Image bubble block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.IMAGE, - content: defaultImageBubbleContent, }), }, ]) @@ -66,7 +64,6 @@ test.describe.parallel('Image bubble block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.IMAGE, - content: defaultImageBubbleContent, }), }, ]) diff --git a/apps/builder/src/features/blocks/bubbles/textBubble/components/TextBubbleContent.tsx b/apps/builder/src/features/blocks/bubbles/textBubble/components/TextBubbleContent.tsx index aa30230186..dac07335aa 100644 --- a/apps/builder/src/features/blocks/bubbles/textBubble/components/TextBubbleContent.tsx +++ b/apps/builder/src/features/blocks/bubbles/textBubble/components/TextBubbleContent.tsx @@ -8,7 +8,7 @@ type Props = { } export const TextBubbleContent = ({ block }: Props) => { - const isEmpty = block.content.richText.length === 0 + const isEmpty = (block.content?.richText?.length ?? 0) === 0 return ( { className="slate-html-container" color={isEmpty ? 'gray.500' : 'inherit'} > - {block.content.richText.map((element, idx) => ( + {block.content?.richText?.map((element, idx) => ( ))} diff --git a/apps/builder/src/features/blocks/bubbles/textBubble/components/plate/PlateText.tsx b/apps/builder/src/features/blocks/bubbles/textBubble/components/plate/PlateText.tsx index b99eb717a1..ec60be4dd8 100644 --- a/apps/builder/src/features/blocks/bubbles/textBubble/components/plate/PlateText.tsx +++ b/apps/builder/src/features/blocks/bubbles/textBubble/components/plate/PlateText.tsx @@ -26,22 +26,32 @@ export const PlateText = ({ const PlateTextContent = ({ text }: { text: string }) => { const { typebot } = useTypebot() + return ( <> - {text.split(/\{\{(.*?\}\})/g).map((str, idx) => { - if (str.endsWith('}}')) { - const variableName = str.trim().slice(0, -2) - const matchingVariable = typebot?.variables.find( - (variable) => variable.name === variableName - ) - if (!matchingVariable) return '{{' + str + {text.split(/\{\{=(.*?=\}\})/g).map((str, idx) => { + if (str.endsWith('=}}')) { return ( - - {str.trim().slice(0, -2)} + + {str.trim().slice(0, -3)} ) } - return str + return str.split(/\{\{(.*?\}\})/g).map((str, idx) => { + if (str.endsWith('}}')) { + const variableName = str.trim().slice(0, -2) + const matchingVariable = typebot?.variables.find( + (variable) => variable.name === variableName + ) + if (!matchingVariable) return '{{' + str + return ( + + {str.trim().slice(0, -2)} + + ) + } + return str + }) })} ) diff --git a/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts b/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts index 12e58d3a3f..35bc9c29e1 100644 --- a/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts @@ -1,8 +1,8 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { BubbleBlockType, defaultTextBubbleContent } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants' test.describe('Text bubble block', () => { test('rich text features should work', async ({ page }) => { @@ -12,7 +12,6 @@ test.describe('Text bubble block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.TEXT, - content: defaultTextBubbleContent, }), }, ]) diff --git a/apps/builder/src/features/blocks/bubbles/video/components/VideoBubbleContent.tsx b/apps/builder/src/features/blocks/bubbles/video/components/VideoBubbleContent.tsx index 112c207985..83ba9d7587 100644 --- a/apps/builder/src/features/blocks/bubbles/video/components/VideoBubbleContent.tsx +++ b/apps/builder/src/features/blocks/bubbles/video/components/VideoBubbleContent.tsx @@ -1,6 +1,7 @@ import { useTranslate } from '@tolgee/react' import { Box, Text, Image } from '@chakra-ui/react' -import { VideoBubbleBlock, VideoBubbleContentType } from '@typebot.io/schemas' +import { VideoBubbleBlock } from '@typebot.io/schemas' +import { VideoBubbleContentType } from '@typebot.io/schemas/features/blocks/bubbles/video/constants' type Props = { block: VideoBubbleBlock diff --git a/apps/builder/src/features/blocks/bubbles/video/components/VideoUploadContent.tsx b/apps/builder/src/features/blocks/bubbles/video/components/VideoUploadContent.tsx index 6681cb860e..672b27d442 100644 --- a/apps/builder/src/features/blocks/bubbles/video/components/VideoUploadContent.tsx +++ b/apps/builder/src/features/blocks/bubbles/video/components/VideoUploadContent.tsx @@ -1,16 +1,16 @@ import { Stack, Text } from '@chakra-ui/react' -import { - VariableString, - VideoBubbleContent, - VideoBubbleContentType, -} from '@typebot.io/schemas' +import { VariableString, VideoBubbleBlock } from '@typebot.io/schemas' import { NumberInput, TextInput } from '@/components/inputs' import { useTranslate } from '@tolgee/react' import { parseVideoUrl } from '@typebot.io/lib/parseVideoUrl' +import { + VideoBubbleContentType, + defaultVideoBubbleContent, +} from '@typebot.io/schemas/features/blocks/bubbles/video/constants' type Props = { - content?: VideoBubbleContent - onSubmit: (content: VideoBubbleContent) => void + content?: VideoBubbleBlock['content'] + onSubmit: (content: VideoBubbleBlock['content']) => void } export const VideoUploadContent = ({ content, onSubmit }: Props) => { @@ -47,7 +47,7 @@ export const VideoUploadContent = ({ content, onSubmit }: Props) => { {content?.type !== VideoBubbleContentType.URL && ( { id: typebotId, ...parseDefaultGroupWithBlock({ type: BubbleBlockType.VIDEO, - content: defaultVideoBubbleContent, }), }, ]) diff --git a/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts b/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts index b43f570135..5e3f4eaf59 100644 --- a/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts +++ b/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts @@ -4,13 +4,9 @@ import { importTypebotInDatabase, } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { - defaultChoiceInputOptions, - InputBlockType, - ItemType, -} from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' test.describe.parallel('Buttons input block', () => { test('can edit button items', async ({ page }) => { @@ -23,11 +19,8 @@ test.describe.parallel('Buttons input block', () => { items: [ { id: 'choice1', - blockId: 'block1', - type: ItemType.BUTTON, }, ], - options: { ...defaultChoiceInputOptions }, }), }, ]) diff --git a/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsBlockNode.tsx b/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsBlockNode.tsx index cdbdc99e15..a06973d2a5 100644 --- a/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsBlockNode.tsx +++ b/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsBlockNode.tsx @@ -13,12 +13,12 @@ type Props = { export const ButtonsBlockNode = ({ block, indices }: Props) => { const { typebot } = useTypebot() const dynamicVariableName = typebot?.variables.find( - (variable) => variable.id === block.options.dynamicVariableId + (variable) => variable.id === block.options?.dynamicVariableId )?.name return ( - {block.options.dynamicVariableId ? ( + {block.options?.dynamicVariableId ? ( Display @@ -29,7 +29,7 @@ export const ButtonsBlockNode = ({ block, indices }: Props) => { ) : ( )} - {block.options.variableId ? ( + {block.options?.variableId ? ( void + options?: ChoiceInputBlock['options'] + onOptionsChange: (options: ChoiceInputBlock['options']) => void } export const ButtonsBlockSettings = ({ options, onOptionsChange }: Props) => { const updateIsMultiple = (isMultipleChoice: boolean) => - options && onOptionsChange({ ...options, isMultipleChoice }) + onOptionsChange({ ...options, isMultipleChoice }) const updateIsSearchable = (isSearchable: boolean) => - options && onOptionsChange({ ...options, isSearchable }) + onOptionsChange({ ...options, isSearchable }) const updateButtonLabel = (buttonLabel: string) => - options && onOptionsChange({ ...options, buttonLabel }) + onOptionsChange({ ...options, buttonLabel }) const updateSearchInputPlaceholder = (searchInputPlaceholder: string) => - options && onOptionsChange({ ...options, searchInputPlaceholder }) + onOptionsChange({ ...options, searchInputPlaceholder }) const updateSaveVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, variableId: variable?.id }) + onOptionsChange({ ...options, variableId: variable?.id }) const updateDynamicDataVariable = (variable?: Variable) => - options && onOptionsChange({ ...options, dynamicVariableId: variable?.id }) + onOptionsChange({ ...options, dynamicVariableId: variable?.id }) return ( { const handlePlusClick = () => { const itemIndex = indices.itemIndex + 1 - createItem({ type: ItemType.BUTTON }, { ...indices, itemIndex }) + createItem({}, { ...indices, itemIndex }) } const updateItemSettings = (settings: Omit) => { diff --git a/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsItemSettings.tsx b/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsItemSettings.tsx index a1d0812a91..2eca5d8651 100644 --- a/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsItemSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/buttons/components/ButtonsItemSettings.tsx @@ -2,7 +2,8 @@ import React from 'react' import { Stack } from '@chakra-ui/react' import { SwitchWithRelatedSettings } from '@/components/SwitchWithRelatedSettings' import { ConditionForm } from '@/features/blocks/logic/condition/components/ConditionForm' -import { ButtonItem, Condition, LogicalOperator } from '@typebot.io/schemas' +import { ButtonItem, Condition } from '@typebot.io/schemas' +import { LogicalOperator } from '@typebot.io/schemas/features/blocks/logic/condition/constants' type Props = { item: ButtonItem diff --git a/apps/builder/src/features/blocks/inputs/date/components/DateInputSettings.tsx b/apps/builder/src/features/blocks/inputs/date/components/DateInputSettings.tsx index 96bcb82da7..a2125cc210 100644 --- a/apps/builder/src/features/blocks/inputs/date/components/DateInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/date/components/DateInputSettings.tsx @@ -3,12 +3,13 @@ import { TextInput } from '@/components/inputs' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { DateInputOptions, Variable } from '@typebot.io/schemas' +import { DateInputBlock, Variable } from '@typebot.io/schemas' import React from 'react' +import { defaultDateInputOptions } from '@typebot.io/schemas/features/blocks/inputs/date/constants' type Props = { - options: DateInputOptions - onOptionsChange: (options: DateInputOptions) => void + options: DateInputBlock['options'] + onOptionsChange: (options: DateInputBlock['options']) => void } export const DateInputSettings = ({ options, onOptionsChange }: Props) => { @@ -41,47 +42,56 @@ export const DateInputSettings = ({ options, onOptionsChange }: Props) => { @@ -89,7 +99,7 @@ export const DateInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/date/date.spec.ts b/apps/builder/src/features/blocks/inputs/date/date.spec.ts index deda473d2b..c76e75e6f9 100644 --- a/apps/builder/src/features/blocks/inputs/date/date.spec.ts +++ b/apps/builder/src/features/blocks/inputs/date/date.spec.ts @@ -1,8 +1,8 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultDateInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' test.describe('Date input block', () => { test('options should work', async ({ page }) => { @@ -12,7 +12,6 @@ test.describe('Date input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.DATE, - options: defaultDateInputOptions, }), }, ]) diff --git a/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputNodeContent.tsx b/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputNodeContent.tsx index e360a39151..2aa248fbcd 100644 --- a/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputNodeContent.tsx +++ b/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputNodeContent.tsx @@ -2,15 +2,19 @@ import React from 'react' import { Text } from '@chakra-ui/react' import { EmailInputBlock } from '@typebot.io/schemas' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' +import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants' type Props = { - variableId?: string - placeholder: EmailInputBlock['options']['labels']['placeholder'] + options: EmailInputBlock['options'] } -export const EmailInputNodeContent = ({ variableId, placeholder }: Props) => +export const EmailInputNodeContent = ({ + options: { variableId, labels } = {}, +}: Props) => variableId ? ( ) : ( - {placeholder} + + {labels?.placeholder ?? defaultEmailInputOptions.labels.placeholder} + ) diff --git a/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputSettings.tsx b/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputSettings.tsx index a85aee0c64..09ddc18ccc 100644 --- a/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/emailInput/components/EmailInputSettings.tsx @@ -1,23 +1,20 @@ import { TextInput } from '@/components/inputs' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { - EmailInputOptions, - Variable, - invalidEmailDefaultRetryMessage, -} from '@typebot.io/schemas' +import { EmailInputBlock, Variable } from '@typebot.io/schemas' +import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants' import React from 'react' type Props = { - options: EmailInputOptions - onOptionsChange: (options: EmailInputOptions) => void + options: EmailInputBlock['options'] + onOptionsChange: (options: EmailInputBlock['options']) => void } export const EmailInputSettings = ({ options, onOptionsChange }: Props) => { const handlePlaceholderChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handleVariableChange = (variable?: Variable) => onOptionsChange({ ...options, variableId: variable?.id }) const handleRetryMessageChange = (retryMessageContent: string) => @@ -27,18 +24,24 @@ export const EmailInputSettings = ({ options, onOptionsChange }: Props) => { @@ -47,7 +50,7 @@ export const EmailInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts b/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts index f3caa56655..750b1980e6 100644 --- a/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts +++ b/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts @@ -1,12 +1,9 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { - defaultEmailInputOptions, - InputBlockType, - invalidEmailDefaultRetryMessage, -} from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' +import { defaultEmailInputOptions } from '@typebot.io/schemas/features/blocks/inputs/email/constants' test.describe('Email input block', () => { test('options should work', async ({ page }) => { @@ -16,7 +13,6 @@ test.describe('Email input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.EMAIL, - options: defaultEmailInputOptions, }), }, ]) @@ -39,7 +35,7 @@ test.describe('Email input block', () => { await expect(page.locator('text=Your email...')).toBeVisible() await page.getByLabel('Button label:').fill('Go') await page.fill( - `input[value="${invalidEmailDefaultRetryMessage}"]`, + `input[value="${defaultEmailInputOptions.retryMessageContent}"]`, 'Try again bro' ) diff --git a/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputContent.tsx b/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputContent.tsx index 85515beb53..be0bd4b08b 100644 --- a/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputContent.tsx +++ b/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputContent.tsx @@ -1,18 +1,16 @@ import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' import { Text } from '@chakra-ui/react' -import { FileInputOptions } from '@typebot.io/schemas' +import { FileInputBlock } from '@typebot.io/schemas' type Props = { - options: FileInputOptions + options: FileInputBlock['options'] } -export const FileInputContent = ({ - options: { isMultipleAllowed, variableId }, -}: Props) => - variableId ? ( - +export const FileInputContent = ({ options }: Props) => + options?.variableId ? ( + ) : ( - Collect {isMultipleAllowed ? 'files' : 'file'} + Collect {options?.isMultipleAllowed ? 'files' : 'file'} ) diff --git a/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputSettings.tsx b/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputSettings.tsx index 49e336c1de..07f8d128ec 100644 --- a/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/fileUpload/components/FileInputSettings.tsx @@ -1,22 +1,23 @@ import { FormLabel, Stack } from '@chakra-ui/react' import { CodeEditor } from '@/components/inputs/CodeEditor' -import { FileInputOptions, Variable } from '@typebot.io/schemas' +import { FileInputBlock, Variable } from '@typebot.io/schemas' import React from 'react' import { TextInput } from '@/components/inputs' import { SwitchWithLabel } from '@/components/inputs/SwitchWithLabel' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' +import { defaultFileInputOptions } from '@typebot.io/schemas/features/blocks/inputs/file/constants' type Props = { - options: FileInputOptions - onOptionsChange: (options: FileInputOptions) => void + options: FileInputBlock['options'] + onOptionsChange: (options: FileInputBlock['options']) => void } export const FileInputSettings = ({ options, onOptionsChange }: Props) => { const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) const handlePlaceholderLabelChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleMultipleFilesChange = (isMultipleAllowed: boolean) => onOptionsChange({ ...options, isMultipleAllowed }) @@ -28,21 +29,24 @@ export const FileInputSettings = ({ options, onOptionsChange }: Props) => { onOptionsChange({ ...options, isRequired }) const updateClearButtonLabel = (clear: string) => - onOptionsChange({ ...options, labels: { ...options.labels, clear } }) + onOptionsChange({ ...options, labels: { ...options?.labels, clear } }) const updateSkipButtonLabel = (skip: string) => - onOptionsChange({ ...options, labels: { ...options.labels, skip } }) + onOptionsChange({ ...options, labels: { ...options?.labels, skip } }) return ( @@ -50,35 +54,44 @@ export const FileInputSettings = ({ options, onOptionsChange }: Props) => { - Save upload URL{options.isMultipleAllowed ? 's' : ''} in a variable: + Save upload URL{options?.isMultipleAllowed ? 's' : ''} in a variable: diff --git a/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts b/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts index 7132248197..01c26a7ce7 100644 --- a/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts +++ b/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultFileInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' import { freeWorkspaceId } from '@typebot.io/lib/playwright/databaseSetup' import { getTestAsset } from '@/test/utils/playwright' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' test.describe.configure({ mode: 'parallel' }) @@ -15,7 +15,6 @@ test('options should work', async ({ page }) => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.FILE, - options: defaultFileInputOptions, }), }, ]) @@ -59,8 +58,8 @@ test.describe('Free workspace', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.FILE, - options: defaultFileInputOptions, }), + version: '6', workspaceId: freeWorkspaceId, }, ]) diff --git a/apps/builder/src/features/blocks/inputs/number/components/NumberInputSettings.tsx b/apps/builder/src/features/blocks/inputs/number/components/NumberInputSettings.tsx index 6aee9ccf78..ff3388b8e6 100644 --- a/apps/builder/src/features/blocks/inputs/number/components/NumberInputSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/number/components/NumberInputSettings.tsx @@ -1,25 +1,29 @@ import { TextInput, NumberInput } from '@/components/inputs' import { VariableSearchInput } from '@/components/inputs/VariableSearchInput' import { FormLabel, Stack } from '@chakra-ui/react' -import { NumberInputOptions, Variable } from '@typebot.io/schemas' +import { NumberInputBlock, Variable } from '@typebot.io/schemas' +import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants' import React from 'react' type Props = { - options: NumberInputOptions - onOptionsChange: (options: NumberInputOptions) => void + options: NumberInputBlock['options'] + onOptionsChange: (options: NumberInputBlock['options']) => void } export const NumberInputSettings = ({ options, onOptionsChange }: Props) => { const handlePlaceholderChange = (placeholder: string) => - onOptionsChange({ ...options, labels: { ...options.labels, placeholder } }) + onOptionsChange({ ...options, labels: { ...options?.labels, placeholder } }) const handleButtonLabelChange = (button: string) => - onOptionsChange({ ...options, labels: { ...options.labels, button } }) - const handleMinChange = (min?: NumberInputOptions['min']) => - onOptionsChange({ ...options, min }) - const handleMaxChange = (max?: NumberInputOptions['max']) => - onOptionsChange({ ...options, max }) - const handleStepChange = (step?: NumberInputOptions['step']) => - onOptionsChange({ ...options, step }) + onOptionsChange({ ...options, labels: { ...options?.labels, button } }) + const handleMinChange = ( + min?: NonNullable['min'] + ) => onOptionsChange({ ...options, min }) + const handleMaxChange = ( + max?: NonNullable['max'] + ) => onOptionsChange({ ...options, max }) + const handleStepChange = ( + step?: NonNullable['step'] + ) => onOptionsChange({ ...options, step }) const handleVariableChange = (variable?: Variable) => { onOptionsChange({ ...options, variableId: variable?.id }) } @@ -28,27 +32,32 @@ export const NumberInputSettings = ({ options, onOptionsChange }: Props) => { @@ -56,7 +65,7 @@ export const NumberInputSettings = ({ options, onOptionsChange }: Props) => { Save answer in a variable: diff --git a/apps/builder/src/features/blocks/inputs/number/components/NumberNodeContent.tsx b/apps/builder/src/features/blocks/inputs/number/components/NumberNodeContent.tsx index 87cc45b740..f7f8e7a13c 100644 --- a/apps/builder/src/features/blocks/inputs/number/components/NumberNodeContent.tsx +++ b/apps/builder/src/features/blocks/inputs/number/components/NumberNodeContent.tsx @@ -2,15 +2,19 @@ import React from 'react' import { Text } from '@chakra-ui/react' import { NumberInputBlock } from '@typebot.io/schemas' import { WithVariableContent } from '@/features/graph/components/nodes/block/WithVariableContent' +import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants' type Props = { - variableId?: string - placeholder: NumberInputBlock['options']['labels']['placeholder'] + options: NumberInputBlock['options'] } -export const NumberNodeContent = ({ variableId, placeholder }: Props) => +export const NumberNodeContent = ({ + options: { variableId, labels } = {}, +}: Props) => variableId ? ( ) : ( - {placeholder} + + {labels?.placeholder ?? defaultNumberInputOptions.labels.placeholder} + ) diff --git a/apps/builder/src/features/blocks/inputs/number/number.spec.ts b/apps/builder/src/features/blocks/inputs/number/number.spec.ts index 39568262a4..f19aeb32d6 100644 --- a/apps/builder/src/features/blocks/inputs/number/number.spec.ts +++ b/apps/builder/src/features/blocks/inputs/number/number.spec.ts @@ -1,8 +1,9 @@ import test, { expect } from '@playwright/test' import { createTypebots } from '@typebot.io/lib/playwright/databaseActions' import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers' -import { defaultNumberInputOptions, InputBlockType } from '@typebot.io/schemas' import { createId } from '@paralleldrive/cuid2' +import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants' +import { defaultNumberInputOptions } from '@typebot.io/schemas/features/blocks/inputs/number/constants' test.describe('Number input block', () => { test('options should work', async ({ page }) => { @@ -12,7 +13,6 @@ test.describe('Number input block', () => { id: typebotId, ...parseDefaultGroupWithBlock({ type: InputBlockType.NUMBER, - options: defaultNumberInputOptions, }), }, ]) diff --git a/apps/builder/src/features/blocks/inputs/payment/components/PaymentInputContent.tsx b/apps/builder/src/features/blocks/inputs/payment/components/PaymentInputContent.tsx index 633a11cc1f..d094d9085c 100644 --- a/apps/builder/src/features/blocks/inputs/payment/components/PaymentInputContent.tsx +++ b/apps/builder/src/features/blocks/inputs/payment/components/PaymentInputContent.tsx @@ -7,7 +7,7 @@ type Props = { export const PaymentInputContent = ({ block }: Props) => { if ( - !block.options.amount || + !block.options?.amount || !block.options.credentialsId || !block.options.currency ) diff --git a/apps/builder/src/features/blocks/inputs/payment/components/PaymentSettings.tsx b/apps/builder/src/features/blocks/inputs/payment/components/PaymentSettings.tsx index 547ec3c1df..2da334f7ed 100644 --- a/apps/builder/src/features/blocks/inputs/payment/components/PaymentSettings.tsx +++ b/apps/builder/src/features/blocks/inputs/payment/components/PaymentSettings.tsx @@ -11,11 +11,7 @@ import { AccordionPanel, } from '@chakra-ui/react' import { DropdownList } from '@/components/DropdownList' -import { - PaymentAddress, - PaymentInputOptions, - PaymentProvider, -} from '@typebot.io/schemas' +import { PaymentAddress, PaymentInputBlock } from '@typebot.io/schemas' import React, { ChangeEvent } from 'react' import { currencies } from '../currencies' import { StripeConfigModal } from './StripeConfigModal' @@ -23,10 +19,14 @@ import { CredentialsDropdown } from '@/features/credentials/components/Credentia import { TextInput } from '@/components/inputs' import { useWorkspace } from '@/features/workspace/WorkspaceProvider' import { PaymentAddressSettings } from './PaymentAddressSettings' +import { + PaymentProvider, + defaultPaymentInputOptions, +} from '@typebot.io/schemas/features/blocks/inputs/payment/constants' type Props = { - options: PaymentInputOptions - onOptionsChange: (options: PaymentInputOptions) => void + options: PaymentInputBlock['options'] + onOptionsChange: (options: PaymentInputBlock['options']) => void } export const PaymentSettings = ({ options, onOptionsChange }: Props) => { @@ -62,43 +62,43 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => { const updateName = (name: string) => onOptionsChange({ ...options, - additionalInformation: { ...options.additionalInformation, name }, + additionalInformation: { ...options?.additionalInformation, name }, }) const updateEmail = (email: string) => onOptionsChange({ ...options, - additionalInformation: { ...options.additionalInformation, email }, + additionalInformation: { ...options?.additionalInformation, email }, }) const updatePhoneNumber = (phoneNumber: string) => onOptionsChange({ ...options, - additionalInformation: { ...options.additionalInformation, phoneNumber }, + additionalInformation: { ...options?.additionalInformation, phoneNumber }, }) const updateButtonLabel = (button: string) => onOptionsChange({ ...options, - labels: { ...options.labels, button }, + labels: { ...options?.labels, button }, }) const updateSuccessLabel = (success: string) => onOptionsChange({ ...options, - labels: { ...options.labels, success }, + labels: { ...options?.labels, success }, }) const updateDescription = (description: string) => onOptionsChange({ ...options, - additionalInformation: { ...options.additionalInformation, description }, + additionalInformation: { ...options?.additionalInformation, description }, }) const updateAddress = (address: PaymentAddress) => onOptionsChange({ ...options, - additionalInformation: { ...options.additionalInformation, address }, + additionalInformation: { ...options?.additionalInformation, address }, }) return ( @@ -108,7 +108,7 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => { @@ -117,7 +117,7 @@ export const PaymentSettings = ({ options, onOptionsChange }: Props) => { { Currency: