-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(triggers): add Salesforce webhook triggers #3982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
feat(triggers): add Salesforce webhook triggers
- Loading branch information
commit ce78227f66d783bb7a267697d82429f32c474660
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { SalesforceIcon } from '@/components/icons' | ||
| import { buildTriggerSubBlocks } from '@/triggers' | ||
| import { | ||
| buildSalesforceCaseStatusOutputs, | ||
| salesforceSetupInstructions, | ||
| salesforceTriggerOptions, | ||
| } from '@/triggers/salesforce/utils' | ||
| import type { TriggerConfig } from '@/triggers/types' | ||
|
|
||
| /** | ||
| * Salesforce Case Status Changed Trigger | ||
| */ | ||
| export const salesforceCaseStatusChangedTrigger: TriggerConfig = { | ||
| id: 'salesforce_case_status_changed', | ||
| name: 'Salesforce Case Status Changed', | ||
| provider: 'salesforce', | ||
| description: 'Trigger workflow when a case status changes', | ||
| version: '1.0.0', | ||
| icon: SalesforceIcon, | ||
|
|
||
| subBlocks: buildTriggerSubBlocks({ | ||
| triggerId: 'salesforce_case_status_changed', | ||
| triggerOptions: salesforceTriggerOptions, | ||
| setupInstructions: salesforceSetupInstructions('Case Status Changed'), | ||
| }), | ||
|
|
||
| outputs: buildSalesforceCaseStatusOutputs(), | ||
|
|
||
| webhook: { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export { salesforceCaseStatusChangedTrigger } from './case_status_changed' | ||
| export { salesforceOpportunityStageChangedTrigger } from './opportunity_stage_changed' | ||
| export { salesforceRecordCreatedTrigger } from './record_created' | ||
| export { salesforceRecordDeletedTrigger } from './record_deleted' | ||
| export { salesforceRecordUpdatedTrigger } from './record_updated' | ||
| export { salesforceWebhookTrigger } from './webhook' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { SalesforceIcon } from '@/components/icons' | ||
| import { buildTriggerSubBlocks } from '@/triggers' | ||
| import { | ||
| buildSalesforceOpportunityStageOutputs, | ||
| salesforceSetupInstructions, | ||
| salesforceTriggerOptions, | ||
| } from '@/triggers/salesforce/utils' | ||
| import type { TriggerConfig } from '@/triggers/types' | ||
|
|
||
| /** | ||
| * Salesforce Opportunity Stage Changed Trigger | ||
| */ | ||
| export const salesforceOpportunityStageChangedTrigger: TriggerConfig = { | ||
| id: 'salesforce_opportunity_stage_changed', | ||
| name: 'Salesforce Opportunity Stage Changed', | ||
| provider: 'salesforce', | ||
| description: 'Trigger workflow when an opportunity stage changes', | ||
| version: '1.0.0', | ||
| icon: SalesforceIcon, | ||
|
|
||
| subBlocks: buildTriggerSubBlocks({ | ||
| triggerId: 'salesforce_opportunity_stage_changed', | ||
| triggerOptions: salesforceTriggerOptions, | ||
| setupInstructions: salesforceSetupInstructions('Opportunity Stage Changed'), | ||
| }), | ||
|
|
||
| outputs: buildSalesforceOpportunityStageOutputs(), | ||
|
|
||
| webhook: { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { SalesforceIcon } from '@/components/icons' | ||
| import { buildTriggerSubBlocks } from '@/triggers' | ||
| import { | ||
| buildSalesforceExtraFields, | ||
| buildSalesforceRecordOutputs, | ||
| salesforceSetupInstructions, | ||
| salesforceTriggerOptions, | ||
| } from '@/triggers/salesforce/utils' | ||
| import type { TriggerConfig } from '@/triggers/types' | ||
|
|
||
| /** | ||
| * Salesforce Record Created Trigger | ||
| * | ||
| * PRIMARY trigger — includes the dropdown for selecting trigger type. | ||
| */ | ||
| export const salesforceRecordCreatedTrigger: TriggerConfig = { | ||
| id: 'salesforce_record_created', | ||
| name: 'Salesforce Record Created', | ||
| provider: 'salesforce', | ||
| description: 'Trigger workflow when a Salesforce record is created', | ||
| version: '1.0.0', | ||
| icon: SalesforceIcon, | ||
|
|
||
| subBlocks: buildTriggerSubBlocks({ | ||
| triggerId: 'salesforce_record_created', | ||
| triggerOptions: salesforceTriggerOptions, | ||
| includeDropdown: true, | ||
| setupInstructions: salesforceSetupInstructions('Record Created'), | ||
| extraFields: buildSalesforceExtraFields('salesforce_record_created'), | ||
| }), | ||
|
|
||
| outputs: buildSalesforceRecordOutputs(), | ||
|
|
||
| webhook: { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { SalesforceIcon } from '@/components/icons' | ||
| import { buildTriggerSubBlocks } from '@/triggers' | ||
| import { | ||
| buildSalesforceExtraFields, | ||
| buildSalesforceRecordOutputs, | ||
| salesforceSetupInstructions, | ||
| salesforceTriggerOptions, | ||
| } from '@/triggers/salesforce/utils' | ||
| import type { TriggerConfig } from '@/triggers/types' | ||
|
|
||
| /** | ||
| * Salesforce Record Deleted Trigger | ||
| */ | ||
| export const salesforceRecordDeletedTrigger: TriggerConfig = { | ||
| id: 'salesforce_record_deleted', | ||
| name: 'Salesforce Record Deleted', | ||
| provider: 'salesforce', | ||
| description: 'Trigger workflow when a Salesforce record is deleted', | ||
| version: '1.0.0', | ||
| icon: SalesforceIcon, | ||
|
|
||
| subBlocks: buildTriggerSubBlocks({ | ||
| triggerId: 'salesforce_record_deleted', | ||
| triggerOptions: salesforceTriggerOptions, | ||
| setupInstructions: salesforceSetupInstructions('Record Deleted'), | ||
| extraFields: buildSalesforceExtraFields('salesforce_record_deleted'), | ||
| }), | ||
|
|
||
| outputs: buildSalesforceRecordOutputs(), | ||
|
|
||
| webhook: { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| }, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { SalesforceIcon } from '@/components/icons' | ||
| import { buildTriggerSubBlocks } from '@/triggers' | ||
| import { | ||
| buildSalesforceExtraFields, | ||
| buildSalesforceRecordOutputs, | ||
| salesforceSetupInstructions, | ||
| salesforceTriggerOptions, | ||
| } from '@/triggers/salesforce/utils' | ||
| import type { TriggerConfig } from '@/triggers/types' | ||
|
|
||
| /** | ||
| * Salesforce Record Updated Trigger | ||
| */ | ||
| export const salesforceRecordUpdatedTrigger: TriggerConfig = { | ||
| id: 'salesforce_record_updated', | ||
| name: 'Salesforce Record Updated', | ||
| provider: 'salesforce', | ||
| description: 'Trigger workflow when a Salesforce record is updated', | ||
| version: '1.0.0', | ||
| icon: SalesforceIcon, | ||
|
|
||
| subBlocks: buildTriggerSubBlocks({ | ||
| triggerId: 'salesforce_record_updated', | ||
| triggerOptions: salesforceTriggerOptions, | ||
| setupInstructions: salesforceSetupInstructions('Record Updated'), | ||
| extraFields: buildSalesforceExtraFields('salesforce_record_updated'), | ||
| }), | ||
|
|
||
| outputs: buildSalesforceRecordOutputs(), | ||
|
|
||
| webhook: { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| }, | ||
| }, | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.