Show / Hide Table of Contents

Class WebhookPayload

Describes an event to be broadcast out over webhook or scripts, using the ISystemWebhookPlugin and ICustomWebhookPlugin systems.

Inheritance
object
WebhookPayload
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.dll
Syntax
public class WebhookPayload

Constructors

WebhookPayload(ChangeType, string, int, IDictionary<string, object>, int, IDictionary<string, object>)

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, IDictionary<string, object> fieldValues)
Parameters
Type Name Description
ChangeType change
string entity
int primaryKey
IDictionary<string, object> changes
int assocId
IDictionary<string, object> fieldValues

WebhookPayload(string, string, int, IDictionary<string, object>, int)

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
int primaryKey
IDictionary<string, object> changes
int 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
int

Changes

Field name to the new field value dictionary.

"Name": "Customer name",

"RegisteredBy": 123 // associate id
Declaration
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

FieldValues

Field name to the field value dictionary. Values will only be Ids, Enums and DateTime/String.

"contact_id": 123,

"associate_id": 123 "Updated": "2002-07-24T14:24:23"
Declaration
public IDictionary<string, object> FieldValues { get; set; }
Property Value
Type Description
IDictionary<string, object>

PrimaryKey

Entity primary id.

Declaration
public int PrimaryKey { get; set; }
Property Value
Type Description
int

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top