Save the Audience
objective in the next set of steps you will be saving the audience your created back to the audience portal so other solutions across adobe experience platform and its applications can leverage it for their own use cases change the dimension on the workflow canvas, click the + icon on save audience branch and f rom the list of activities, select the change dimension activity update the properties of the change dimension as outlined below label convert line to account new target dimension customer account why are you doing this you ask? remember that to join to the real time customer profile (which is where you save audiences to) you have to use the profile target mapping you configured which only joins from the customer account schema when done, you should now see this in your canvas save your work! deduplicate the result click the + icon after the change dimension activity and from the list of activities select the deduplication activity update the properties of the deduplication activity in the right rail as outlined below label dedup customer id primary set convert line to account now click the + add attribute button and select the field from the schema titled customer id under the deduplication settings, ensure you have the following set duplicates to keep 1 deduplication method random selection note the other options for deduplication allow you to specificy your own custom logic most of the time if you need to deduplicate you'll be doing it using the primary key of the table when you are done your canvas should now look like this click the save button in the upper right before moving on add save audience activity click the + icon after the deduplication activity and select the save audience activity in the right rail set the properties of the activity to the following audience label apple upgrade eligible customer accounts profile mapping field dep rel customer account customer id note the "profile mapping field" is something that was setup for you in this lab ahead of time as part of the ajo configuration for orchestrated campaigns as shown below every record from the orchestrated campaigns always attempts to join to a real time customer profile at time of audience save or message sending this configuration is applied at a schema level so reading the above configuration it states the following utilize the table dep rel customer account use the field customer id join to the real time customer profile using the identity namespace customerid and the value from the table/field to find the profile audience field mappings by default the primary key of the targeting dimension (i e , customer id) is added to the audience as a field you can see this if you look in the right and expand the field two things to note source audience field > refers to the field coming from the relational schema target audience field > the name of the field that will be created as part of the audience save note how terribly the target audience field is named dep rel customer account customer id you should always change this to something more legible to a marketer, no excuses fix default audience field rename the default target audience field to customer id like shown below now you have a human legible field name 🎉 click the start button to run your workflow your workflow should now look like this and you should see the counts as follows build audience > 65 convert line to account > 65 dedup customer id > 46 note the s ave audience activity will only create the audience when the workflow is published , not when it is simply started when the audience is created, it will include all the attributes you added to it and will join to the real time customer profile during the next scheduled daily run of the segmentation service job do not publish your workflow! challenge what happens if you do not deduplicate before saving the audience? will the audience store all 65 records or only the 46? answer the audience will store all 65 records, but a read audience activity will dedup them on import based on the join condition 😁 recap you should now have a good understanding of how the save audience works and why deduplication matters remember that you always need to have the profile target mapping defined because the relational store data has to know how to join to the real time customer profile the profile target mapping is the join condition 🙂