ZAF Client API trigger event
已于 2023年11月28日 发布
Hello, I am trying to trigger an event from the ticket/user sidebar using the ZAF Client like this https://developer.zendesk.com/api-reference/apps/apps-core-api/client_api/#clienttriggername-data
client.trigger('open_flex_popover');
And catch it in a different place (Twilio Flex Plugin) using another ZAF Client.
Since this happens in the same browser window, I was expecting to be able to catch the action, but it doesn't seem to work.
this.zaf.on('open_flex_popover', function() {
console.log('opening!')
});
If I am triggering and listening in the same html file, it works, but that doesn't help me much.
Do you have any idea why the action is not caught? Do you have any alternatives? Ideas? I am kind of stuck.
0
2
2 条评论
AlexanderKnoch_Unbabel
Hi 1263082202789 ,
is it somehow possible to get a client instance of another app?
Let's say I'm responsible for “App_A” and I have another app “App_B” installed from the marketplace and I want to be able to trigger a desired behaviour in this other “App_B”?
Can I do something in the direction of:
Or is it just possible to fetch all instances of my own app “App_A"?
Thanks and best regards,
Alex
0
Karun
The basis of triggering custom events on a zaf_client is that those events need to be on the same client instance.
You can get client instances of same app in different locations and transfer data amongst them.
0
登录以发表评论。