latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Infusionsoft Integration

Home Forums Community Forum Infusionsoft Integration

This topic contains 8 replies, has 4 voices. Last updated by  michael cosentino 3 years, 11 months ago.

Topic Author Topic
Posted: Thursday Jan 17th, 2013 at 4:58 am #37868

I have read this thread about infusionsoft integration here. However, I find it this part confusing on moxall’s instructions.

Copy everything below, save to a new file and upload this file to your server, and then enter the URL in a HTTP Post function to create a new user in WordPress:

Can you clarify that please and perhaps it would be helpful if you could provide a more step by step approach on doing this process in s2member. I will take care of the infusionsoft part.

Thanks

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Thursday Jan 17th, 2013 at 10:32 pm #37997

I would like to follow my request for assistance regarding this matter

Posted: Sunday Jan 20th, 2013 at 12:50 am #38393
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

The best way to integrate with other 3rd-party components (including with InfusionSoft), is to use s2Member’s API Notifications. Please see this article for more detailed assistance with this.

You will want to connect one of s2Member’s API Notifications with either a custom script that you write (perhaps it will connect with InfusionSoft in a more advanced way), or with an API already provided by InfusionSoft.

Related article: http://community.infusionsoft.com/showthread.php/1497-s2-Membership-site-integration-with-Infusionsoft

Posted: Tuesday Jan 22nd, 2013 at 1:19 am #38868

Thanks for the response. But other than the option you just gave me, I would like to know more about how they did it on this forum

Posted: Tuesday Jan 22nd, 2013 at 6:54 am #38940

It was mentioned that other than the API notifications approach, we could also use Pro API for remote operations approach and that is what I would like to try out. However, I am confused on the part that was mentioned by one of the members who used this approach saying

Copy everything below, save to a new file and upload this file to your server

I would like to know more about this method

Posted: Tuesday Jan 22nd, 2013 at 9:01 am #38950
Randy King
Username: RandyKing

Hey, Michael –

I have done this and it works quite well. This integration is one-way; it creates (does NOT update) a user that is already in InfusionSoft into your WordPress site. Here is the code that I used with a very detailed explanation below…

<?php
	$op["op"] = "create_user";                                   /* Required.  This is the only op code available in S2 currently. */
	$op["api_key"] = "your_infusionsoft_api_key_here";           /* Required.  This is the S2Member Remote Operations API Key */

	$op["data"] = array (/**/
		"user_login" => $_REQUEST["FirstName"].$_REQUEST["LastName"],  /* Required. A unique Username. Lowercase alphanumerics/underscores. */
		"user_email" => $_REQUEST["Email"],                  /* Required. A valid/unique Email Address for the new User. */
                                                                     /* Optional password omitted so that a default one is generated. */
		"first_name" => $_REQUEST["FirstName"],              /* Optional. First Name for the new User. */
		"last_name" => $_REQUEST["LastName"],                /* Optional. Last Name for the new User. */
		"s2member_level" => "0",                             /* Optional. Defaults to Level #0 ( a Free Subscriber ). */
        "s2member_ccaps" => "ima_tools,ima_videos,sxsm",             /* Optional. Custom Capabilities that create a special user.  */
		"s2member_notes" => "Infusionsoft Create IMA User",  /* Optional. Administrative notations. */
        "opt_in" => "1",                                             /* Optional. A non-zero value tells s2Member to attempt to process List Servers. */
		"notification" => "1",                               /* Optional. A non-zero value tells s2Member to email the new Member their */
                                                                     /*           username/password and notify the site admininstrator. */
	);

	$result = trim (file_get_contents ("http://www.YourDomain.com/?s2member_pro_remote_op=1", false, stream_context_create (array ("http" => array ("method" => "POST", "header" => "Content-type: application/x-www-form-urlencoded", "content" => "s2member_pro_remote_op=" . urlencode (serialize ($op)))))));

	if (!empty ($result) && !preg_match ("/^Error\:/i", $result) && is_array ($user = @unserialize ($result)))
        {
		echo "Success.  New User created with ID: " . $user["ID"];
        }
	else
	{
		echo "S2 Says " . $result;
	}
?>

1. Edit the above code on your computer in a text editor (or tool like PSPad) using the following guidelines…

A. Replace “your_infusionsoft_api_key_here” with the api key that you find in your InfusionSoft app under the menu Admin->Settings->[Application]->”API”. Enter clear text in the “API Passphrase” box and click [Save] at the bottom. Your Encrypted Key will be displayed. Copy that. NOTE – Do this only ONCE because if you change your API Key, any of the scripts you created before that will break.

B. I chose to create WordPress Usernames as the concatenation of the first and last name of the Infusionsoft user.

C. I use the s2Member Custom Capabilities “ccaps” inside my WordPress code to grant specific access.

D. Change “YourDomain.com” to the name of your domain.

2. Save the above code on your computer as “InfusionCreateUser.php”.

3. Use FTP to copy it onto “YourDomain.Com” into the top-level directory.

4. Inside of Infusionsoft, you create an “Action Set”. Go to the menu CRM->Settings->[Action Sets] and click the [Add An Action Set] button.

5. Name your action set something like “S2 – Create WordPress User on MyDomain”.

6. Under Actions, enter the following…

A. Select “Send an HTTP post to another server”

B. In the box, enter the following: http://www.YourDomain.com/InfusionCreateUser.php

C. Click the [Save] button – the action set is created

D. Add whatever other actions you want; i.e., creating tags, etc.

E. Close the action set dialog box

7. Now the fun begins! Here is how you would create a new user in your WordPress site from inside Infusionsoft…

A. Find the user that you want to use with Contacts->View Contacts and whatever search criteria you need.

B. From the user’s contact page, click on “Select an Action” in the lower right and choose “Apply Actions”.

C. In the Apply Actions dialog, choose “Run Another Action Set” from the dropdown

D. Find and select the action set you created; e.g., “S2 – Create WordPress User on MyDomain” and click the [Save] button

E. Now click the [Apply Actions to ..name..] button

8. Your user is created and the Member ID is returned.

Step 7 is what you repeat over and over again for each user, which is a totally MANUAL process. Of course, you can include that action set inside of any other action set, web form, followup sequence, etc.; anywhere an action set can be used.

If your user is not created, s2Member will return the reason and you will see it displayed on your screen in the same way that you saw the success message. Usually, the problem is that the user already exists inside MyDomain.com WordPress.

Posted: Tuesday Jan 22nd, 2013 at 1:14 pm #38981
Todd
Username: tdaubs

Just wanted to drop a note of thanks to Randy for this very helpful post. I have been considering Infusionsoft for a project and I’m making a special note of this post. Again, thanks!

Posted: Tuesday Jan 22nd, 2013 at 1:35 pm #38983
Randy King
Username: RandyKing

Todd, you’re very welcome. Infusionsoft is a powerful, fully-featured automation system and it can be very very complex. They are making great strides toward simplification, but it will surely help if you have a decent understanding of basic coding and database practices. It’s not for the faint of heart nor the thin of wallet. :)

Posted: Wednesday Jan 23rd, 2013 at 12:38 am #39118

Hi Randy,

Thank you very much for providing this very comprehensive guide.

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.