API integration in PHP
- or -
Post a project like this2452
$$$
- Posted:
- Proposals: 10
- Remote
- #1628509
- Awarded
Expert Laravel | JS | Angular | Web services | API Development | MySQL | Scraping | Chrome Extensions
Chandigarh
Laravel, Vue.js, Python, Machine Learning, Computer Vision, NLP, Shopify, Wordpress, PHP/MySQL, REST APIs, Payment Getewasy(Stripe,Paypal), Bootstrap, Sass, Less, Logo Design
Islamabad
INDIA'S No 1 Mobile app and Web app company |Android |iOS| Flutter| React Native| Ionic| AngularJS| ReactJS| NodeJS| Java| Spring| ROR|PHP|Laravel|CodeIgniter|Yii|WordPress|Magento|Drupal|Shopify
Delhi
Wordpress|Webflow|Shopify|Wix|CRM|PHP|Android|iOS|Bespoke|App|Zoho|Laravel|SEO|PPC|Social|React|Node|Flutter|React Native|Magento|PWA|Plugin|Chrome Extention
Mohali
Digital Marketing | Graphics, 3D, Animation Expert | Shopify, WordPress expert
Chandigarh
104459249399409153440542471735885977935599136577416062841626566
Description
Experience Level: Expert
General information for the business: e-commerce website
Description of requirements/functionality: We are looking to integrate our local database with the mailing software SendInBlue (SIB) using the PHP API libraries provided by them.
This would be a two-way sync that will push new emails to SIB and update our local database with the emails that unsubscribed.
The script would run once a day via a cron job.
Our current setup
Our system is based on WordPress and WooCommerce and we have created a custom table containing the emails we need to have in SIB.
Our custom table has the columns “email”, “first_name”, “last_name”, “gender” and a few more columns that would have to be synced to SIB.
At the moment, it doesn’t contain any columns to indicate the sync status (is_unsubscribed, sync_status, etc) as they are dependent on the approach you’ll follow whilst building the script.
Importing emails
When the script starts, it should select all the emails that have not been synced yet (sync_status = “false”) and compare them with the wp_users table. Any emails not in wp_users, should then be synced to SIB.
This could be a serialized process using their “create/update user information” function (https://apidocs.sendinblue.com/user/#1) or as a batch using their “import users” function (https://apidocs.sendinblue.com/user/#4). You can pick whichever function your think suits you best, however you should be aware that there might be instances where loads of emails will need to be synced and the script should not crash in those instances.
The script should have some means of confirming the emails have been successfully imported and only then it should update our local database with sync_status = “synced”. This is to prevent emails accidentally getting marked as “synced” when they haven’t due to the script crashing or any other reasons.
Exporting emails
When the import has finished, we would need to check for any emails that unsubscribed from SIB and update our local system. This can be done using their “Export users” function (https://apidocs.sendinblue.com/user/#5) when called using the relevant filters. Any emails that are marked as blacklisted, unsubscribed, invalid etc. should be updated on our local database
Unsubscribing users
There will be instances where a user has joined our WordPress site after they were pushed to SIB. Those users would have to be removed/unsubscribed from SIB. Our WordPress site will be marking those users in the local table as sync_status = “pending_removal”. When the script runs, it should select all users of this status and remove them from SIB.
Script requirements
The script should be compatible with PHP v7, the latest MySQL/MariaDB and built using Object Oriented Programming (OOP). We would need one function that when called will start the process and run unattended.
At the end of the process, an email would need to be sent containing the total number of users sent to SIB and the number of users unsubscribed from our local database. If any errors occurred on the sync, we should receive a notification.
All the users attempted on each time the script runs, should be saved on a file with a timestamp, so we can refer back to it and easily identify the actions taken to the specific email.
You can build the script whichever way you think is best as long as it works even in cases where it needs to sync thousands (up to 100.000) emails. If you prefer, you can create three separate scripts, one for each action and have each script calling the next one upon completion.
Optional extra
If possible, we would like this be wrapped in a WordPress plugin so it can inherit the database connection details and use the default WordPress scheduler instead of server cron. This is not a requirement, but if you are familiar with WordPress plugins, you should do it.
We are open to suggestions and improvements to this flow.
We would expect you to start working on the project within a week from the day you're hired and deliver a fully tested and working code in the timeframes agreed in advance.
Specific technologies required: PHP MySQL
Extra notes:
Description of requirements/functionality: We are looking to integrate our local database with the mailing software SendInBlue (SIB) using the PHP API libraries provided by them.
This would be a two-way sync that will push new emails to SIB and update our local database with the emails that unsubscribed.
The script would run once a day via a cron job.
Our current setup
Our system is based on WordPress and WooCommerce and we have created a custom table containing the emails we need to have in SIB.
Our custom table has the columns “email”, “first_name”, “last_name”, “gender” and a few more columns that would have to be synced to SIB.
At the moment, it doesn’t contain any columns to indicate the sync status (is_unsubscribed, sync_status, etc) as they are dependent on the approach you’ll follow whilst building the script.
Importing emails
When the script starts, it should select all the emails that have not been synced yet (sync_status = “false”) and compare them with the wp_users table. Any emails not in wp_users, should then be synced to SIB.
This could be a serialized process using their “create/update user information” function (https://apidocs.sendinblue.com/user/#1) or as a batch using their “import users” function (https://apidocs.sendinblue.com/user/#4). You can pick whichever function your think suits you best, however you should be aware that there might be instances where loads of emails will need to be synced and the script should not crash in those instances.
The script should have some means of confirming the emails have been successfully imported and only then it should update our local database with sync_status = “synced”. This is to prevent emails accidentally getting marked as “synced” when they haven’t due to the script crashing or any other reasons.
Exporting emails
When the import has finished, we would need to check for any emails that unsubscribed from SIB and update our local system. This can be done using their “Export users” function (https://apidocs.sendinblue.com/user/#5) when called using the relevant filters. Any emails that are marked as blacklisted, unsubscribed, invalid etc. should be updated on our local database
Unsubscribing users
There will be instances where a user has joined our WordPress site after they were pushed to SIB. Those users would have to be removed/unsubscribed from SIB. Our WordPress site will be marking those users in the local table as sync_status = “pending_removal”. When the script runs, it should select all users of this status and remove them from SIB.
Script requirements
The script should be compatible with PHP v7, the latest MySQL/MariaDB and built using Object Oriented Programming (OOP). We would need one function that when called will start the process and run unattended.
At the end of the process, an email would need to be sent containing the total number of users sent to SIB and the number of users unsubscribed from our local database. If any errors occurred on the sync, we should receive a notification.
All the users attempted on each time the script runs, should be saved on a file with a timestamp, so we can refer back to it and easily identify the actions taken to the specific email.
You can build the script whichever way you think is best as long as it works even in cases where it needs to sync thousands (up to 100.000) emails. If you prefer, you can create three separate scripts, one for each action and have each script calling the next one upon completion.
Optional extra
If possible, we would like this be wrapped in a WordPress plugin so it can inherit the database connection details and use the default WordPress scheduler instead of server cron. This is not a requirement, but if you are familiar with WordPress plugins, you should do it.
We are open to suggestions and improvements to this flow.
We would expect you to start working on the project within a week from the day you're hired and deliver a fully tested and working code in the timeframes agreed in advance.
Specific technologies required: PHP MySQL
Extra notes:
George L.
100% (19)Projects Completed
8
Freelancers worked with
6
Projects awarded
26%
Last project
11 Nov 2022
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies