Need help to write accurate multi checkout ids

hi guys, I need help to write accurate multi checkout ids parameters in varibles for gtm.

form this code:

{
ecommerce: {
currencyCode: “SAR”,
event_id: “bf2dd522820d205db828d319a7927051e3079240”,
checkout: {
actionField: {
id: “OpwwKyw”,
total: 212.99,
revenue: 212.99,
currency_code: “SAR”,
step: 1
},
products: [
{
id: 748719942,
name: “كريم مرطب للجلد من بيبانثين - 30غ”,
categories: [
{id: 5031641, name: “العناية”},
{id: 5031677, name: “العناية بالوجه”},
{id: 5031752, name: “ترطيب الوجه”},
{id: 5033431, name: “عروضنا”},
{id: 5039847, name: “العناية بالبشرة”},
{id: 5039863, name: “كريم للبشرة”},
{id: 5053075, name: “منتجات ترند”},
{id: 5679724, name: “افضل منتجات الصيف”}
],
category: “العناية/العناية بالوجه/ترطيب الوجه/عروضنا/العناي” +
“ة بالبشرة/كريم للبشرة/منتجات ترند/افضل منتجات ال” +
“صيف”,
price: 23.58,
quantity: 1,
variant: null,
brand: “Bepanthen”,
currency: “SAR”
},
{
id: 1793131289,
name: “مقشر الوجه للتفتيح من اكيور - 118مل”,
categories: [
{id: 5031641, name: “العناية”},
{id: 5031677, name: “العناية بالوجه”},
{id: 5031766, name: “تقشير الوجه”},
{id: 5033431, name: “عروضنا”},
{id: 5039847, name: “العناية بالبشرة”},
{id: 5049630, name: “مقشر للبشرة”},
{id: 5053075, name: “منتجات ترند”},
{id: 5679724, name: “افضل منتجات الصيف”}
],
category: “العناية/العناية بالوجه/تقشير الوجه/عروضنا/العناي” +
“ة بالبشرة/مقشر للبشرة/منتجات ترند/افضل منتجات ال” +
“صيف”,
price: 46.58,
quantity: 1,
variant: null,
brand: “ACURE”,
currency: “SAR”
},
{

can you please elaborate? what exactly are you looking to do?

include content_ids values in checkout event

is this on the web or server container? If it’s the former Tag Manager Template Gallery will do the trick

1 Like

Thanks a lot Dan, you are save me. Are any article for explain implementation?

should be self explanatory, select what you want the variable to retuern, feed it your ecommerce.products data layer variable, give it the keys (from your array) and will generate content_ids for you

Could give my an example,please?

1 Like

I can’t thank you enough Dan :hugs:

Any plans to make this a server variable template as well?

there are, but I have no info on the timeline.