Use webhooks
đź“ť Note: If the AppDirect logo appears in the upper-left corner of the page, when Manage > Marketplace appears in this topic, click the grid icon > Switch to | Store, instead.
Market Managers can create custom webhooks to push event notifications to registered URLs. These notifications signal that changes were made on the AppDirect platform that are not supported by other notification types.
For example, you can use webhooks to push events to a reseller’s customer relationship management (CRM) system to notify the Reseller Manager that a sales opportunity has been created, and should be approved or denied from the CRM.
Webhook notifications can be sent for the following resource types and associated events:
- Sales Opportunities—Sends a notification when a Reseller creates or edits an opportunity.
- Reseller Registrant—Sends a notification when a Reseller registers on the marketplace.
- Quote—Sends a notification when a quote is created, edited, or deleted.
- Sales Lead—Sends a notification when a lead is created, edited, or deleted.
- Company—Sends a notification when a company is created, updated, or deleted.
- User—Sends a notification when a user is created, updated, or deleted.
- Membership—Sends a notification when a company membership is created, updated, or deleted. A company membership is the relationship between a user and a company. A user must have a membership defined to be associated with a company.
- Subscription—Sends a notification when a subscription is created, updated, or deleted. Subscriptions are the relationship between a company and a product. They include information about the company, user, and active order.
- Payment Instrument—Sends a notification when a payment instrument is created or updated. Payment instruments include credit card information, billing address, and any other account information used for billing.
- Discount—Sends a notification when a Marketplace Administrator adds, changes, or deletes a discount. A notification is not sent when a customer applies a discount code to a purchase.
- Order—Sends a notification when an order is created, updated, or deleted. An order is the selected product and edition details included in a subscription. An update event is triggered when one of the following states changes:
INITIALIZED
PENDING_USER_APPROVAL
PENDING_ASYNCHRONOUS_CREATION
FREE_TRIAL
ACTIVE
ONE_TIME
SUSPENDED
FREE_TRIAL_EXPIRED
FREE_TRIAL_CANCELLED
CANCELLED
- Catalog Product—Sends a notification when a Marketplace Administrator adds, changes, or deletes a catalog product (including bundles) in the Edit Marketplace Settings page (at Marketplace > Product > Catalog | Product Catalog > gear icon > Edit Marketplace Settings). All modifications performed on the Edit Marketplace Settings page trigger a
CHANGED
event except the Visible on Marketplace checkbox:- Setting an application as visible by selecting the checkbox triggers an
ADDED
event. - Setting an application as hidden by clearing the checkbox triggers a
REMOVED
event.​
- Setting an application as visible by selecting the checkbox triggers an
- Platforms—Sends a notification when a Marketplace Administrator adds, changes, or deletes a platform.​​
- App Assignment—Sends a notification when a Marketplace Administrator assigns an application to a user, unassigns an application from a user, or an assignment changes as follows:
- An application assignment is successfully provisioned.
- An application assignment fails.
- An application unassignment fails.
- An application assignment changes from one pending state to another. For example, when a status changes from
PENDING_USER_ACTIVATION
toPENDING_REMOTE_CREATION
.
- Invoice—Sends a notification when an Invoice is added, changed, or deleted.
- Staging Product—Sends a notification when a Staging Product is added, changed, or deleted.
Notification example
Webhook notifications include the resource content in the notification and a link to it. For example, the following notification is sent when a sales opportunity is created:
{
"uuid": "8241cbe0-40da-4673-91e5-abf16c063d86",
"timestamp": 1432311484,
"resource": {
"type": "SALES_OPPORTUNITY",
"uuid": "0729adc2-fc66-40ac-a59d-9a3f81dd4c69",
"url": "http://api.appdirect.com/api/v2/crm/reseller/opportunity/0729adc2-fc66-40ac-a59d-9a3f81dd4c69
"content": {
"uuid": "0729adc2-fc66-40ac-a59d-9a3f81dd4c69",
"externalIdentifier": "some_external_id",
...other sales lead fields
}
},
"resourceAction": "CREATED",
}
Note the following about the notification example:
- The notification includes a
"content"
element added as a child of the"resource"
element. - The
"content"
is identical to retrieving the data usingHTTP GET
on the link of the"resource.url"
element. - The
"content"
object changes depending on the notification"type"
. Webhook subscribers need to be aware of the"type"
element to properly interpret the"content"
element.
For more information about webhooks, see the following topics:
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!