Outbound Wiki

Trigger-based messaging

Connecting a message to a recent event or change that makes a problem more urgent or relevant.

a low plain cabinet carrying a row of identical shallow open trays, evenly spaced, each holding a thin stack of plain sheets. On top of the stack in one tray lies a single sheet exactly the same size and shape as every other sheet in the trays, squared up with the stack beneath it, and that one sheet is mint green. The trays, and every other sheet in them, are plain. A short stack of plain folders rests at the far end of the cabinet top. The cabinet is seen from the front and a little above, square to the frame: its front flat to the viewer, its top edge level and parallel to the bottom of the drawing, never turned at an angle or tilted.

Trigger based messaging works when a recent event changes the prospect's situation and gives you a reason to write now. It needs two connected parts: the commercial trigger explains why the message belongs in this moment, and the technical trigger proves that the event happened. A trigger's age can matter more than its familiarity. If the event fires but the delivered message could still be sent to anyone, the trigger is doing no useful work.

Choose the event

Start with the change in the prospect's world. Decide whether it gives you a specific reason to contact them, what is different now, and what your message can address because of that change.

Ask:

  • What changed?
  • When did it change?
  • What problem or priority does that change create?
  • What can you say now that would have sounded premature before the event?
  • What should the recipient be able to do with the message?

Write the event in language that a person can recognize and a system can detect. If you cannot describe both sides, keep working on the trigger before writing copy.

Define the activation condition

Turn the event into a rule that can fire reliably. Make the source and conditions explicit before you build the campaign around it.

In the campaign setup flow, select Customer event under Recipients.1 Select an Event source to show where the data originates, then configure the attribute conditions that activate the event trigger.2 Event sources can be based on integrations in the Customer Profiles domain.3 They can also integrate with Kinesis or S3.4

Ask which source contains the event, which attributes prove that it happened, and which values should activate the message. Write those conditions where the person creating the campaign and the person writing the message can both see them. Move on when the team can point to the event source and explain the activation rule without translating it from technical language.

Map the event to the message

The payload connects the event to the copy. Choose fields that let the recipient see why the message reached them, while keeping the message tied to the condition that caused the send.

In Salesforce, an outbound message is an automated action that sends information to an external service as a SOAP message over HTTP(S) when specific criteria are met.5 Once outbound messaging is configured, the message goes to the designated endpoint whenever the triggering event occurs.6 It includes the fields selected during its creation.7

Use field filters or a formula field when the default event rule is too broad and you need finer control over which notifications the external system receives.8 Then ask which fields the message needs, which field explains the reason for contact, and which field supports the next action. Keep the commercial wording close to those fields so the message reflects the event that actually fired.

Set the delivery path

A trigger is ready for use when the delivery path is clear. Set the destination, delivery mode, and communication settings alongside the event rule so the team can test the complete path.

Select the Delivery mode and additional communication settings in the campaign configuration.9 If the destination is a communication widget campaign, a Customer Profiles integration between the Customer Profiles domain and the instance is required.10 The required object type name is Campaign-WebNotification.11 Create the integration by choosing the upgrade button in the Connect Customer admin website console, selecting the instance, and opening the Outbound campaigns subpage.12

Ask where the event lands, which settings control delivery, and whether the receiving system expects a particular object or communication path. Give the technical team the event, source, conditions, fields, and destination together with the copy.

Test the full chain

Test the event path before you judge the wording. A message can sound precise and still fail because the source does not meet the condition, the payload omits a needed field, or the receiving endpoint expects a response the trigger does not provide.

If a real business endpoint is unavailable, Webhook.site can provide a unique random URL for testing and debugging outbound messages.13 Test with the same event source and attribute conditions planned for live use, then inspect what arrives at the endpoint.

Third-party apps and services often have unique webhook requirements.14 Some expect confirmation messages or specific responses, while others send proprietary data that must be parsed before it is useful in an integration.15 Developers can customize the webhook response and keep third-party logic inside triggers.16 Putting that detail inside the trigger removes webhook complexity from integration builders and can let them build integrations with fewer steps.1718

Move on when the trigger fires under the intended condition, the endpoint receives the expected fields, and any required response or parsing behavior works. Then read the message as the recipient would and remove anything that depends on an event the payload does not prove.

Prepare for live behavior

Live delivery needs its own operating check. Decide how the receiving system will handle a public endpoint, a message that arrives out of sequence, and a record that changes again before delivery.

Ask whether the destination can receive the message securely, whether the message needs an event history, and what the recipient should see when the latest record state differs from the state that caused the trigger. These answers determine how much confidence the message can carry and what the receiving system must retain.

What not to do

These failure modes affect what you can safely promise in the message.

  • A stale trigger such as congratulating a prospect on funding can make the message blend in with other outreach.19
  • Treat a public endpoint as part of the deployment design. Salesforce Outbound Messages require a public URL and bring security considerations, while the Streaming API can run behind a firewall without a public facing URL.20
  • Do not assume a missed notification can be replayed or that notifications will arrive in the order the events occurred.21
  • Keep the notification ID with the received message. Each notification includes an ID, and replay is unavailable.22
  • A payload can contain only the latest data from the most recent change if the record changes before the message is sent.23
  • A working workflow does not prove that the outbound trigger fires. In a reported setup, outbound campaign calls ran while the workflow was never called.24 The workflow existed and worked in that setup.25

Before the next launch, write the event, source, condition, fields, and delivery path in the same working note. Test that chain with a safe endpoint, then make the message speak only to the situation the event proves.

Sources

  1. 1
    “On the Campaign set up page, select Customer event under Recipients.”
  2. 2
    “Select an Event source to specify where the data originates, and configure the attribute conditions that will activate the event trigger.”
  3. 3
    “Event sources are based on integrations in your Customer Profiles domain.”
  4. 4
    “You can also integrate with Kinesis or S3.”
  5. 5
    “An Outbound Message in Salesforce is a form of automated action that sends information to an external service in the form of a SOAP message over HTTP(S) when specific criteria are met.”
  6. 6
    “Once you have configured outbound messaging, a message is sent to the designated endpoint URL whenever a triggering event occurs.”
  7. 7
    “This message includes the fields you selected during the creation of the outbound message.”
  8. 8
    “Workflow Rules allow a finer set of criteria based on field filters, or a formula field, which can give you more control over which notifications your application receives.”
  9. 9
    “Select the Delivery mode and additional communication settings.”
  10. 10
    “To create a communication widget campaign, you must have a Customer Profiles integration between your Customer Profiles domain and your instance.”
  11. 11
    “The required object type name is Campaign-WebNotification.”
  12. 12
    “You can do this by choosing the upgrade button in the Connect Customer admin website console by selecting your instance and then going to the Outbound campaigns subpage.”
  13. 13
    “Since he doesn’t have a real business use case or endpoint URL, he decided to use Webhook.site, to get a unique, random URL for testing and debugging outbound messages.”
  14. 14
    “The third-party apps and services that you integrate with often have unique requirements when it comes to webhooks.”
  15. 15
    “Some third parties expect confirmation messages or particular responses when they send webhook requests, and others send proprietary data that needs to be parsed before it's useful in an integration.”
  16. 16
    “Using Prismatic's existing custom component SDK, developers now have the flexibility to customize how a webhook trigger responds to a request from a third party and to encapsulate third-party-specific logic within triggers.”
  17. 17
    “Bundling up these nitty-gritty details within the trigger abstracts many complexities from integration builders.”
  18. 18
    “This means your integration builders – who are often non-developers – don't need deep familiarity with webhooks and can now build integrations faster and with fewer steps.”
  19. 19
    “If you are still using stale triggers, like congrats on the funding, you're getting blended”
  20. 20
    “Outbound Messages require you to expose a public URL which receives the notifications, and there are some security considerations to be aware of. The Streaming API does not require a public facing URL and can run behind a firewall.”
  21. 21
    “There is no ‘Replay’ behavior in Outbound Messages and there is no guarantee that notifications will come in the order they occurred.”
  22. 22
    “You will receive an Id for each notification, but there is no way to replay notifications.”
  23. 23
    “Similarly, if a record is changed before your message is sent, it may only contain the latest data from the most recent change.”
  24. 24
    “We're doing outbound campaign calls but the workflow is never called.”
  25. 25
    “The workflow exists and is a duplicate of the one used for testing others triggers, so it does work.”