Class Webhook
Describes a webhook for the ISystemWebhookPlugin.
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.dll
Syntax
public class Webhook : Object
Constructors
Webhook(Int32, String, String, String, String)
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public Webhook(int id, string name, string url, string eventName, string secret)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
String | name | |
String | url | |
String | eventName | |
String | secret |
Webhook(Int32, String, String, String[], String)
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public Webhook(int id, string name, string url, string[] eventNames, string secret)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
String | name | |
String | url | |
String[] | eventNames | |
String | secret |
Fields
Events
Events that this hook is subscribed to. "sale.created", "project.updated", "contact.deleted" etc
Declaration
public string[] Events
Field Value
Type | Description |
---|---|
String[] |
Name
Name of this hook. e.g. "My ERP Integration"
Declaration
public string Name
Field Value
Type | Description |
---|---|
String |
TargetUrl
URL to POST events to, or otherwise identify the recipient of the webhook call (i.e. script id).
Declaration
public string TargetUrl
Field Value
Type | Description |
---|---|
String |
Type
Name of webhook plugin that handles dispatching this webhook: "webhook", "crmscript" etc.
Declaration
public string Type
Field Value
Type | Description |
---|---|
String |
WebhookId
Unique identifier for this webhook.
Declaration
public int WebhookId
Field Value
Type | Description |
---|---|
Int32 |
Properties
ApplicationToken
Application that registered this hook. (Optional)
Declaration
public string ApplicationToken { get; set; }
Property Value
Type | Description |
---|---|
String |
ErrorsEmail
Where to send error notifications when webhook gets disabled.
Declaration
public string ErrorsEmail { get; set; }
Property Value
Type | Description |
---|---|
String |
Headers
Hook-specific custom headers to be added to the webhook payload.
Declaration
public Dictionary<string, string> Headers { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, String> |
Properties
Hook-specific data properties to be added to the webhook payload.
Declaration
public Dictionary<string, object> Properties { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<String, Object> |
Registered
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public DateTime Registered { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
RegisteredAssociateId
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public int RegisteredAssociateId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Secret
Shared secret. Used for creating a SHA256 HMAC if set.
Declaration
public string Secret { get; set; }
Property Value
Type | Description |
---|---|
String |
State
Webhook can be Active, Stopped or Errored.
Declaration
public WebhookState State { get; set; }
Property Value
Type | Description |
---|---|
WebhookState |
Updated
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public DateTime Updated { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
UpdatedAssociateId
Describes a webhook for the ISystemWebhookPlugin.
Declaration
public int UpdatedAssociateId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |