Tutorial: fdc3.findIntentsByContext

fdc3.findIntentsByContext

Find all the available intents for a particular context. To resolve this info, the function handleInfoForIntentsByContext is meant to be overridden in the Interop Broker.

Example

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

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

    const intentsInfo = await fdc3.findIntentsByContext(context);

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