Can the [asa2] shortcode retrieve the ASIN from a custom field?

Yes, this is possible.

If you use Advanced Custom Fields (ACF) for managing your custom fields, first create a new field, let’s say “my_asin”.

ACF field form

Then in your post editor, enter the ASIN in the custom field below the text and use the shortcode to retrieve it and put it inside your [asa2] shortcode:

[asa2 tpl="Flat_box_horizontal" country_code="DE"][acf field="my_asin"][/asa2]

 shortcode for ACF field

This simple example makes little sense because you could also enter the ASIN directly. It’s only intended to illustrate the basic ways in which you can use custom fields to dynamically build your ASA2 shortcodes.