Class WebhookTableInfo
Table 'Webhook': Webhook URL to call when events occur in the client or in NetServer. Also tracks call+error statistics.
Implements
Inherited Members
Namespace: SuperOffice.CRM.Data
Assembly: SoDataBase.dll
Syntax
[DatabaseTable("Webhook")]
public class WebhookTableInfo : TableInfo, ICloneable
Remarks
An instance of this class represents one instance of this table in an SQL statement. In most
cases each table appears only once in a SELECT, but in cases where you need to self-join, or
there are multiple occurrences for other reasons (typically additional restrictions in the joins),
then you will need multiple instances.
Instances of this class are created by calling
Fields
DictionaryTableName
Conceptual name of table Webhook in the database dictionary: Webhook
Declaration
public const string DictionaryTableName = "Webhook"
Field Value
Type | Description |
---|---|
System.String |
Properties
ApplicationToken
Field 'application_token' in table 'Webhook': Dictionary type String[201], .NET type: System.String
Application that registered this hook. If set, then other apps won't be able to modify this record
Declaration
public StringFieldInfo ApplicationToken { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
ConsecutiveErrors
Field 'consecutive_errors' in table 'Webhook': Dictionary type Int, .NET type: System.Int32
Number of consecutive errors. Reset to 0 when an non-error is received. If too many errors, state is changed to TooManyErrors(3) to deactivate webhook.
Declaration
public Int32FieldInfo ConsecutiveErrors { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
Definition
Definition of the table as described in the deployed runtime dictionary
Declaration
public override SoTable Definition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Overrides
DictionaryTableNumber
Table number for table Webhook in the database dictionary; potentially changes between databases, but always the same over the lifetime of any single database
Declaration
public int DictionaryTableNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Events
Field 'events' in table 'Webhook': Dictionary type String[4001], .NET type: System.String
Comma separated list of event names that this hook responds to: 'contact.created,person.changed,project.deleted'
Declaration
public StringFieldInfo Events { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Headers
Field 'headers' in table 'Webhook': Dictionary type Clob, .NET type: System.String
Hook specific additional HTTP headers that should be added to HTTP request, stored as JSON blob
Declaration
public StringFieldInfo Headers { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
LastError
Field 'last_error' in table 'Webhook': Dictionary type String[4001], .NET type: System.String
Most recent error message received from target. HTTP Headers + body. To help with debugging webhooks.
Declaration
public StringFieldInfo LastError { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Name
Field 'name' in table 'Webhook': Dictionary type String[401], .NET type: System.String
Name to identify this webhook. Does not have to be unique.
Declaration
public StringFieldInfo Name { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Properties
Field 'properties' in table 'Webhook': Dictionary type Clob, .NET type: System.String
Hook specific additional data that should be added to payload, stored as JSON blob
Declaration
public StringFieldInfo Properties { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Registered
Field 'registered' in table 'Webhook': Dictionary type UtcDateTime, .NET type: System.DateTime
Registered when
Declaration
public DateTimeFieldInfo Registered { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
RegisteredAssociateId
Field 'registered_associate_id' in table 'Webhook': Dictionary type FK, .NET type: System.Int32
Registered by whom
Declaration
public Int32FieldInfo RegisteredAssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
RegisteredAssociateId_InnerJoin_Associate
Generated join from the foreign key RegisteredAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> RegisteredAssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
RuntimeDefinition
Definition of the table as described in the deployed runtime dictionary
Declaration
[Obsolete("Use instance property Definition or static member DictionaryTableNumber", true)]
public static SoTable RuntimeDefinition { get; }
Property Value
Type | Description |
---|---|
SoTable |
Secret
Field 'secret' in table 'Webhook': Dictionary type String[401], .NET type: System.String
Shared secret key used for generating SHA256 HMAC signature, so that receiver can verify that call came from this server
Declaration
public StringFieldInfo Secret { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
State
Field 'state' in table 'Webhook': Dictionary type Enum, .NET type: WebhookState
Webhook status - should we post events to the URL? 1=Active, 2=Stopped or 3=TooManyErrors
Declaration
public WebhookStateFieldInfo State { get; }
Property Value
Type | Description |
---|---|
WebhookStateFieldInfo |
TargetUrl
Field 'target_url' in table 'Webhook': Dictionary type String[4001], .NET type: System.String
Destination to POST event info to. URL for webhooks. Id for CRM scripts
Declaration
public StringFieldInfo TargetUrl { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
TotalCalls
Field 'total_calls' in table 'Webhook': Dictionary type Int, .NET type: System.Int32
Number of times webhook has been invoked since registered. For statistical purposes.
Declaration
public Int32FieldInfo TotalCalls { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
TotalErrors
Field 'total_errors' in table 'Webhook': Dictionary type Int, .NET type: System.Int32
Number of times webhook has returned error since registered. For statistical purposes.
Declaration
public Int32FieldInfo TotalErrors { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
Type
Field 'type' in table 'Webhook': Dictionary type String[101], .NET type: System.String
Name of plugin that handles this webhook. 'webhook' for webhooks, which are handled by the system plugin.
Declaration
public StringFieldInfo Type { get; }
Property Value
Type | Description |
---|---|
StringFieldInfo |
Updated
Field 'updated' in table 'Webhook': Dictionary type UtcDateTime, .NET type: System.DateTime
Last updated when
Declaration
public DateTimeFieldInfo Updated { get; }
Property Value
Type | Description |
---|---|
DateTimeFieldInfo |
UpdatedAssociateId
Field 'updated_associate_id' in table 'Webhook': Dictionary type FK, .NET type: System.Int32
Last updated by whom
Declaration
public Int32FieldInfo UpdatedAssociateId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |
UpdatedAssociateId_InnerJoin_Associate
Generated join from the foreign key UpdatedAssociateId in this table, to its target table AssociateTableInfo.
Declaration
public TargetedInnerJoin<AssociateTableInfo> UpdatedAssociateId_InnerJoin_Associate { get; }
Property Value
Type | Description |
---|---|
TargetedInnerJoin<AssociateTableInfo> |
UpdatedCount
Field 'updatedCount' in table 'Webhook': Dictionary type UShort, .NET type: System.Int16
Number of updates made to this record
Declaration
public UInt16FieldInfo UpdatedCount { get; }
Property Value
Type | Description |
---|---|
UInt16FieldInfo |
WebhookId
Field 'webhook_id' in table 'Webhook': Dictionary type PK, .NET type: System.Int32
Primary key
Declaration
public Int32FieldInfo WebhookId { get; }
Property Value
Type | Description |
---|---|
Int32FieldInfo |