-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add section to API Handbook for webhooks #41
Comments
Suggested Draft of content to be addedWebhooks are a way for the OFN system to send messages to another system that supports it.
Permitted users may subscribe to certain events, providing a unique URL address (or endpoint) for the other system. When the relevant event occurs, a message is sent with a payload containing data about the event. {
"id": "374e0a40-f1d4-410c-9dc3-965baddde66b",
"at": "2023-02-07 17:12:45 +1100",
"event": "order_cycle.opened",
"data": {
"id": 3813,
"name": "Another test order cycle",
"orders_open_at": "2023-02-07T17:10:00.000+11:00",
"orders_close_at": "2023-02-08T12:00:00.000+11:00",
"coordinator_id": 2515,
"coordinator_name": "David's Dev Shop"
}
} To set this up, go to Account > Developer Settings > Webhook Endpoints. Select from the available events, and enter the unique endpoint URL provided by the other system. Click create. Once created, the other system will receive a request on this URL each time the event occurs, with a payload containing relevant information. Error handlingIf there is an error sending the webhook, it will be retried later. We use Sidekiq's default schedule, which means it will perform 25 retries over approximately 20 days, with an exponential backoff. |
I just discovered the OFN API handbook here: https://ofn-user-guide.gitbook.io/ofn-api-handbook/ This suggested content should go in there. But I can't find it in GitHub so I'm not sure how to suggest it, so I'll rename and keep this issue open for the moment. |
Just found some old terminology notes I had written which I might incorporate: Endpoint: A URL that the OFN system will send a HTTP POST to whenever a certain event occurs |
Admin Only: Language Checklist for when this Update is Complete
Tell us what you would like to see
Which language version of the User Guide are you viewing? English
Description
A new feature has been released to set up webhooks triggered by an event (order cycle opened). I'd like to document this so that it is easy to discover and refer to.
This is different but similar to the API.
Currently we have no documentation about API features, but I think it's time to create a section for this, to make it possible for any users to discover what options they can start to use.Currently there's an API Handbook at https://ofn-user-guide.gitbook.io/ofn-api-handbook/. This section should be added there.
Which section would you like the new content to be added to?
I'm open to suggestions, but I think there should be a new top-level section (same level as "OFN API V1").
I can imagine it would be useful to create "how to" guides as well (eg how to send an email notification when order cycle opens).
In which instance(s) do you know that users are adversely affected by this information being missing from the User Guide in its current form?
Unknown
How would you rate the impact of the current version of the User Guide on your instance?
Suggested Draft of content to be added
Added to comment below.
I would like to be part of a larger User Guide group who write this section
The text was updated successfully, but these errors were encountered: