Skip to main content
nWebhook definitions. Webhooks broadcast events from NetServer to remote servers.

Constructors

NSWebhook()

Initializes a new instance of the NSWebhook class.

Methods

GetErrorsEmail()

Email address to send error message to when this webhook state changes to too-many errors.
Returns: CRMScript.Global.String[] - The email address error messages are sent to when this webhook state changes to too-many errors.
Only one email address.
Example:

GetEvents()

Returns: CRMScript.Global.String[] - Array of event names that trigger this webhook [‘contact.created’, ‘sale.changed’] Example:

GetHeaders()

Returns: CRMScript.Native.Map - Custom HTTP Headers to add to webhook requests. Example:

GetName()

Returns: CRMScript.Global.String - Name to identify this webhook. Does not have to be unique. Example:

GetProperties()

Returns: CRMScript.Native.StringObjectDictionary - Custom values to inject into JSON body of webhook call. Example:

GetRegistered()

Returns: CRMScript.Global.DateTime - Registered when. Example:

GetRegisteredAssociate()

Returns: CRMScript.NetServer.NSAssociate - The user that created the webhook. Example:

GetSecret()

Returns: CRMScript.Global.String - Shared secret key used for generating SHA256 HMAC signature, so that receiver can verify that call came from this server. Example:

GetState()

Returns: CRMScript.Global.Integer - Webhook status, should we post events to the URL? See <xref href=“CRMScript.NetServer.WebhookState” data-throw-if-not-resolved=“false”></xref>. Example:

GetTargetUrl()

Returns: CRMScript.Global.String - Destination to POST event info to. URL for webhooks. ID for CRM scripts. Example:

GetType()

Returns: CRMScript.Global.String - Name of plugin that handles this webhook. ‘webhook’ for webhooks, which are handled by the system plugin. Example:

GetUpdated()

Returns: CRMScript.Global.DateTime - Last updated when. Example:

GetUpdatedAssociate()

Returns: CRMScript.NetServer.NSAssociate - The user that last updated the webhook. Example:

GetWebhookId()

Returns: CRMScript.Global.Integer - Primary Key. Unique id for this webhook. Example:

SetErrorsEmail(String)

Email address to send error message to when this webhook state changes to too-many errors.
Returns: CRMScript.Global.Void
Only one email address.
Example:

SetEvents(String[])

Returns: CRMScript.Global.Void Example:

SetHeaders(Map)

Returns: CRMScript.Global.Void Example:

SetName(String)

Returns: CRMScript.Global.Void Example:

SetProperties(StringObjectDictionary)

Returns: CRMScript.Global.Void Example:

SetRegistered(DateTime)

Returns: CRMScript.Global.Void Example:

SetRegisteredAssociate(NSAssociate)

Returns: CRMScript.Global.Void Example:

SetSecret(String)

Returns: CRMScript.Global.Void Example:

SetState(Integer)

Returns: CRMScript.Global.Void Example:

SetTargetUrl(String)

Returns: CRMScript.Global.Void Example:

SetType(String)

Returns: CRMScript.Global.Void Example:

SetUpdated(DateTime)

Returns: CRMScript.Global.Void Example:

SetUpdatedAssociate(NSAssociate)

Returns: CRMScript.Global.Void Example:

SetWebhookId(Integer)

Returns: CRMScript.Global.Void Example: