This article walks through the steps to configure outbound webhooks for the following events: client_create, client_update, subscription_create, and subscription_update on the Opus1.io platform.
This article walks through the steps to configure outbound webhooks for the following events: client_create
, client_update
, subscription_create
, and subscription_update
on the Opus1.io platform. These webhooks allow for real-time data syncing between Opus1.io and external systems, providing essential information about clients and their subscriptions.
Prerequisites
Before configuring outbound webhooks, ensure you have the following:
- Access to the Opus1.io platform with sufficient permissions to configure webhooks.
- The URL of the external system's webhook endpoint where Opus1.io will send event data.
- Familiarity with handling webhook payloads on the receiving end.
Supported Webhook Events
Opus1.io supports the following outbound webhook events:
client_create
: Triggered when a new client is created.client_update
: Triggered when a client's information is updated.subscription_create
: Triggered when a new subscription is created.subscription_update
: Triggered when a subscription is updated.
Outbound Webhook Configuration Process
To configure outbound webhooks for these events, follow these steps:
-
Log into Opus1.io: Navigate to the webhook configuration section by navigating to Business > Integrations > Webhooks.
-
Create a New Outbound Webhook:
- Click the + Add Webhook button.
- In the Webhook Name field, enter a name that identifies the purpose of the webhook, e.g.,
Client Creation Webhook
orSubscription Update Webhook
. - Select Outbound Webhook as the Webhook Type.
- Set Trigger Type
- In the Webhook Trigger field, select client_create_trigger, client_update_trigger, subscription_create_trigger, or subscription_update_trigger.
- Set the Webhook URL:
-
- In the Webhook URL field, enter the URL of the endpoint where the webhook payload will be sent.
- Finally, click Update Business to save your Outbound Webhook.
Webhook Payload Structure:
Opus1.io will send a POST request to the webhook URL with a JSON payload containing the event data. The payload structure will vary based on the event, but it will follow a consistent format for client and subscription events respectively.
-
-
Client Webhook Payload (
client_create
,client_update
):{
"business": "string",
"id": "integer",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"email": "string",
"status": "string",
"tags": ["string"],
"new_member_at": "datetime",
"member_lost_at": "datetime",
"primary_phone": "string",
"street": "string",
"zip_code": "string",
"city": "string",
"state": "string",
"country": "string",
"birthdate": "date",
"staff_role": "string",
"staff_employee_id": "string"
} -
Subscription Webhook Payload (
subscription_create
,subscription_update
):{
"business": "string",
"id": "integer",
"status": "string",
"client_id": "integer",
"payer_id": "integer",
"secondary_payer_id": "integer",
"service_id": "integer",
"session_id": "integer",
"location_id": "integer",
"primary_staff_id": "integer",
"terms_accepted_at": "datetime",
"created_at": "datetime",
"ended_at": "datetime",
"start_at": "datetime",
"end_at": "datetime",
"replacing_subscription_id": "integer",
"replaced_by_subscription_id": "integer"
}
-
Testing the Webhook
To verify the webhook is working correctly:
- Use a tool like Webhook.site to inspect the payload and headers.
- Confirm that your system's endpoint is receiving and processing the data as expected.
- Opus1.io will display the status of recent webhook deliveries, including any failed attempts. Use this log for troubleshooting if needed.
Conclusion
By setting up outbound webhooks, Opus1.io can automatically push real-time updates about clients and their subscriptions to external systems. Make sure to test the configuration thoroughly to ensure data is being transmitted correctly and any errors are handled appropriately.
For additional help, please refer to the Opus1.io support documentation or contact support.