The Workflow Webhook can notify external tools when an influencer's workflow status has changed, allowing you to trigger actions in other platforms programmatically.
The webhook can work with any software that can ingest the responses. A developer resource on your team is required to enable this functionality.
In this article:
- Workflow Webhook Setup
- API Reference
- Response & Retry Policy
- Deduplication
- Workflow Stage Labels & Slugs
Workflow Webhook Setup
To set up the Workflow Webhook, navigate to the Settings section, then the Webhook Setup tab. Enter your application’s HTTP(S) POST endpoint that will receive change events for workflow stages. The resulting relationship between your application and your instance is referred to as a subscriber.
When it's first set up, a token will be generated for your subscriber. Use this token to authorize HTTP(S) POST requests to your application.
API Reference
The Workflow Webhook is documented in Swaggerhub here.
Request Body Example
{
event: {
campaign: {
id: 12345
instance_id: 123
},
current: {
label: ‘Complete’,
slug: ‘complete’,
},
influencer: {
id: 1000000,
membership_id: 1000,
},
previous: {
label: ‘Content Creation’,
slug: ‘pending_content’,
},
},
subscriber_id: ‘1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed’,
token: ‘1a2b3c4d5e6f7g8h’,
}
Response & Retry Policy
It's important that your application responds to requests with the appropriate HTTP(S) status code:
- Respond with a 2xx status code to indicate that your application successfully received an event
- If your application responds with a 5xx status code, the event will be retried every 6 hours until 3 days after it was created, at which point it will be dropped
- If your application responds with a 4xx status code, the event will not be retried
Deduplication
Although it's very unlikely, it's possible to receive the same workflow stage change event more than once. Your application is responsible for deduplicating events, if necessary.
Workflow Stage Labels & Slugs
By default, all of a campaign’s workflow stages are defined by the platform. You can disable these workflow stages, but cannot change their identifying properties: label & slug. You can, however, add workflow stages and customize one of their identifying attributes: label. The slug of a custom workflow stage is a form of its original label, modified as follows:
- Punctuation* is removed;
- Leading and trailing whitespace is removed; and
- Spaces delimiting the label’s words are replaced with underscores.
* Removed punctuation marks include: .,/#!?"$%^&*;:{}|=-_`~().
The following workflow stages (label: slug) are defined by the platform. Their labels and slugs are immutable and reserved, meaning a custom workflow stage cannot have any of these labels or slugs:
- Candidates: candidate
- Invited: invited
- Applied: applied
- Confirmation: pending_confirmation
- Pre-Payment: pending_shipment
- Draft: pending_draft
- Draft Review: draft_review
- Content Creation: pending_content
- Post Review: content_review
- Post-Payment: pending_payment
- Complete: complete
- Dropped: dropped
Related Articles