9.6 Test your decision using the API

Test your Decision using the API

9.6.1 Work with the Offer Decisioning API using Postman

Download this Postman Collection for Offer Decisioning to your desktop and unzip it. You'll then have this:

You now have this file on your desktop:

  • [_Module 14- Decisioning Service.postman_collection.json]

In Exercise 3.3.3 - Postman authentication to Adobe I/O you installed Postman. You'll need to use Postman again for this exercise.

Open Postman. Click [Import].

Click on [Upload files].

Select the file [_Module 14- Decisioning Service.postman_collection.json] and click [Open].

You'll then have this collection available in Postman.

You now have everything you need in Postman to start interacting with Adobe Experience Platform through the APIs.

9.6.1.1 List Containers

Click to open the request [GET - List Containers].

Under [Params], you'll see this:

  • property: _instance.parentName==aepenablementfy22

In that parameter, [aepenablementfy22] is the name of the sandbox that is used in Adobe Experience Platform. The sandbox you should use is --aepSandboxId--. Replace the text [aepenablementfy22] by --aepSandboxId--.

After replacing the sandbox name, click [Send].

This is the response, which shows the offer container for the sandbox that you specified. Please copy the [container instanceId] as indicated below and write it down in a text file on your computer. You'll need to use this [container instanceId] for the next exercise!

9.6.1.2 List Placements

Click to open the request [GET - List Placements]. Click [Send].

You're now seeing all available placements in your offer container. The placements you're seeing were defined in the Adobe Experience Platform UI, as you could see in Exercise 9.1.3.

9.6.1.3 List Decision Rules

Click to open the request [GET - List Decision Rules]. Click [Send].

In the response, you'll see the Decision Rules that you defined in the Adobe Experience Platform UI, as you could see in Exercise 9.1.4.

9.6.1.4 List Personalized Offers

Click to open the request [GET - List Personalized Offers]. Click [Send].

In the response, you'll see the Personalized Offers that you defined in the Adobe Experience Platform UI in Exercise 9.2.1.

9.6.1.5 List Fallback Offers

Click to open the request [GET - List Fallback Offers]. Click [Send].

In the response, you'll see the Fallback Offer that you defined in the Adobe Experience Platform UI in Exercise 9.2.2.

9.6.1.6 List Collections

Click to open the request [GET - List Collections].

In the response, you'll see the Collection that you defined in the Adobe Experience Platform UI in Exercise 9.2.3.

9.6.1.7 Get Detailed Offers for Customer Profile

Click to open the request [POST - Get Detailed Offers for Customer Profile]. This request is similar to the previous one, but will actually return details like image URLs, text etc.

For this request, similar to the previous exercise which has similar requirements, you need to provide the values for [xdm:placementId] and [xdm:activityId] to retrieve the specific offer details for a customer.

The field [xdm:activityId] needs to be filled out. You can retrieve that in the Adobe Experience Platform UI, as indicated below.

The field [xdm:placementId] needs to be filled out. You can retrieve that in the Adobe Experience Platform UI, as indicated below. In the below example, you can see the placementId for the placement [Web - Image].

Go to [Body] and enter the email address of the customer for whom you'd like to request an offer. Click [Send].

Finally, you'll then see the result of what kind of personalized offer and what assets need to be displayed to this customer.

You've now completed this exercise.

Last updated