Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] connector_voicent_helpdesk_ticket #97

Merged

Conversation

murtuzasaleh
Copy link

Voicent Helpdesk Ticket Connector

Odoo Helpdesk App does not provide an automated way to trigger phone calls when a ticket reaches a specific stage in the process.

For companies with a large number of tickets or when a ticket impacts many people, calling everyone one by one is a time-consuming option.

This module aims to automate calls to a customer or impacted third parties when a ticket reaches a specific stage.

@murtuzasaleh
Copy link
Author

@max3903 I need your help in How I can execute queue job based on a specific condition in the scheduler.

Because when we change the status of the ticket it will create a job based on functionality and worker is execute the job at that time.

How I can stop that execution of that job when changed the state of the ticket.
And execute it when current time >= Next Call in the scheduler

@max3903
Copy link
Member

max3903 commented Jun 12, 2019

@murtuzasaleh When the job is executed, first thing you want to do is check if current time >= Next Call.

Unless @guewen has a more elegant way to handle this.

@max3903 max3903 self-requested a review June 12, 2019 14:47
@max3903 max3903 added the enhancement New feature or request label Jun 12, 2019
@max3903 max3903 added this to the 12.0 milestone Jun 12, 2019
@murtuzasaleh
Copy link
Author

@max3903

3

As we discussed there are multiple voicent backend based on the checked is_active field call_line_id

But what if there are multiple lines with the same stage, Which stage I will assign in queue job?

@max3903
Copy link
Member

max3903 commented Jun 14, 2019

@murtuzasaleh If you have multiple line with the same stage, they should create multiple job.

@max3903 max3903 force-pushed the connector_voicent_helpdesk_ticket_v12 branch from d8f11a6 to 7f33690 Compare June 18, 2019 14:07
@max3903 max3903 changed the title [WIP][12.0][ADD] connector_voicent_helpdesk_ticket [ADD] connector_voicent_helpdesk_ticket Jun 18, 2019
@murtuzasaleh murtuzasaleh force-pushed the connector_voicent_helpdesk_ticket_v12 branch from d39208d to a2590c9 Compare June 18, 2019 15:18
@guewen
Copy link

guewen commented Jun 19, 2019

@murtuzasaleh When the job is executed, first thing you want to do is check if current time >= Next Call.

Unless @guewen has a more elegant way to handle this.

You can put an eta on the job to be executed only after a date, but you already did, not sure what your issue is. In a job you can check the time again and raise a RetryableJobError to postpone the job (https://github.com/OCA/queue/blob/d708db07aea2def4a45f5e0a5f0ef66ee428b2b6/queue_job/exception.py#L31).

@guewen
Copy link

guewen commented Jun 19, 2019

Keep this in mind: queue.job records are only supposed to be the representation of a method's delayed execution. This is not where you want to store your business logic, attach your files, ... You have to consider it as a black box to execute a method asynchronously - and only this -, method which can be executed more than once (idempotent; so check the state when the job starts), jobs are deleted after some time...

Sometimes, you may want to create a new model to actually contains the state of your business logic (draft, sent, done, whatever), link it to attachments, add relations, ... and make your jobs work on a record of this model (example: def voicent_import_and_runcampaign(self, call_state): where call_state would be a record of this model). I'm not even sure you need a new model here.

@max3903 max3903 force-pushed the connector_voicent_helpdesk_ticket_v12 branch 5 times, most recently from c71effa to 13744ba Compare June 20, 2019 20:22
str(call_line.backend_id.port),
call_line.backend_id.callerid,
str(call_line.backend_id.line))
status = voicent_obj.checkStatus(voicent_campaign)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guewen How can we get this job to be retried if the status returned by Voicent is not OK?

@guewen
Copy link

guewen commented Jun 20, 2019 via email

@max3903 max3903 force-pushed the connector_voicent_helpdesk_ticket_v12 branch from 13744ba to fb7968f Compare June 20, 2019 20:28
@max3903 max3903 merged commit bee1204 into ursais:12.0 Jun 20, 2019
@max3903 max3903 deleted the connector_voicent_helpdesk_ticket_v12 branch June 20, 2019 20:28
@max3903 max3903 mentioned this pull request Jul 14, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

3 participants