onCardRestored( )


Deprecated. This event will continue to work until June 30, 2024.

An event that triggers when a workflow card is moved.

The onCardRestored() event handler runs when a workflow card is restored programmatically using the restoreCard() function or manually in your site's Dashboard. The received CardRestoredEvent object contains information about the card that was restored.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
Method Parameters
eventCardRestoredEventRequired

The restored card's data.

An event when a card is restored
JavaScript
Did this help?

onContactCreated( )


An event that triggers when a new contact is created.

The onContactCreated() event handler runs when a new contact is created. The received ContactCreatedEvent object contains information about the contact that was created.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
Method Parameters
eventContactCreatedEventRequired

Information about the contact that was created and metadata for the event.

An event fired when a contact is created
JavaScript
Did this help?

onContactDeleted( )


An event that triggers when a contact is deleted.

The onContactDeleted() event handler runs when a contact is deleted. The received ContactDeletedEvent object contains event metadata.

If a contact is deleted as part of a merge, metadata.originatedFrom is sent as "merge". Otherwise, originatedFrom is omitted.

Note: Backend events don't work when previewing your site.

Method Declaration
Copy
function onContactDeleted(event: ContactDeletedEvent): void;
Method Parameters
eventContactDeletedEventRequired

Metadata for the event.

JavaScript
// Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixCrm_onContactDeleted(event) { const contactId = event.metadata.entityId; console.log("Contact deleted", event); } /* Full event object: * { * "metadata": { * "id": "225bb629-4813-4c58-91ec-07aa5fbf069c", * "entityId": "ab1b7f0f-fd39-45ac-b13b-cb02c93b5e50", * "eventTime": "2021-02-10T19:18:03.442207Z", * "triggeredByAnonymizeRequest": false * } * } */
Did this help?