Sometimes, you want to delay an Infusionsoft Campaign Builder sequence just a minute to give something time to complete. This is most often the case when you have an email that contains merge fields populated by an HTTP POST.
But the shortest interval in a Delay Timer is 15 minutes. You only need a minute – maybe even just a few seconds – to let the post run before resuming the campaign.
SOLUTION:
We will use the Pocket Developer Custom Delay Timer to pause the campaign for less than 15 minutes.
SUMMARY:
Put an HTTP POST snippet that calls Pocket Developer Custom Delay Timer at the end of a sequence where you want the pause. Hook that sequence to an API Goal that will be triggered after the delay to resume the sequence.
HOW – TO:
1. In the campaign sequence, add an HTTP Post snippet at the end of a sequence, where you want the delay to occur.
2. Configure the HTTP POST snippet as follows:
[wc_box color=”inverse” text_align=”left”]
NOTE: Everything in an HTTP POST is case sensitive. That includes the URL, the parameters on the left and the field names on the right. If caPitaLizaTion is wrong, your post will not work.
[/wc_box]
[wc_box color=”inverse” text_align=”left”]
ANOTHER NOTE: If you put the same callName in multiple places, even in multiple campaigns, you could get unintended consequences! It is a best practice to use a unique callName that would not be easy to accidentally duplicate for each custom delay timer.
[/wc_box]
1. Assuming you did an automated Pocket Developer installation of the Delay Timer, the URL would be something like http://yoursite.com/scripts/PocketDeveloper/Blocks/CustomDelay/customdelay.php. Again, be careful to match capitalization.
2. Leave the contactId parameter and value set to the default.
3. in the next Name/Value pair, add callName in the left-hand Name field and in Value field, add a name that is unique to this Delay Snippet e.g., WakeWebinar3f788734.
4. In the next Name/Value pair, add delayFor in the Name field and the number of seconds you want to delay in the Value. (This could also be in a merge field)
5. Copy the name you created for callName and close the HTTP Post snippet
6. Close the sequence. Custom Delay Timer POST snippets should always be the last thing in that sequence
7. Drag out a Goal from Toolbox. Any Goal will work, although I often use Other for this. Give it a name, like Resume Sequence.
8. Double click the meta icon in the lower left corner of the goal. Change the Goal type to API Call Made (last one in the drop-down)
9. Double-click on the goal to open it. For Integration, put your Infusionsoft app name. In Call Name, put the name you used and copied from the HTTP POST Snippet. In this case, in Step 3, we used WakeWebinar1. Click Save.
10. Connect the Sequence containing the Delay Snippet (the one with the HTTP POST calling /customdelay.php) to the API Goal you just created.
11. Then connect the API Goal to a sequence containing whatever you want to happen after the delay. Continue your Campaign as normal.
For Pocket Developer to install a Pocket Developer Building Block on your server, it will need your FTP credentials.
What is FTP?
FTP (File Transfer Protocol) is the quickest and easiest way to transfer files, images, video and documents to and from your web server. (Get more info)
Your web server is set up much like your computer. There is a system of folders (called directories on a server) and files within those folders.
To upload or download files between your computer and your web server, you use an FTP Client. An FTP Client is like Windows Explorer or Mac’s Finder, but for your server.
Why Do You Need My FTP Credentials?
In this case, you won’t be transferring files to your server, we will. Pocket Developer installs the Infusionsoft iSDK and all necessary files for your purchased Building Block to work. But we need access to your server to transfer and install them.
How Do I Find My FTP Credentials?
Here is a list of Knowledge Base articles from many of the most common web hosting services. If you host with someone else, you can just search “FTP Credentials” in their support documents. You should also have them in the email they sent you when you first set up the your account. If all else fails, call your web host’s Support and they can help you.
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.
This method also allows you to run the Building Block, as a Saved Action Set, on any individual Contact Record, from within the record, by using the “Select an action → Apply Actions → Run Another Action Set command.
[/wc_accordion_section]
[wc_accordion_section title=”Configuring the HTTP Post Snippet”]
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.
[wc_box color=”inverse” text_align=”left”] NOTE: Everything in an HTTP POST is case sensitive. That includes the URL, the parameters on the left and the field names on the right. If caPitaLizaTion is wrong, your post will not work.
[/wc_box]
[wc_box color=”inverse” text_align=”left”]
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.
[/wc_box]
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
[wc_accordion_section title=”Example URLs for Saved Action Sets”]
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:
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 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)
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:
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.
Result: “My Field Value” saved to _SomeOtherCustomField
[/wc_accordion_section]
[wc_accordion_section title=”Pro Tips”]
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.
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.
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 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)
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)
“?”: goes between the domain and the query string in a URL
[/wc_accordion_section]
[wc_accordion_section title=”Installing the Plug-In”]
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.
[/wc_accordion_section]
[wc_accordion_section title=”How Does the Plug-in Work?”]
Pocket Developer
Field Math Plug-in TM
QuickStart Guide
How does this Building Block work? The Field Math Plug-in gives you the following Infusionsoft superpowers:
→ Create counters, serial numbers, totals, avaerages, build custom reports, dashboards and more
→ Add, subtract, multiply or divide up to 52 fields or constants
→ Use any combination you like (e.g. (total Purchases/numPurchases)*10)
→ Place the result in the output field you specify
Two Ways to Use an API Guys Plug-inTM
1. In Campaign Builder, add an HTTP Post Snippet to a Sequence within a Campaign.
Doing this allows the Field Math Building Block script to 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.
This method allows the Field Math Building Block script to be run on lists of contacts.
This method also allows you to run the Building
Block, as a Saved Action Set, on any individual
Contact Record, from within the record, by using the “Select an action → Apply Actions → Run Another Action Set command.
[/wc_accordion_section]
[wc_accordion_section title=”Configuring the HTTP Post Snippet”]
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/FieldMath/fieldmath.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 formula in the Name field and type the formula you want the Field Math Building Block to perform in the Value field
If your formula is complex, you may want to work it out on paper first
[wc_box color=”inverse” text_align=”left”] NOTE: Everything in an HTTP POST is case sensitive. That includes the URL, the parameters on the left and the field names on the right. If caPitaLizaTion is wrong, your post will not work.
[/wc_box]
7. For each variable in your formula, you will add either a Merge Field or a constant
Obtain the field names by using the Merge button located on the right of the Post URL. Select the field name the drop down.
You can use any field in the Merge Field drop down that contains a number, including contact, company, owner and referral partner.
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 an underscore ( _ )
Custom field example for Company: ~Company._myCustomField~
Constants can be any number, including whole numbers or decimals
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 formula to be stored.
How To Configure Field Math In A Saved Action Set
To create a Saved Action Set to run in an individual record or on a list:
1. Go to the 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 Field Math 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 is with the Field Math Block script
Add the instructions (using the proper format) directly to the Post URL 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
Each key value pair is separated from the next one in the query string by ( & ) and there is an ( = ) between each key and value
5. Save the Action Set
[/wc_accordion_section]
[wc_accordion_section title=”How to Construct a Post URL with Query Strings For A Saved Action Set”]
How To Construct A Post URL With Query String For A Saved Action Set
To send run Field Math, from an Action Set, exactly as we did from the HTTP Post Snippet in Campaign Builder, we would construct the query string as follows:
This URL 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 they are very useful.
This query string is color coded to make easier to pick out the component parts:
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 the value 57.5 to Umpire Rating.
[wc_accordion_section title=”Use Field Math As A Counter”]
Use Field Math As A Counter
Pro Tip #1: Use Field Math As A Counter
How often have you needed a counter to increment each time something happens?
You can use Field Math to create a counter by simply incrementing the value by one and making the saveTo the same field as the formula:
In this example, the formula adds one to the Num Purchases field and then saves it back to that field.
[/wc_accordion_section]
[wc_accordion_section title=”Copy Sequences From One Campaign To Another”]
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 Counter HTTP Post Snippet — you can easily copy this as needed to a different campaign.
You can also copy it elsewhere within the same campaign and just change the field names as necessary.
[/wc_accordion_section]
[wc_accordion_section title=”Use Advanced Merge Field Notation”]
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 because for any one contact there could be multiple opportunities, tasks, etc. These have frequently been referred to as “one-too-many” records.
To solve this problem, we created an Advanced Merge Field Notation which allows Pocket Developer Building Blocks to pluck information from a specific field in a specific “one-too-many” record for use as a Building Block Parameter.
For more information on Advanced Merge Field Notation, please see the online documentation at
Once you begin using Pocket Developer Building Blocks, you will realize they become even more powerful when chained together.
That is to say, once your first Building Block is completed, the result can be passed to another block and used instead of a Merge Field or constant.
For example, imagine you use Find Opportunity as your first Building Block. Find Opportunity allows you to look for Opportunities by first name, last name, last updated, etc. and returns the ID of the Opportunity.
Pass the result of Find Opportunity (the Opportunity ID) to a secondBuilding Block, called Any Date, Any Format, Anywhere.
Now that you can pass an Opportunity ID to Any Date, you can use it to change the date of any date field within that Opportunity.
Without being able to chain Pocket Developer Building Blocks together, this would be impossible.
[/wc_accordion_section]
[wc_accordion_section title=”How To Chain Pocket Developer Plug-ins”]
How To Chain Pocket Developer Plug-ins
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 strings for a different block
In the example URL above, the result of the first Field Math calculation would be passed to Field Math again and used instead of a merge field or constant as the value of the variable b
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
To confirm Field Math 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 math function like formula =a+b, a = ~Contact.Username~, b = ~Contact.Password~, ~saveTo~ = Contact.Title (remember no tildes in the saveTo Value field)
Save and publish the campaign. Set up a test user, like Mickey Mouse. Put 1 in the User Name field, 2 in the Password field. Save and apply the Run Post tag. Wait a minute. When you refresh 3 should be in the Title field if everything is set up properly
If a result is not being saved to the record in Infusionsoft:
Field Math requires at least four Key Value Pairs. Make sure you have removed the tildes (~) in the saveToValue field
Make sure the HTTP POST Snippet ran by going to the Contact Record and looking under campaigns. This should be 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/FieldMath/fieldmath.php on your server
If you want the script to combine operations (add, add, add, divide) as is done in finding an average (a + b + c / d = average) try some examples on your calculator before you create the value pairs. The script cannot tell if you have made a mistake in the order of operation or put the wrong field in the Name/Value Pairs
[/wc_accordion_section]
[wc_accordion_section title=”Get More Pocket Developer Plug-ins”]
Get More Pocket Developer Plug-ins
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 Automated Stage Moves – 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)
FieldMath – 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 Spend – Calculate the total purchases for a contact. You specify whether to pull only paid invoices or all (coming soon)
Don’t see the Building Block you need? Find out how you can sponsor a Building Block for the good of all Infusionites.
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.
[/wc_accordion_section]
[wc_accordion_section title=”Glossary”]
Glossary of Terms
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 Request parameter
contactID: This is the contactID for the contact record where fields will be retrieved (if any) and where the result of the formula evaluation will be stored
Formula: The written description of the variables you want to use and the operations you want done, in the order you want them done. An example formula would be a+b or (a+b)*z
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
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
Operations: Add, subtract, multiply, and divide
Order of Operations: Rules used to clarify the order expressions should be evaluated in a mathematical formula
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’)
Variables: Are the names, in the left side of a Key/Value Pair, that refer to the values being added, subtracted, multiplied or divided. In this block, you can have up to 52 variables: a – z and A – Z. For example, in the formula a + b = c, a, b, and c are all variables
“&”: Goes between each Key/Value Pair in a URL
“?”: Goes between the domain and the query string in a URL
[/wc_accordion_section]
[/wc_accordion]
Advanced Merge Field Notation is the way you tell Pocket Developer what field you want to work with.
You may want to get information from it, change the information in it or merge it into an email or HTTP POST snippet. But somehow, you have to tell Pocket Developer which specific field (e.g. phone) and in what specific table (e.g. contact, company or opportunity) you are referring to. That is what Advanced Merge Field Notation does.
Advanced Merge Field Notation has a similar syntax to Infusionsoft’s familiar merge field notation:
~TableName.FieldName~ or ~TableName._CustomFieldName~
We just add to that notation and throw in a bunch of cool twists to make it super powerful.
With Advanced Merge Field Notation, you can specify any record or records in the Infusionsoft database just like you were running a query. You are not just limited to the contact table or the merge fields given to you in the Merge Field button dropdown.
Using Advanced Merge Field Notation, you can now:
access company, tasks, appointments, tags, opportunities, orders, invoices, invoices, products, payments, referrals, affiliates and any other Infusionsoft table accessible to the API
update them, get information from them, merge them, count them, compare them, average them, find the min, the max, the newest, the oldest, the first updated, last updated, combine them, filter using wildcards and tags, and much more
display them in an email, use them to trigger an action (using Universal Delay Timer) or merge them into an HTTP POST for an external application (e.g. document signing)
build complex datasets that require you to drill down into the tables (e.g. finding specific credit card charges)
merge information from or update a contact other than the one going through the campaign (e.g. the record of the referrer or opportunity owner)
merge date information such as the current date, month, day of week, year and more
We know … crazy, right? Yeah … crazy awesome!
[/wc_accordion_section]
[wc_accordion_section title=”Where I Can I Use It?”]
Where I Can I Use It?
Advanced Merge Field Notation is available in all “Core” Pocket Developer plug-ins. Core plug-ins are the yellow ones in the Pocket Developer Store.
Check the Pocket Developer Plug-In Store for the most updated list and to see all 30+ Pocket Developer plug-ins.
[/wc_accordion_section]
[wc_accordion_section title=”How To Use It”]
How To Use It
There are two different syntaxes for Advanced Merge Field Notation. One is Query Notation and the other is Reference Notation. You can use our advanced merge field notation to reference any of the available Infusionsoft tables, as well as a special “Date” pseudo-table.
Finds the Id of the newest Opportunity (newest is default) where Steve is the first word in the Opportunity Title.
Reference Notation
TableName(RecordID).FieldName
Example:
Opportunity(15).OpportunityTitle
Fetches the Opportunity Title of the Opportunity with the ID of 15.
Required Parameters
Table
The name of the table being queried
Field
The field whose value you’d like to get or set
Qualifiers
The table and field names can be further modified by “qualifiers.” Qualifiers can be either “filters” or “directives.”Filters will generally be used to pare down the results of an advanced merge field notation query, so as to more easily return or set one record in particular.Directives will generally be used to request an alternative result or take some action to further modify the resulting set of data.
Qualifiers may be chained, as in (…).Newest.Unpaid
The ‘Newest’ qualifier is assumed if no Newest/Oldest/Last/First is specified
Qualifiers are optional
Results will be ordered by DateCreated (if available) by default, unless explicitly overwritten with the OrderBy directive
Return the title of the opportunity, with the newest custom field Last Stage Move Date, where the Opportunity Stage is 56 (e.g. Awaiting Contract)~Opportunity.OpportunityTitle.FilterBy(StageID:56).OrderBy(_LastStageMove)~Return the title of the first opportunity where the Opportunity Stage is 56 (e.g. Awaiting Contract) when sorted alphabetically by Leadsource~Opportunity.OpportunityTitle.FilterBy(StageID:56).OrderBy(Leadsource:Text)~Return the title of the first opportunity where the Opportunity Stage is 56 (e.g. Awaiting Contract) when sorted numerically (lowest to highest) by Stage ID~Opportunity.OpportunityTitle.FilterBy(StageID:56).OrderBy(StageID:Number)~
Max
Returns the maximum of all returned numeric values in the specified field
Example:
Return the highest Order ID:
Order.Id.Max
Min
Returns the minimum of all returned numeric values in the specified field
Example:
Return the lowest Order ID:
Order.Id.Min
Count
Returns the number of results yielded from an Advanced Merge Field query
Example:
Tells you how many Opportunities exist for that particular contact:
Opportunity.Id.Count
Sum
Returns the sum total of all values returned by the Advanced Merge Field query
Example:
Gives you the total quantity of all items ordered on the Order with an ID of 15:
OrderItem.Qty.FilterBy(OrderId:15).Sum
Global
Runs “global” queries for all contacts, not just the contact associated with the action or sequence that invoked the call to the plug-in.
Example:
Gives you the total number of contacts with postal codes that begin with 902:
Q. Where do I find all of the table and field names?
A. Infusionsoft has a complete reference for all the tables and fields you can use with Pocket Developer’s Advanced Merge Field Notation. Although the table names, in particular, may not be immediately obvious, the descriptions will help you find what information is stored in each table.
To get full use from Pocket Developer, familiarizing yourself with all the information available is very helpful.
[/wc_accordion_section]
[/wc_accordion]
Log in to your account. If necessary, click “Building With Access To A Key”
From the My Apps page, click the button in the top right that says “Add a New App”
Give your app a name – it doesn’t matter what you call this. No one will ever see it. You can call it Test or Fido or Jumping Bean.
Put something in the description. Again … doesn’t matter.
Choose GoToWebinar for Product API
Expected API Requests Per Month – 2000O (Just making something up … who knows?)
Expected go live date – today’s date is fine
Application URL – localhost
Press the Save App button
Click the link to your new app. On the keys tab, copy the Consumer Key And Consumer Secret.
3) Download the zip file, from GitHub, which contains our GoToWebinar class library, our extended version of the Infusionsoft SDK, and other assorted and sundry files needed for this process.
4) Unzip the file. Use FTP to place it in your scripts folder (lower case) that you created when you set up your iSDK.
NOTE: If you do not already have a scripts folder, use your FTP client to add one in the main directory for your website (usually called www or public_html).
Do not worry if your server already has a copy of the Infusionsoft SDK on it elsewhere. This includes our extended SDK and makes configuration easier.)
5) Navigate to and open the /scripts/webinar/lib/citrix/config file with a text editor. Enter your GoToWebinar credentials in the following format:
Alias – just make this something descriptive like API_guys
User ID – this is the e-mail address you used to sign up for GoToWebinar
Password – this is your GoToWebinar password
Consumer Key – this is the consumer key you got when you set up your app in the Citrix developer center
Consumer secret – this is also from your app in the developer center
6) Navigate to the /scripts/webinar/lib/infusionsoft/isdk/ folder and open your conn.cfg.php file with a text editor
Replace the items in the array with the following: an alias (again, it doesn’t matter what you put here … Just something descriptive), your app name, leave the i, your API key, and a description of your app(what you put here doesn’t really matter much).
Save that file
(Note: if you have the SDK set up elsewhere on your server, you can copy these values from that file. Otherwise, you will need to get the API key from your Infusionsoft app)
7) Test your connections to Infusionsoft and GoToWebinar – Run the conn-test.php file by copying the following URL to your browser window: http://yourdomain.com/scripts/webinar/testConnections.php
If everything is set up correctly, you should see the following:
Step Two – Configuration for Webinar Registration
1) In your Infusionsoft app, go to Admin -> Settings and create the following custom fields for your Contact records (or repurpose fields you already have – must be the correct field type for this to work):
Webinar Date/Time (date/time)
Pretty Date (text)
Pretty Time (text)
Webinar Title (text)
Webinar Join URL (text)
2) Click on “View the field database names (for the API)” and write down the database name of each field contained in the far right column.
Note: You can use these fields over and over so long as you do not have more than one webinar scheduled at a time.
3) Go back to your server. Navigate to /scripts/webinar/set-custom-fields.php. Open that file with your text editor and configure the names of your custom fields, as follows:
Step Three – Configuration for Applying Event Registered Tags (optional)
(This step programmatically creates and applies a tag to each person who registers, with a name formatted as ‘YYYYMMDD Event Name’ in the tag category you choose. I put mine in a category, specifically for this purpose, called Event Registered.)
1) Go to CRM Settings – Tag Categories. Hover over either the Edit or Delete links for the tag category to get the Category ID. You need the category ID where you (will) put the Event Registered tag. Write down that ID.
NOTE: Again, these tags have not been created yet. We create those programmatically when and if someone registers. But you need to know which category you will use when you create them.)
2) Go back to your server. Navigate to /scripts/webinar/event-reg-tags.php. Open that file with your text editor and configure the tag category and text, as follows:
[php]
$eventTagCategory = 31; // Put your tag category ID here
$tagText = ‘ API Mastermind’; // Make sure to leave the space before title
[/php]
Step Four – Configuration for Applying Attendance Tags (Optional)
1) Create a generic, reusable tag for Attend and Did Not Attend that is used to drive the campaign, not store information. (I put all tags of this nature in a Tag Category called Process)
Write down the IDs for each tag
Step Five – Configuring the Campaign in Campaign Builder:
1) Log in to GoToWebinar to get the ID of the webinar you want to set up.
This will be the long number at the end of the registration link, NOT the nine digit number labeled Webinar ID. Write that down.
2) Then set up Campaign Builder something like this:
(Railroad Siding is optional. This is a 15 minute delay timer that holds the confirmation email if the Join URL hasn’t come back from GoToWebinar yet.)
The webinar registration form must have fields that match the fields you selected when you set up the webinar. So, if you required first, last and email, your Infusionsoft form must also have first, last and email.
3) Register and Set tags sequence:
3a) Register GTW Post
For post URL, use http://yourdomain.com/scripts/webinar/registration.php
Leave contact_id as is
Add a field for webinar_id. Use the long webinar ID you wrote down earlier.
3b) Set Custom Fields Post
For post URL, use http://yourdomain.com/scripts/webinar/set-custom-fields.php
Leave contact_id as is
Add the following name value pairs, substituting the information for your webinar in each field:
3c) Apply and remove tags to taste
4) Send Confirmation Sequence
4a) Confirmation email can now go out using all of your various webinar merge fields, like so:
(NOTE: Your merge field names will be different.)
4b) Set Specific Date Tag
For post URL, use http://yourdomain.com/scripts/webinar/event-reg-tag.php
Leave contact_id as is
Add eventDate as a name and your date only merge field:
5) Check Attendance After Webinar Sequence (optional)
5a) Create a field timer using your Date Only field that fires after the webinar has completed:
5b) Check Attendance and Set Appropriate Tags Post
For post URL, use http://yourdomain.com/scripts/webinar/tag-attendance.php
Leave contact_id as is
Add the long webinar ID, and your tag IDs for the generic Did Attend and Did Not Attend tags you created earlier.
6) Add a finish goal for the two generic attendance tags and Publish.