Create test profiles
Test profiles are required when using the test mode in a journey. To learn how to use the test mode, refer to this section.
There are different ways to create a test profile in Adobe Experience Platform. In this documentation, we focus on two methods: uploading a csv file and using API calls. You can also upload a json file in a dataset, refer to the Data Ingestion documentation.
These import methods also allow you to update profile attributes. This way, you can turn an existing profile into a test profile. Simply use a similar file or API call and only include the “testProfile” field with the value “true”.
Creating a test profile is similar to creating regular profiles in Adobe Experience Platform. For more information, refer to the Real-time Customer Profile documentation.
Prerequisites
In order to be able to create profiles, you first need to create a schema and a dataset in Adobe Experience Platform.
First, you need to create a schema. Follow these steps:
- In Adobe Experience Platform, click Schemas, in the left menu.
- Click Create schema, in the top right, then select a schema type, for example XDM Individual Profile.
- Choose a name for your schema.
- In the Mixins section, click Add.
- Select the appropriate mixins. Make sure you add the Profile test details mixin. Click Add mixin.
The list of mixins is displayed on the schema overview screen.
- In the list of fields, click on the field that you want to define as the primary identity.
- In the Field properties right panel, check the Identity and Primary Identity options and select a namespace. If you want the primary identity to be an email address, choose the Email namespace. Click Apply.
- Select the schema and enable the Profile option in the Schema properties.
- Click Save.
Then you need to create the dataset in which the profiles will be imported. Follow these steps:
- In Adobe Experience Platform, click Datasets, in the left menu, then click Create dataset.
- Choose Create dataset from schema.
- Select the previously created schema then click Next.
- Choose a name then click Finish.
- Enable the Profile option.
Creating a test profile using a csv file
In Adobe Experience Platform, you can create profiles by uploading a csv file containing the different profile fields into your dataset. This is the easiest method.
- Create a simple csv file using a spreadsheet software.
- Add one column for each needed field. Make sure you add the primary identity field (“personID” in our example above) and the “testProfile” field set to “true”.
- Add one line per profile and fill in the values for each field.
- Save the spreadsheet as a csv file. Make sure commas are used as separators.
- In Adobe Experience Platform, click Workflows, in the left menu.
- Choose Map CSV to XDM schema, then click Launch.
- Select the dataset you want to import the profiles into. Click Next.
- Click Choose files and select your csv file. When the file is uploaded, click Next.
- Map the source csv fields to the schema fields, then click Finish.
- The data import begins. The status will move from Processing to Success. Click Preview data set, in the top right.
- Check that the test profiles have been correctly added.
Your test profiles are added and can now be used when testing a journey. Refer to this section.
Creating test profiles using API calls
You can also create test profiles via API calls. See this page.
You must use a Profile schema that contains the “Profile test details” mixin. The testProfile flag is part of this mixin.
When creating a profile, make sure you pass the value: testProfile = true.
Note that you can also update an existing profile to change its testProfile flag to “true”.
Here is an example of an API call to create a test profile:
curl -X POST \
'https://dcs.adobedc.net/collection/xxxxxxxxxxxxxx' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: xxxxx' \
-H 'cache-control: no-cache' \
-H 'x-api-key: xxxxx' \
-H 'x-gw-ims-org-id: xxxxx' \
-d '{
"header": {
"msgType": "xdmEntityCreate",
"msgId": "xxxxx",
"msgVersion": "xxxxx",
"xactionid":"xxxxx",
"datasetId": "xxxxx",
"imsOrgId": "xxxxx",
"source": {
"name": "Postman"
},
"schemaRef": {
"id": "https://example.adobe.com/mobile/schemas/xxxxx",
"contentType": "application/vnd.adobe.xed-full+json;version=1"
}
},
"body": {
"xdmMeta": {
"schemaRef": {
"contentType": "application/vnd.adobe.xed-full+json;version=1"
}
},
"xdmEntity": {
"_id": "xxxxx",
"_mobile":{
"ECID": "xxxxx"
},
"testProfile":true
}
}
}'