Backend Event For Wix CRM [REQUEST]

Please add something like a ’ onContactCreated ’ function so that its possible to trigger a function via a .js file on the site’s backend whenever a new contact is created on the website’s CRM.

It could include all the details of the contact including any custom fields.

1 Like

Hey @shan, just wondering if you were able to get the existing crm-backend events working (eg onCardCreated, onCardMoved). The current docs have no info on how to connect the events.js. I’m specifically looking for info on the red highlights…:

/*event.js*/
import wixCrm from 'wix-crm-backend'

export function wixCrm_onCardMoved(event) {
// do something
}

------------------------------------------

/*backendModules.jsw*/
import { wixCrm_onCardMoved } from 'backend/event'

export function cardFunction() {
// Whether passing an event parameter is necessary 
wixCrm_onCardMoved(event?)
}

------------------------------------------

/*frontendModules*/
import { wixCrm_onCardMoved } from 'backend/backendModules'

$w.onReady(function () {
// Whether a trigger is necessary for running the module on the live site
cardFunction()
}

Appreciate any thoughts :slight_smile: