Creating new cases from emails

Hello! Just started on Sugar development.

Im trying to develop a solution so that any time an email is received I can create a case based on the body and subject.

I have managed to create cases from the API and with the inbound email tool in the console.

However I couldnt find, in neither of them, how to assign the account where the case will be created.

I hope someone could guide me through this.

  • Sugar Enterprise 9.0