Trigger flow from JS with params

Hello,

I’m able to trigger a flow from a JS function but I can’t get it have a param:
My flow have an input param ‘user’ that is an object:

<script is="dmx-flow" id="userAuth" type="text/dmx-flow">{
  meta: {
    $param: [
      {type: "object", name: "user"}
    ]
  },

And there is my code to trigger the flow:

Outseta.on('accessToken.set', function (user) {
        dmx.global.set('user', user);
        dmx.parse('userAuth.run(user,'+user+')');
    });

I have tried many ways but can’t find the good one. The dmx.global.set works fine, but I would like to set the user variable in the flow directly. And set a global variable and retrieve it on the flow.

Thanks a lot,

Community Page
Last updated: