This tutorial will show you the process for integrating OptimizeMember with Infusionsoft. Once you have integrated these two solutions you will be able to send a contact record information to OptimizeMember to be setup as a member of your membership
[OptimizeMember] 1. Copy your Secret API Key from OptimizeMember
User first needs to go to www.example.com/wp-admin/admin.php?page=ws-plugin--optimizemember-scripting (replace www.example.com with your own domain) and open the “Pro API For Remote Operations” section. From this section secret API Key needs to be copied.
[Infusionsoft] 2. Setup the HTTP Post inside the Campaign Builder
On Infusionsoft side, “Send HTTP POST” action needs to be used to send data. HTTP POST URL should be http://www.example.com/?optimizemember_pro_remote_op_integration=1 (again, replace with your own domain).
There are few mandatory name/value pairs:
- op - should be ‘create_user’ (action that is being done),
- api_key - secret api key copied from the first step,
- data[user_login] - contact username and
- data[user_email] - contact email
You may also wish to use:
- data[optimizemember_level] - level number (if left empty, 0 will be used - free subscriber),
- data[optimizemember_ccaps] - packages (comma separated if more than one),
- data[notification] - 0 or 1 (if is set to 1, OPM will email new user with username/password)
IMPORTANT NOTE 1:
ENSURE YOUR POST URL DOMAIN MATCHES EXACTLY YOUR DOMAIN - so if your domain does not include "www" when checking on Wordpress > Settings > General you must not include it here or the integration will not work
IMPORTANT NOTE 2:
For the field names from Infusionsoft (e.g. ~Contact.Email~ ) - you need to ensure you are using the merge codes field names and not manually typing these in. We have seen many people use -Contact.Email- instead of the correct ~Contact.Email~ which means no information is sent from Infusionsoft to OptimizeMember
There are great number of additional name/value pairs:
- data[modify_if_login_exists] - 0 or 1 (Set this to 1 to modify if user exists. If data[user_login] is already present in the system, user update will be made),
- data[user_pass] - only use this if you wish to specify the password from a merge field
- data[first_name] - user first name,
- data[last_name] - user last name,
- data[opt_in] - 0|1 (if is set to 1, attempt to trigger defined auto-responders)
- data[notification] - 0|1 (if is set to 1, OPM will email new user with username/password)
Troubleshooting this Integration
403 Error When Using HTTP Post
If you get a 403 error when testing the HTTP Post, this might mean your server has to whitelist the Infusionsoft IP Address ranges which are as follows:
If you are using the Cloudflare DNS service - try adding these IP ranges to your trusted IP addresses or test with Cloudflare disabled as this is known to cause issues
Error 640 with Infusionsoft
We have found this error can be caused by Cloudflare also.
Error 406 with Infusionsoft
This can be due to not having the field names correct (see Important note 2 above) or having additional fields inside the integration. For example do not send any blank fields through to OptimizeMember, so if you are not creating a password at Infusionsoft through some other application, do not include this field inside your HTTP Post fields.
User not created inside OptimizeMember
This is usually due to something inside the HTTP post not being correctly entered. Please check the following common points of error:
1. Ensure that you have used the merge field values for email, name etc and not manually entered these. See the video above for steps on how to do this
2. Ensure that your API key you are using is the one provided inside OptimizeMember > API/Scripting > Pro API for Remote Operations. Not your Infusionsoft API key
3. Ensure you are not sending through any blank fields. Do not use the user password field from Optimizemember unless you have another app that is generating a password inside Infusionsoft first, and if you do you should use the password merge field to ensure that the password is sent to OptimizeMember. If you do not send a password, one will be generated automatically
4. Ensure your HTTP post sequence and campaign are fully published inside Infusionsoft
5. If you are still having problems, we recommend rebuilding the HTTP post sequence from scratch to remove the possiblity of any typos or other errors that are hard to spot.
When submitting a test transaction through infusionsoft payment form, please be sure not to use any email addresses that may already be assigned to an administrator user within your WordPress Users area, otherwise the http post will not create any users since the email address is already being used by and admin. Users will only be created/updated when 1) the email doesn't belong to an admin user, and b) if the email is not being used or belongs to an existing (non admin) user (which will then simply update the user so long as you added data[modify_if_login_exists]=1 as a value pair.