Show / Hide Table of Contents

Class Webhook

Webhook definitions. Webhooks broadcast events from NetServer to remote servers.

Carrier object for Webhook. Services for the Webhook Carrier is available from the Webhook Agent.
Inheritance
object
Webhook
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.6.0.0")]
public class Webhook
Examples

Get Webhook 123 using the agent:

using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   var agent = new WebhookAgent();
   var webhook = agent.GetWebhook( 123 );
}

Constructors

Webhook()

Default constructor

Declaration
public Webhook()
See Also
IWebhookAgent

Properties

ErrorsEmail

Email address to send error message to when this webhook state changes to too-many errors.

Declaration
[DataMember]
public virtual string ErrorsEmail { get; set; }
Property Value
Type Description
string
See Also
IWebhookAgent

Events

Array of event names that trigger this webhook: ['contact.created', 'sale.changed']

Declaration
[DataMember]
public virtual string[] Events { get; set; }
Property Value
Type Description
string[]
See Also
IWebhookAgent

Headers

Custom HTTP Headers to add to webhook requests.

Declaration
[DataMember]
public virtual StringDictionary Headers { get; set; }
Property Value
Type Description
StringDictionary
See Also
IWebhookAgent

Name

Name to identify this webhook. Does not have to be unique.

Declaration
[DataMember]
public virtual string Name { get; set; }
Property Value
Type Description
string
See Also
IWebhookAgent

Properties

Custom values to inject into JSON body of webhook call.

Declaration
[DataMember]
public virtual StringObjectDictionary Properties { get; set; }
Property Value
Type Description
StringObjectDictionary
See Also
IWebhookAgent

Registered

Registered when in UTC.

Declaration
[DataMember]
public virtual DateTime Registered { get; set; }
Property Value
Type Description
DateTime
See Also
IWebhookAgent

RegisteredAssociate

The user that created the webhook.

Declaration
[DataMember]
public virtual Associate RegisteredAssociate { get; set; }
Property Value
Type Description
Associate
See Also
IWebhookAgent

Secret

Shared secret key used for generating SHA256 HMAC signature, so that receiver can verify that call came from this server

Declaration
[DataMember]
public virtual string Secret { get; set; }
Property Value
Type Description
string
See Also
IWebhookAgent

State

Webhook status - should we post events to the URL? 1=Active, 2=Stopped or 3=TooManyErrors

Declaration
[DataMember]
public virtual WebhookState State { get; set; }
Property Value
Type Description
WebhookState
See Also
IWebhookAgent

TargetUrl

Destination to POST event info to. URL for webhooks. Id for CRM scripts

Declaration
[DataMember]
public virtual string TargetUrl { get; set; }
Property Value
Type Description
string
See Also
IWebhookAgent

Type

Name of plugin that handles this webhook. 'webhook' for HTTP POST notifications, 'crmscript' for script invocations.

Declaration
[DataMember]
public virtual string Type { get; set; }
Property Value
Type Description
string
See Also
IWebhookAgent

Updated

Last updated when in UTC.

Declaration
[DataMember]
public virtual DateTime Updated { get; set; }
Property Value
Type Description
DateTime
See Also
IWebhookAgent

UpdatedAssociate

The user that last updated the webhook.

Declaration
[DataMember]
public virtual Associate UpdatedAssociate { get; set; }
Property Value
Type Description
Associate
See Also
IWebhookAgent

WebhookId

Primary Key. Unique id for this webhook.

Declaration
[DataMember]
public virtual int WebhookId { get; set; }
Property Value
Type Description
int
See Also
IWebhookAgent

Methods

ToString()

Returns the carrier contents as a formatted string.

Declaration
public override string ToString()
Returns
Type Description
string

The carrier contents.

Overrides
object.ToString()
See Also
IWebhookAgent

ToString(string)

Returns the carrier contents as a formatted string, useful for debugging. Each line in the output is prefixed with the input value.

Declaration
public string ToString(string prefix)
Parameters
Type Name Description
string prefix

The line prefix (typically used for indenting)

Returns
Type Description
string

The carrier contents.

See Also
IWebhookAgent

See Also

IWebhookAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top