Seamlessly Connect Conversations to SaaS API Functionality

AI Actions for Eucera empower businesses to create dynamic conversational interfaces that seamlessly integrate with SaaS API functionality. By enabling AI-driven actions, users can interact with Eucera’s chat-based UI to trigger API calls, fetch relevant data, and perform automated tasks—all within the conversation.


eucera.copilot([YOUR COPILOT NAME]).register('[FUNCTION NAME]', () => {
  return new Promise((resolve) => 
        setTimeout(() => resolve({ data: "Sample API Response" }), 1000)
  );
})

Example: registering an invite user action:

eucera.copilot('production_support_assistant').registerFunctions({'invite_user', (data: any) => {
    try {
        // Extract the required data
        const { email, name } = data;
        const payload = {
            email,
            name
        };
        
        // Call the actual API
        const response = await fetch('user/invite/new', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(payload)
        });

        const data = await response.json();
        // Return the result back to the copilot
        return data;
    } catch (error: any) {
        return error.message;
    }
}});