Product Events not triggering while using ?dev=true, works fine on simulation

I have an existing custom app developed as per our business requirement. The same is working fine in production which on v2.0. Since there are some enchancement, i have to refactor the code to 2.2V which works fine on simulation. However, the same when i try using ?dev=true in my sanbox env. doesn’t trigger. Can some1 help here.

Below is code in manifest.json and snipper of server.js

{
  "platform-version": "2.2",
  "product": {
    "freshsales": {
      "location": {
        "contact_entity_menu": {
          "url": "index.html",
          "icon": "styles/images/icon.svg"
        }
      },
      "functions": {
        "updateContactLocation": {
          "timeout": 10
        }
      },
      "events": {
        "onAppointmentCreate": {
          "handler": "onAppointmentCreateHandler"
        },
        "onContactCreate": {
          "handler": "onContactCreateHandler"
        },
        "onContactUpdate": {
          "handler": "onContactUpdateHandler"
        }
      }
    }
  },
  "engines": {
    "node": "12.22.0",
    "fdk": "7.5.0"
  }
}

server.js

onAppointmentCreateHandler: function (payload) {

        console.log("testing");

    },
1 Like

Hello @Janak_Mer I believe you would need to install the application into your sandbox for the application to actually function. Or use the webtest serverless events to trigger your onAppointmentCreate event.

Here is a similar thread that explains how product events work. Hope this helps :slight_smile:

2 Likes

Hi @Zach,

Can you share some quick links on how can this be tested using webtest?

@Janak_Mer

please check this link for more reference

Overview under Test the App section

hope it helps :slight_smile:

Thanks

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.