Espone API JSON e MCP HTTP per far lavorare gli agenti sul CRM.
Gli agenti autenticati con token Bearer possono leggere today/pipeline e annotare attività, con host MCP allineati a quelli di produzione. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module Api
|
||||
module V1
|
||||
class ActivitiesController < BaseController
|
||||
def create
|
||||
render_agent Crm::AgentSession.new(current_user).create_activity(params[:project_code], activity_params)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def activity_params
|
||||
source = params[:activity].presence || params
|
||||
source.permit(:organization_id, :activity_type, :subject, :description, :happened_at, :contact_id, :opportunity_id, :lost_reason)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user