Tutorial: fdc3v2.findIntentsByContext

fdc3v2.findIntentsByContext

Find all the available intents for a particular context.

The InteropBroker.handleInfoForIntentsByContext API must be overridden to return the relevant array of AppIntents.

Example

tickerElement.on('click', (element) => {
    const ticker = element.innerText;

    const context = { 
        type: 'fdc3.instrument', 
        id: { 
            ticker 
        }
    }

    const intentsInfo = await fdc3.findIntentsByContext(context, 'channel');

    // This returns an array of AppIntents:
    // [{
    //     intent: { name: "StartCall" },
    //     apps: [{ appId: "Skype" }]
    // },
    // {
    //     intent: { name: "StartChat", displayName: "Chat" },
    //     apps: [{ appId: "Skype" }, { appId: "Symphony" }, { appId: "Slack" }]
    // }];
})