SOLVED

Re: REST API: A/B Test Details

Go to solution
Chris_Francis
Level 4

REST API: A/B Test Details

Using the Lead Activities API, I am able to retrieve information about email sends that were part of an API test.  But the campaignID that is returned in the activity data does not correspond to a campaign in the campaign endpoint.  And though the Test Variants are returned, there is no way to get information regarding the varients themselves (email, subject line, etc)  and I don't see a way to deterimine which variant was the winner as the sends to the winner have a test variant of null.

How can we determine these data points through API?  without this information it will be very difficult to report in our BI tool

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor

Re: REST API: A/B Test Details

I was able to get details of the UI abstracted child campaign created and used by an email send program through the get campaign by id endpoint, FYR - I used the campaign id from the activities response. And, since the email assets with A/B test and Champion challenger test are not accessible via email endpoints (ref this page from the dev docs), it would make sense to use the lead activities API endpoint to get email asset details - this thread tells me that the e-mails that had A/B tests will have an ".Whole Emails Test"/".Subject Line Test" appended to their name in the activities response.

 

I setup a sample A/B test in my SB instance to cross check some facts, below are some notes from the results:

  1. Marketo creates different UI abstracted campaigns for sending the test variants and sending the winner email variant to the applicable audience. Id's of the campaigns can be obtained from the activities endpoint, and get campaign by id endpoint can be queried for campaign's additional details.
  2. The test variant parameter with value as a numeric id is only included in the email activities for the test group - for the winner group the attributes array in the JSON response does not include the Test Variant parameter - hence your parser probably returned null as a value for test variant parameter for the winner email activities.

AFAIK, I don't think there exists an API call to query the test variants used for the A/B testing, however as a workaround - you can either export the test variant data from the dashboard of the email program or from an email analysis report in the revenue cycle explorer. 

View solution in original post

3 REPLIES 3
Darshil_Shah1
Level 10 - Community Advisor

Re: REST API: A/B Test Details

I was able to get details of the UI abstracted child campaign created and used by an email send program through the get campaign by id endpoint, FYR - I used the campaign id from the activities response. And, since the email assets with A/B test and Champion challenger test are not accessible via email endpoints (ref this page from the dev docs), it would make sense to use the lead activities API endpoint to get email asset details - this thread tells me that the e-mails that had A/B tests will have an ".Whole Emails Test"/".Subject Line Test" appended to their name in the activities response.

 

I setup a sample A/B test in my SB instance to cross check some facts, below are some notes from the results:

  1. Marketo creates different UI abstracted campaigns for sending the test variants and sending the winner email variant to the applicable audience. Id's of the campaigns can be obtained from the activities endpoint, and get campaign by id endpoint can be queried for campaign's additional details.
  2. The test variant parameter with value as a numeric id is only included in the email activities for the test group - for the winner group the attributes array in the JSON response does not include the Test Variant parameter - hence your parser probably returned null as a value for test variant parameter for the winner email activities.

AFAIK, I don't think there exists an API call to query the test variants used for the A/B testing, however as a workaround - you can either export the test variant data from the dashboard of the email program or from an email analysis report in the revenue cycle explorer. 

Chris_Francis
Level 4

Re: REST API: A/B Test Details

Thank you.  I am about to leave on PTO.  I will investigate this solution when I return.  Hopefully I can mark this as the answer 🙂

Darshil_Shah1
Level 10 - Community Advisor

Re: REST API: A/B Test Details

Sure! 👍