Installing the Plug-In
You should have installed your Infusionsoft Pocket Developer plug-in using the instructions provided when you purchased the plug-in.
If, for any reason, you have not installed your Pocket Developer plug-in, follow these simple instructions, to learn how.
The Any Text Anywhere Plug-in gives you the following Infusionsoft superpowers:
- → Create emails containing order or opportunity data in Campaign Builder, create totally custom invoice templates, build custom reports, save custom fields and more
- → by updating or copying any text field
- → from, to within Contacts, Companies, Referral, Partners, Opportunities and Orders.
Two Ways to Use an API Guys Infusionsoft Plug-in
1. In Campaign Builder, add an HTTP Post Snippet to a Sequence within a Campaign. Using this method allows the Any Text Plug-in script to be run on each contact in the Campaign individually, as the Contact moves through the Campaign. 2. Outside of Campaign Builder, save an Action Set using the Building Block’s POST URL. Using this method allows the Any Text Building Block script to be run on lists of Contacts.
Configuring the HTTP Post Snippet
1. Open an HTTP Post Snippet in a Sequence within your Campaign. 2. In the POST URL field, type : http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php 3. Leave the default Name/Value Pair as contactID and ~Contact.Id~ 4. Hover over the end of the first Name/Value Pair field to make the Add and Delete Field symbols appear 5. Click the + to add a field 6. In the new fields, type textToSave in the Name field and type either:
- The text you want to put in a field, (e.g “New Client”)
- “to set the field to empty
- The name of a merge field. In this case Any Text Anywhere will copy the value it finds in that field to the field being updated.
The easiest way to get the field names is to use the Merge button, to the right of the Post URL, and select the field name from the drop downs.
You can use any field in the Merge Fields dropdown that contains a number, including Contact, Company, Owner and Referral Partner fields. Merge Field Rules
- You must put a tilde (~) before and after the field name
- You must precede the field name with the table name and a period
- You must precede a custom field name with a _
- Custom field example for Company: ~Company._myCustomField~
- Constants can text or ” ” for blank
- When a merge field is a field name, the script will use the value it finds, in that field, for that contact
8. Add another Name/Value Pair field. In the Name field, type saveTo. In the Value field, add the merge field where you would like the results of your math calculation to be stored.
ANOTHER NOTE: The merge field in the saveTo parameter should never have tildes around it (~). If you use the merge button to add a field, make sure to remove them for this parameter. We are saving to, not merging from.
URL:
The URL, on your server, where the Pocket Developer script is stored. For example:
http://yourdomain.com/scripts/PocketDeveloper/Blocks/TagsFly/tagsfly.php
In the example above, assume the following values in these fields for a contact, Herb Jones:
Contact._Phone3 = 214-509-7000
214-509-7000 will be copied to Phone 1, in Herb’s contact record, when this post runs.
How To Configure Any Text Anywhere in A Saved Action Set
To create a Saved Action Set to run in an individual record or on a list: 1. Go to Infusionsoft Main Menu → CRM → Settings → Action Sets 2. Click the green “Add An Action Set” button 3. In the window that opens, give your Action Set a descriptive name, for example, “Field Math – Add One to Counter Field”, and select “Send An HTTP Post To Another Server”. 4. Put the Any Text Anywhere Building Block URL in the Post URL field, when it appears.
- Notice that there are no field pairs to define in this dialog box. The only way to include instructions on what you want done with the Any Text Block script is to add them (using the proper format) to the Post URL itself as a query string.
- A query string starts with “?” after the URL and includes the same key value pairs you created in the http post snippet.
- Eachkey value pairis separated from the next one in the query string by & and there is an “=” between each key and value.
- See next section for an example of how to construct the complete URL for the action set
5. Save the Action Set
Example URLs
How To Construct A Post URL With Query String For A Saved Action Set
To send run Any text Anywhere from an Action Set, exactly as we did from the HTTP Post Snippet in Campaign Builder, we would construct the query stringstring as follows:
http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php?textToSave=Contact.Phone3&saveTo=Contact.Phone1
Look at this url. We know it looks long and scary but don’t let that intimidate you. query strings are pretty easy to decode, once you know what you are looking at, and very useful. The query string is color coded, to make easier to pick out the component parts:
- The post url (black) is
http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php
- The URL is followed by a ? , which tells the server what follows are parameters to be processed by the script at this URL
- The text to be copied comes from textToSave=Contact.Phone3
(Note that field names do not have tildes around them, when you are constructing query strings for Action Sets. Also, there is no need to include Contact ID. Tht is sent automatically)
- The saveTo field is saveTo=Contact._Contact.Phone1
- Each of these are called Key Value Pairs and they are separated by a &
Just as with our HTTP Post Snippet in the Campaign Builder, if this URL was run against Herb Jones’ record, using an Action Set, it would write 214-509-7000 to Phone 1. Here are some additional example URLs:
http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php?textToSave=Fixed%20Value&saveTo=_MyCustomField
- Result: “Fixed Value” saved to _MyCustomField
- Notice, in a query string, when setting a fixed value, you must use ‘%20’ to denote a space. (e.g New%20Client). In the HTTP POST Snippet, Infusionsoft takes care of the URL encoding automatically.
http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php?textToSave=_SomeCustomField&saveTo=_SomeOtherCustomField
- Where: _SomeCustomField = My Field Value
- Result: “My Field Value” saved to _SomeOtherCustomField
Pro Tips
Pro Tip #1: Use Field Math As A Counter
Do you stash data in custom fields or tags, instead of using custom fields in Opportunities, Companies or Orders, because the data wasn’t accessible as a merge field?
You can use Any Text Anywhere to temporarily copy text, from fields in Opportunities, Companies, Orders, and Referral Partners, to fields in the Contact. Merge it into an email template or http post. Then, use Any Text Anywhere to set those stash fields in the contact record back to blank
Pro Tip #2: Copy Sequences From One Campaign To Another
Don’t forget that you can copy Sequences from one Campaign to another.
If you create this as a standalone Sequence in your Campaign, meaning the only thing in the Sequence is your Any Text Anywhere HTTP Post Snippet, you can easily copy this, when needed, to a different Campaign, or elsewhere within the same Campaign and just change the field names as necessary.
Pro Tip #3: Use Advanced Merge Field Notation
Up until now, it has not been possible to merge information from fields in Opportunities, Tasks, Appointments, Orders and Invoices. That is because these are what as known“one-to-many”. For any one contact, there could be multiple opportunities, tasks, etc.
To solve this problem, we have created an Advanced Merge Field Notation. This allows Pocket Developer Building Blocks to pluck information from a specific field in a specific one-to-many record and use it as a Building Block Parameter.
For more information on Advanced Merge Field Notation, please see the online documentation at http://theapiguys.com/blog-post/advanced-merge-field-notation-infusionsoft-documentation/
Pro Tip #4: Chaining Pocket Developer Building BlocksTM
Once you begin using Pocket Developer Building Blocks, you will realize they become even more powerful when you chain Building Blocks together.
That is, once your first Building Block is done, the result is passed to another block and used instead of a merge field or constant.
For example. imagine you want to send a text message to one of your employees about an Opportunity. You want to include the name of the Opportunity in your text.
You could do this as three different HTTP Posts. The first would use Any Text Anywhere to put the name of the Opportunity in a temporary custom field. The second would use a Send Text Building Block and merge the value of the temporary field. The third would use Any Text Anywhere again to set the temporary field back to blank.
Or you could save all those steps and chain Any Text Anywhere with Send Text and do it all in one step …
How To Chain Pocket Developer Building Blocks
To chain Building Blocks, you will add an optional Key Value pair.
- The Key is called request and the value is a URL with query string for a different block.
- Example request URL:
http://yourdomain.com/scripts/PocketDeveloper/Blocks/AnyText/anytext.php?textToSave=Opportunity.OpportunityTitle.last&request=http://yourdomain.com/scripts/PocketDeveloper/Blocks/TwilioText/twiliotext.php?message=Reminder%3A%20{result}%20is%20due%20today&sendTo=214-509-8500&apiKey=12345ABCD98765
- Where: Opportunity.OpportunityTitle.last = “Best Opportunity Ever”
- Result: “Reminder: Best Opportunity Ever is due today” is sent to http://yourdomain.com/scripts/PocketDeveloper/Blocks/TwilioText/twiliotext.php and merged into the message
- When chaining two Pocket Developer Building Blocks together, the saveTo pair is optional for the first block. You may choose to pass the result of the first block to the second block without saving it in an Infusionsoft record.
- Notice the : and spaces in message=Reminder%3A%20{result}%20is%20due%20today are represented by the symbols %3A and %20. This is called URL Encoding. All spaces and symbols must be URL encoded in a query string. It is not necessary in a HTTP Post snippet because Infusionsoft takes care of that for you. You can find a complete list of punctuation, symbols and their corresponding URL codes at http://www.w3schools.com/tags/ref_urlencode.asp
Troubleshooting
- To confirm Any Text Anywhere is working properly in your application, set up a new Campaign in Infusionsoft. Add one Tag Goal with a new tag, such as Run Post. Add one Sequence with an HTTP Post Snippet. Create a simple function like textToSave = myText, saveTo = Contact.Title (remember no tildes). Save and Publish the Campaign. Set up a test user, like Mickey Mouse. Save and Apply the Run Post tag. Wait a minute. When you refresh, if everything is set up properly, MyText should be in the Title field.
- If a result is not being saved to the record in Infusionsoft:
- Make sure you are including all required Key Value Pairs.
- Make sure you have removed the tildes (~) in the saveTo Value field.
- Make sure the HTTP POST snippet ran by going to the Contact Record and looking under Campaigns, about halfway down the page. (You can also see Campaigns in Interactive View.) You should see the HTTP Post at the top of Recent Campaign History.
- Make sure the URL in the HTTP Post Snippet is pointing to /scripts/PocketDeveloper/Blocks/AnyText/anytext.php on your server.
Get More Pocket Developer Building BlocksTM
The more Pocket Developer Building Blocks you have, the more cool things you can do in Campaign Builder. The following blocks have been released or will be soon.
Any Date, Any Format, Anywhere – give the block any date, in any format (e.g. next Monday). It will convert to any valid date/time format and store in a date or date/time field (coming soon)
Any Text Anywhere – copy and store text from another field, set a field to a specified text string, or set the value to blank
Any Opportunity to Any Stage – finds Opportunities for a Contact based on criteria you specify and changes the Opportunity Stage (coming soon)
Basic Math – add, subtract, multiply and divide Infusionsoft field values (coming soon)
Combine Fields – combine the value of two fields (concatenate) and store the result (coming soon)
Counter – increment or decrement a field by a specified number when run (coming soon)
Field Math – do math using up to 52 fields and constants and store the result in a field
GoToWebinar Integration – retrieve webinars, register contact, save webinar information in the contact record, and check and tag attendance ld (coming soon)
Multiple File Uploads – Upload one or more files to the contact’s filebox
Send A Text (TelAPI) – send a SMS message using TelAPI (coming soon)
Send A Text (Twilio) – send a SMS message using Twilio (coming soon)
Total Purchases – calculate the total purchases for a contact. You specify whether to pull only paid invoices or all (coming soon)
Don’t see a Building Block you need? Find out how you can sponsor a Building Block for the good of all Infusiondom.
Dunne, Foryoo & Phast ImplementationsTM
We also have a number of Dunne, Foryoo & Phast implementations for projects that are just a little too “squishy” for Pocket Developer. Implementations can generally be completed in 24 hours or less. Browse the list for currently available Implementations.
Glossary of Terms
Action Set: a series of actions that are used together. Generally call from an Action Dropdown menu
Chaining : using results of one block in another block. The result of the initial Building Block is passed the a second block by using the Requestparameter.
contactID: This is the contact Id for the contact record where fields will be retrieved (if any) and where the result of the formula evaluation will be stored.
Infusionsoft: a powerful small business automation tool
Key/Value Pair: a parameter name and value passed to the server by a HTTP Post or URL query string
Name/Value Pair: a parameter name and value passed to the server by a HTTP Post or URL query string
One-To-Many: a relationship between records in a database where one record in one table could relate to more than one records in another table. For example, the relationship between Contacts and Opportunity is one-to-many because a single Contact could have multiple Opportunities.
Query String: the part of a URL that contains data to be sent to the location identified in the url. A post url contains location information followed by a “?” and what comes after that is the query string.
Request: This is the chained Building Block.. The merge field {result} can be placed anywhere within the URL to include the result of the first Building Block. This allows you to pass the value to another script/block.
saveTo: This is the merge field where the result of the formula will be stored, such as _ArenaHandicap or _CustomField1. (Optional if using ‘request’)
“&”: goes between each key value pair in a url (concatentation)