Webhook

Google Pub/Sub Broadcaster Setup Guide

Introduction

This guide will help you configure the Google Pub/Sub Broadcaster feature, enabling you to broadcast platform events to your Google Pub/Sub topics.

Steps to Configure Google Pub/Sub Broadcaster

To access the Google Pub/Sub Broadcaster:

  1. Log in to the Fynd Partner Panel.
  2. Navigate to Extensions and select the desired extension.
  3. Under the selected extension, click on Webhook.
  4. Click on Add Configuration.
  5. From the broadcaster options, select GCP PubSub.
  6. You will be directed to the Google Pub/Sub Config page.
  7. Fill in the following details:
    • Name: Provide a name for identification.
    • Credentials: Upload your Google Cloud service account credentials JSON file.
  8. Click on Validate. The platform will use the provided credentials to connect to Google Pub/Sub. If validation is successful, a confirmation message will be displayed.
  9. Click Save to finalize the configuration. A pop-up will appear indicating Validation Successful if the entered details are valid.

Create PubSub Subscriber API

curl --location 'https://{{host}}/service/platform/webhook/v2.0/company/1/subscriber' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{Bearer Token}}' \
--data-raw '{
    "name": "PubSub Subscriber",
    "provider": "pub_sub",
    "association": {
        "company_id": 1,
        "criteria": "ALL",
        "extension_id":"6684c91938568e58638a2b42"
    },
    "custom_headers": {},
    "status": "active",
    "email_id": "praveenraturi@gofynd.com",
    "auth_meta": {},
    "events": [
        {
            "slug": "company/article/update/v1",
            "topic": "fynd-json-broadcast-extension"
        }
    ]
}'
Congratulations!

You have successfully configured the Google Pub/Sub Broadcaster feature, enabling seamless event broadcasting for effective collaboration with Fynd Commerce.