Class WebhookPayload
Describes an event to be broadcast out over webhook or scripts, using the ISystemWebhookPlugin and ICustomWebhookPlugin systems.
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.dll
Syntax
public class WebhookPayload : Object
Constructors
WebhookPayload(ChangeType, String, Int32, IDictionary<String, Object>, Int32)
Describes an event to be broadcast out over webhook or scripts, using the ISystemWebhookPlugin and ICustomWebhookPlugin systems.
Declaration
public WebhookPayload(ChangeType change, string entity, int primaryKey, IDictionary<string, object> changes, int assocId)
Parameters
Type | Name | Description |
---|---|---|
ChangeType | change | |
String | entity | |
Int32 | primaryKey | |
IDictionary<String, Object> | changes | |
Int32 | assocId |
WebhookPayload(String, String, Int32, IDictionary<String, Object>, Int32)
Describes an event to be broadcast out over webhook or scripts, using the ISystemWebhookPlugin and ICustomWebhookPlugin systems.
Declaration
public WebhookPayload(string eventName, string entity, int primaryKey, IDictionary<string, object> changes, int assocId)
Parameters
Type | Name | Description |
---|---|---|
String | eventName | |
String | entity | |
Int32 | primaryKey | |
IDictionary<String, Object> | changes | |
Int32 | assocId |
Fields
EventId
Unique identifier for event.
Declaration
public Guid EventId
Field Value
Type | Description |
---|---|
Guid |
Timestamp
Time event occured (UTC).
Declaration
public DateTime Timestamp
Field Value
Type | Description |
---|---|
DateTime |
Properties
ChangedByAssociateId
User who committed the changes: associate id
Declaration
public int ChangedByAssociateId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Changes
Field name to the new field value dictionary.
"Name": "Customer name", "RegisteredBy": 123 // associate idDeclaration
public IDictionary<string, object> Changes { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<String, Object> |
ContextIdentifier
"Default" or "Cust1234" depending on online or on-site.
Declaration
public string ContextIdentifier { get; set; }
Property Value
Type | Description |
---|---|
String |
Entity
"contact", "sale" etc
Declaration
public string Entity { get; set; }
Property Value
Type | Description |
---|---|
String |
Event
"sale.created", "project.updated", "contact.deleted" etc
Declaration
public string Event { get; set; }
Property Value
Type | Description |
---|---|
String |
PrimaryKey
Entity primary id.
Declaration
public int PrimaryKey { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Extension Methods
EnumUtil.MapEnums<From, To>(From)