2

Is it possible to get the Promotions information, the Experiments information, a ruler result (Component an the Component Presentation) and a result of simulate a Trigger in a Page from an external service or application? Is it possible to get it through the CoreService or from a another similar service?

I don't talk about the Smart Target service (odata.svc) that returns the data that is configured in Tridion for the promotions / experiments if not the Fredhopper service that returns the result of the execution of a rule created for a page to perform an A / B test, which if I'm not mistaken would be the SmartTarget Deployment Web Service call (http: // XXXX / SmartTargetDeploymentWebService / SmartTargetDeploymentWebService? wsdl) that is done from the Smart Target libraries displayed in the front-end application (smarttarget_odata_cartridge. jar, smarttarget_cartridge.jar, smarttarget_core.jar, smarttarget_entitymodel.jar). Is it possible to simulate this behavior? Is there any documentation of this service to know what methods it has and how to invoke each of them?

2
  • these messages have been very useful, but I would like to ask something else. Is it possible to simulate the visit and the conversion of an experiment from an external service? That is, when my page renders, invoke a call to increase the visit or simulate the intermediate link used by SDL to add a new conversions. How SmartTarget generate data parameter in intermediate link? If yes, how could it be done? I don't see this functionallity in Content Delivery API that Marko said. Thanks a lot for you help!! Sergio.-
    – Sergio G
    Commented Jul 24, 2018 at 14:05
  • I think your question will be a lot more clear if you either edit this one and put it in there if you feel it is related, or ask an entirely new one. Commented Jul 25, 2018 at 9:20

2 Answers 2

3

Yes. You can develop your own custom service which uses SmartTarget API and expose it for usage by third-party application. You can get response from SmartTarget via code, and it can look something like this:

// get all the ADF claim values
ClaimStore claimStore = AmbientDataContext.getCurrentClaimStore();
String triggers = AmbientDataHelper.getTriggers(claimStore);

QueryBuilder queryBuilder = new QueryBuilder();
queryBuilder.setTimeout(10000);
queryBuilder.parseQueryString(triggers);
queryBuilder.addCriteria(new PublicationCriteria(publicationUri));
queryBuilder.addCriteria(new RegionCriteria(region));
queryBuilder.setMaxItems(maxItems);

ResultSet result = queryBuilder.execute();

SmartTarget classes can be found in Content Delivery API and all you need to do is add appropriate .jar or.dll files to your app and use them.

2

Marko Describes how to use the API to invoke a ST request. But just an addition to his answer from my side is that this does not result in the Component Presentation as you have asked, but rather only IDs. You need to do an additional API call with ComponentPresentationAssembler or ComponentPresentationFactory to retrieve the presentation. If you use SmartTarget tags in DWTs this is done behind the scene, but if you use the ST API, then you have to do this yourself, including the handling of the fallback content.

As for getting the list of Promotions, Experiments, Triggers, etc. these are all kept on the Fredhopper indexer server in the form of files business.xml and trigger-types.xml. (Actually it's on both indexer and query servers (all the query servers if multiple), but the manipulation is done throught the indexer).

Tridion's SmartTarget module uses one of its components, the so called "SmartTarget Web service" to "access/parse these files" and represent them a user friendly manner in the SmartTarget (Targetting Dashboard). It also changes the business.xml file if you create or alter any data, for example Promotions.

In the Targetting tab of a Publication Target in the Content Delivery Endpoint URL property, you can see the endpoint for the service, (documentation HERE). If you observe how the ST webservice communicates with Fredhopper you can simulate the calls yourself and be able to read whatever you need.

Lastly, Fredhopper also has its own API, so you can achieve all of this by directly working with it. You can simulate ST calls by directly sending requests to it in a predefined format, including all the values of claims etc. The format of these requests can be seen if you use the Fredhopper Business Manager's Query Builder, or look at the Fredhopper log where they're all written.

1
  • Thanks for the reply Atila, but I think I had not explained the purpose of the question well. I've updated the post with more information. Commented Jul 20, 2018 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.