Outlook on Notifcations

Best Webhook Provider for Communication in Real-time

Anjali Arya
May 21, 2024
TABLE OF CONTENTS

Imagine never having to manually check notification statuses ever again. With SuprSend's webhook provider functionality, you can achieve exactly that. This article dives into how SuprSend webhooks empower your application to receive instant updates on notification events, keeping you in the loop and allowing for real-time actions.

What are Webhooks and How Can They Benefit You?

Webhooks are essentially messengers, acting as a communication channel between applications. SuprSend, as a webhook provider, utilizes this technology to send real-time data notifications directly to your application. This eliminates the need for constant polling or manual checks, streamlining the process significantly.

Here's how webhooks from SuprSend can benefit you:

  • Real-time Updates: Get instant notifications whenever a notification event occurs, such as a message being sent, delivered, seen, or even replied to by the recipient.
  • Actionable Insights: Filter for specific events to receive only the information relevant to your application. This allows you to trigger actions based on these updates, like updating user interfaces or sending automated follow-up notifications.
  • Streamlined Workflow: Eliminate the need for manual monitoring and free up valuable resources for other tasks.

Key Considerations for Choosing the Ideal Webhook Provider

Reliable Delivery Mechanisms

The primary function of a webhook provider is ensuring dependable and accurate transmission of data among connected systems. Look for providers boasting high uptime guarantees, redundancy measures, failover procedures, and monitoring capabilities. Additionally, consider providers offering retries, error handling, and logging features to ensure no crucial information slips through the cracks.

Scalability and Performance

As your business grows, your webhook infrastructure must scale alongside it. Seek providers capable of managing increased loads efficiently without performance degradation. Features such as traffic shaping, load balancing, caching, and concurrency controls contribute significantly toward maintaining smooth and responsive interactions across integrated tools.

Security and Compliance

Data security remains paramount when sharing sensitive information. Opt for webhook providers enforcing robust encryption protocols (HTTPS), access control policies, and secret management practices. Investigating certifications, standards compliance (SOCS Type II, GDPR, HIPAA, PCI-DSS), and vulnerability assessments help validate credible providers committed to safeguarding your data.

Developer Experience and Ease of Integration

Integrating third-party APIs often falls onto developers; thus, opt for a webhook provider delivering stellar developer experience. Key aspects include comprehensive documentation, client libraries, SDKs, code samples, tutorials, clear API design principles, and friendly community support. Furthermore, explore providers embracing modern development paradigms, such as GraphQL subscriptions, gRPC streaming, or bi-directional websockets.

Cost and Pricing Models

Balancing cost against required features and usage volumes ensures long-term sustainability. Assess pricing models aligning with anticipated consumption patterns and growth trajectory. Compare costs associated with additional resources (storage, compute power, bandwidth, support tiers), potential overage fees, and contractual terms before committing.

Getting Started with SuprSend Webhook Provider

The process of setting up SuprSend's webhooks is refreshingly straightforward. Here's a quick rundown:

  1. Create an Endpoint: Develop an endpoint within your application that can handle HTTP POST requests with JSON data (application/json content-type). This will be the URL where SuprSend will send notification updates.
  2. Configure Webhooks in SuprSend Dashboard: Navigate to the SuprSend settings and enable the webhooks feature.  Then, click "Add Endpoint" and provide the following details:
    • The URL of the endpoint you created in step 1.
    • A descriptive name for easy reference.
    • Select the notification events you want to receive updates for (e.g., delivered, seen). You can choose different events for various channels supported by SuprSend (currently WhatsApp and SMS, with more to come).

Understanding the Webhook Payload

SuprSend transmits data through JSON payloads, providing detailed information about the notification event and any relevant vendor response (if applicable). The structure is consistent across channels, with the vendor response section adapting to the specific vendor's data format.

SuprSend offers two primary webhook payload structures:

  1. Notification Statuses: This payload keeps you informed about notification delivery and user interactions. It includes details like recipient information, event type (delivered, seen), reference IDs, the notification template used, and the vendor name. Additionally, it provides a vendor response section with specific details about the event.
  2. Two-way Communication (User Replies): This structure is applicable for scenarios where you want to capture user replies and potentially send further notifications based on their response. The payload includes an additional section dedicated to the "suprsend_inbound_message," containing details about the user's reply.

Here is a sample Whatsapp webhook payload for 2 way communication.

 
    {
      "channel": "whatsapp",
      "channel_value": "+15555555555",
      "distinct_id": "joe@example.com",
      "event_type": "inbound_message",
      "reference": {
        "idempotency_key": "a29a7a15-7a02-400b-8257-2220750b11b3",
        "supr_execution_id": "01H08212H17MMW152F370TM4FT",
        "supr_ngid": "01H08212QBEN2Q2E0XHNPK0NBF",
        "supr_nid": "01H08212QETNQ7J71B42V3XVKD",
        "vendor_ack_id": "4902186086570803293-kfWdrPL1nFqs7OUihiBn-01H08212QETNQ7J71B42V3XVKD",
        "workspace_name": "staging",
        "workspace_uid": "lap5XXXXXXXXXXX"
      },
      "suprsend_inbound_message": {
        "context": {
          "from": "+14444444444",
          "id": "gBEGkZMmKUh5AglyguZOxeyE6Xc"
        },
        "from": "+15555555555",
        "message_type": "quoted",
        "source_message_id": "lap5XXXXXXXXXXX-01H08212QETNQ7J71B42V3XVKD",
        "source_message_sent_via_suprsend": true,
        "text": {
          "body": "Hi"
        },
        "timestamp": 1683898377000,
        "to": "+14444444444",
        "type": "text"
      },
      "template": "purchase-done",
      "vendor_name": "gupshup",
      "vendor_response": {
        "gupshup": {
          "context": "{\"from\":\"+14444444444\",\"id\":\"gBEGkZMmKUh5AglyguZOxeyE6Xc\"}",
          "messageId": "lap5XXXXXXXXXXX-01H08212QETNQ7J71B42V3XVKD",
          "mobile": "+15555555555",
          "name": "Joe",
          "replyId": "4902186086570803293",
          "text": "Hi",
          "timestamp": "1683898377000",
          "type": "text",
          "waNumber": "+14444444444"
        }
      },
      "version": "1.0",
      "workflow_name": "Purchase Done"
    }

    

Conclusion

SuprSend as webhook provider empowers you to stay on top of notification delivery and user interactions with real-time updates. This functionality seamlessly integrates with your application, enabling you to automate actions and create a more dynamic notification experience. If you're looking to streamline your notification workflows and leverage real-time data, SuprSend webhooks are a valuable tool to consider.

You can check the documentation here: Outbound Webhook (suprsend.com)

Written by:
Anjali Arya
Product & Analytics, SuprSend
ABOUT THE AUTHOR

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Implement a powerful stack for your notifications

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.