-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
feat: First step to the CRM integration #10340
feat: First step to the CRM integration #10340
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10340 +/- ##
==========================================
- Coverage 49.54% 49.48% -0.07%
==========================================
Files 67 75 +8
Lines 20650 21538 +888
Branches 4980 5159 +179
==========================================
+ Hits 10231 10658 +427
- Misses 9131 9578 +447
- Partials 1288 1302 +14 ☔ View full report in Codecov by Sentry. |
cgi/import_file_process.pl
Outdated
@@ -125,6 +126,8 @@ | |||
|
|||
my $started_t = time(); | |||
my $import_id = $started_t; | |||
# sync CRM | |||
update_last_import_date($Org_id, $started_t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have nightly imports through Equadis and Agena3000, they usually call import_csv_file.pl
See for instance https://github.com/openfoodfacts/openfoodfacts-server/blob/main/scripts/imports/agena3000/run_agena3000_import.sh
The issue is that they contain multiple organizations, so it would need to be done based on the organizations actually present in the updated products.
…nual way -Import.pm
"members" : { | ||
"tests" : 1 | ||
}, | ||
"name" : "Acme Inc.", | ||
"org_id" : "acme-inc", | ||
"protect_data" : "", | ||
"valid_org" : "1", | ||
"validated" : 0 | ||
"valid_org" : "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create_pro_user.t should be changed so that it does not send "1"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
Quality Gate passedIssues Measures |
What
First step in integrating the CRM with the producer platform.
Added Odoo CRM credentials as environment variables.
An organization is 'unreviewed' by default and can be 'validated' or 'rejected'. The “scripts/migration/2024_06_org_validation_move_field.pl” script must be run to change the old value in the .sto of orgs.
When an org is validated, it is added to the CRM. Its creator is also added and linked to an opportunity. A strategy is put in place to avoid duplicates and associate them with entities already in the CRM.
A main contact has been added to the organization, being the person who will receive the emails and be the center of the workflow in the CRM. It can be modified in the pro platform.
Adding a contact to a validated organization in the pro platform adds it to CRM.
Updates the products last import and export date of the corresponding org in the CRM when performed from the producer platform.
Related issue(s) and discussion