Create the Journey
Name and define entrance criteria
-
If necessary, expand the Journey management menu item in the left rail and click on Journeys. You land on the ‘Journeys’ page.
-
Click on the blue Create Journey button.
-
When the ‘Create a Journey’ overlay appears, select Create from scratch and click Confirm
-
In the right rail, name the Journey iPhone 17 Abandon Browse and click the blue Save button so that you can start adding actions to the Journey canvas.
-
Drag the Audience Qualification event onto the canvas.
-
In the right rail, click the Pencil icon to select the audience for this event.
-
Select the dep: Interested in iPhone 17 audience.
-
Ensure that the Namespace drop-down is set to customerID. At this point, your Journey looks like this:
-
Once everyone looks correct, click the blue Save button to save your progress.
Configure the CBE and decision policy
-
Expand the Actions accordion just left of the canvas, drag the Action element onto the canvas, and connect it to the first node.
-
When the ‘Select action type’ overlay appears, select the Code-base experience action and click the blue Add button.
-
In the now visible ‘Action:Code-based experience’ properties, click the Configure Action button.
-
Change the Code-base configuration dropdown to the jsonOffer_cbe cbe that you created in the last section.
-
Click the Edit content button just above the ‘Code-based configuration’ drop-down.
-
On the resulting Code-base experience editor screen, click the Edit code button. The resulting screen is where you add the JSON that’s returned to the Experience Event requests
-
On the far left side of the code editor, click the Decision policy menu item, followed by a click on the Add decision policy button in the new menu.
note NOTE If a selection strategy is where you tie an offer collection to a ranking method (and apply strategy-level eligibility), then a decision policy is where you tie a selection strategy to a specific delivery of a channel. -
Name this decision policy iPhone 17 DP and leave the Number of items set to 1.
note NOTE Up to this point, you’ve configured the offers and how to order them, but you haven’t configured how many to return. This is where you configure how many offers should be returned. -
Click the blue Next button. This is where you add the selection strategy. Click the +Add button (you may need to scroll down to see it), and choose Selection strategy.
-
Tick the box next to the only selection strategy you should have (iPhone 17 Selection Strategy) and click Save. When finished, this is what you see:
- Click the blue Next button to review the decision policy.
- Once everything looks correct, click the blue Create button. Once it’s created, you’re returned to the expression editor page.
- You should see a screen similar to the one below; if not, click on Decision policy again, and you see your decision policy appear.
- Click the + Insert policy button, and you see a ForEach loop appear in the code editor:
- Add valid JSON within the bounds of the loop to return the make, model, and tier of the phone that should be offered to the end user. Since frequency capping is in place as well, a trackingToken needs to be added to the response. More on this later in the instructions. To save time, simply copy and paste these lines of code into the code editor within the For Each loop:
{
"make":"",
"model":"",
"tier":"",
"trackingToken":""
},
- Place the cursor between the “” of the ‘make’ node. Insert the make of the offer by navigating in the decision policy menu to the _dep > Device > Make node. Click the + icon on the Make element, and you see it populate the editor.
- Add the model and tier attributes in a similar manner.
- Click on Decision policy in the attribute navigation to return to the root level.
- Populate the trackingToken attribute by navigating to the Tracking Token value via _experience > decisioning > decisionitem > Tracking Token path.
- Finally, encase the entire piece of code in a set of square bracket ([]). Your final JSON code should look like this:
- Once everything looks the screenshot above, click the Save and close in the upper right to save your code. You’re then returned to the Code-based Experience page.
- Click the back arrow < icon next to the Journey name, and you’re returned to the canvas.
- Click the blue Save button to save the CBE action node. Your Journey now looks like this:
- With the Journey completed, click the blue Publish button in the upper right and Publish again when the confirmation box appears. After a moment or two, you see that your Journey is now live!
Recap
On this page, you configured a Code-Based Experience (CBE) channel that enables external systems to request offer decisions via an API-style inbound channel. This setup included specifying the surface/location parameters that client systems will send, and choosing the JSON output format.