@@ -19,16 +19,29 @@ export const salesforceTriggerOptions = [
1919 * Flow HTTP Callouts or Outbound Messages manually.
2020 */
2121export function salesforceSetupInstructions ( eventType : string ) : string {
22- const instructions = [
23- 'Copy the <strong>Webhook URL</strong> above.' ,
24- 'In Salesforce, go to <strong>Setup → Flows</strong> and click <strong>New Flow</strong>.' ,
25- `Select <strong>Record-Triggered Flow</strong> and choose the object and <strong>${ eventType } </strong> trigger condition.` ,
26- 'Add an <strong>HTTP Callout</strong> action — set the method to <strong>POST</strong> and paste the webhook URL.' ,
27- 'In the request body, include the record fields you want sent as <strong>JSON</strong> (e.g., Id, Name, and any relevant fields).' ,
28- 'Save and <strong>Activate</strong> the Flow.' ,
29- 'Click <strong>"Save"</strong> above to activate your trigger.' ,
30- '<em>Alternative: You can also use <strong>Setup → Outbound Messages</strong> with a Workflow Rule, but this sends SOAP/XML instead of JSON.</em>' ,
31- ]
22+ const isGeneric = eventType === 'All Events'
23+
24+ const instructions = isGeneric
25+ ? [
26+ 'Copy the <strong>Webhook URL</strong> above.' ,
27+ 'In Salesforce, go to <strong>Setup → Flows</strong> and click <strong>New Flow</strong>.' ,
28+ 'Select <strong>Record-Triggered Flow</strong> and choose the object(s) you want to monitor.' ,
29+ 'Add an <strong>HTTP Callout</strong> action — set the method to <strong>POST</strong> and paste the webhook URL.' ,
30+ 'In the request body, include the record fields you want sent as <strong>JSON</strong> (e.g., Id, Name, and any relevant fields).' ,
31+ 'Repeat for each object type you want to send events for.' ,
32+ 'Save and <strong>Activate</strong> the Flow(s).' ,
33+ 'Click <strong>"Save"</strong> above to activate your trigger.' ,
34+ ]
35+ : [
36+ 'Copy the <strong>Webhook URL</strong> above.' ,
37+ 'In Salesforce, go to <strong>Setup → Flows</strong> and click <strong>New Flow</strong>.' ,
38+ `Select <strong>Record-Triggered Flow</strong> and choose the object and <strong>${ eventType } </strong> trigger condition.` ,
39+ 'Add an <strong>HTTP Callout</strong> action — set the method to <strong>POST</strong> and paste the webhook URL.' ,
40+ 'In the request body, include the record fields you want sent as <strong>JSON</strong> (e.g., Id, Name, and any relevant fields).' ,
41+ 'Save and <strong>Activate</strong> the Flow.' ,
42+ 'Click <strong>"Save"</strong> above to activate your trigger.' ,
43+ '<em>Alternative: You can also use <strong>Setup → Outbound Messages</strong> with a Workflow Rule, but this sends SOAP/XML instead of JSON.</em>' ,
44+ ]
3245
3346 return instructions
3447 . map (
0 commit comments