Mar 28

I created integrations with ExactTarget for a client and found it was an up-hill battle to get information about their web services and rest interface.  The only way to get the documentation is behind lock and key, a private forum and knowledge-base called 3sixty that is slow, has no user participation, and if you are a freelancer it’s just another layer of overhead to get an account to talk to people there – probably the reason why there is virtually no user adoption.  :)

Since I see no merit in contributing code to a private forum that you have to buy in for the sake of that company, I bought a domain and put up a punBB forum to give people a public space to talk openly (like the Salesforce.com forums):
http://ExactTargetDeveloper.com 

Mar 5

Today I noticed these transactions appearing on mint.com:  Looks like a pregnant lady at the mall. :)

picture-4

Mar 3

I was answering a question in the Salesforce.com developer forums today and someone asked if the solution I offered was documented anywhere. I couldn’t find the documentation for the option – so I may as well post it here.

The function URLFOR() creates a link to somewhere in Salesforce.com without having to hard-code your server name and worry about links breaking later.  You can use this function to create another record automatically and have the system automatically press the save button too. Simply append “save=1″ at the end of the array of field values you are passing. Here are some example uses:

Create a button that updates a hidden workflow field on the record you are in. To use custom fields you must find the field ID (open the object, under fields, and open the field detail page, use the ID in the url).

{!URLFOR($Action.Account.Edit, Account.Id, [retURL=URLFOR($Action.Account.View, Account.Id), 00N300000030Ea1 ="TRUE", save=1] )}

Have an Account and you want to have 1 button that creates a renewal opportunity. You can add more fields that are important to you (close date+1 year?).

{!URLFOR($Action.Opportunity.Edit, null, [Amount = Opportunity.Amount , AccountId=Opportunity.AccountId , OwnerId = Opportunity.OwnerId, save=1] )}

Mar 2

Nerd Factor: 8

I am trying to call an Exact Target Web Services (SOAP) API via PHP and there is this problem where the __getLastRequest() is showing that my data isn’t actually being put into the request. It looks like I’m not passing any data aside from the basic XML showing the method name.

It has been a while since I ran into this issue and so I wanted to make note of it on a blog, somewhere indexed more thoroughly by Google, so the next person who ran into the problem would save a little time.

The skinny:  You need to explicitly encode the objects that are being sent to the service.

If you want to pass no data:

$sfs = new ExactTarget_SalesforceSend();
$sfs->Email = $e;
$sfs->Targets = array( $t );
$sfs->FromName = "Lead/Contact Owner Name";
$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);

If you do indeed want to pass data:

$sfs = new ExactTarget_SalesforceSend();
$sfs->Email = $e;
$sfs->Targets = array( $t );
$sfs->FromName = "Lead/Contact Owner Name";
$object = new SoapVar($sfs, SOAP_ENC_OBJECT, 'SalesforceSend', "http://exacttarget.com/wsdl/partnerAPI");
$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);

That bolded line tells php/soap that it needs to encode based on a specific element in the wsdl schema.  In other languages you can use wsdl2java and end up with classes that you can just pass along and they get serialized the right way.  PHP and other languages of that group (Perl, Ruby) need to explicitly encode the data that is being passed.  You would expect that passing an array/dictionary/object into the function expecting that element would work – but no – it just needs to be told ever so gently which data type it should use.

Of note:  I belive this may just happen when inheritance is used in publishing the web service (.Net and Java) which is represented in the wsdl file like this:

<extension base="tns:APIObject">

For Google, the error I was getting was:

Requested value 'APIObject' was not found.