0

I am trying to add AMPscript to the inbox message (MobilePush).

The AMPscript added to the Inbox subject line ( default SFMC field inside inbox) or other custom fields like body,cta etc. does not work at all.

This is the below ampscript code I am using and there are no errors -

 %%[ SET @business_unit = AttributeValue("business_unit") IF (@business_unit == "US") THEN Set @ans= "its US TEST" ELSEIF @business_unit == "IT" THEN Set @ans= "its IT TEST" ENDIF ]%% %%=v(@ans)=%% 

Please can someone guide me how to troubleshoot this problem so that the AMPscript works in inbox message?

Note: I have tested this code in email studio against the send Data extension used for sending inbox messages and the code works perfectly.

I also tried using a lookup using the BU

 %%[ set @bu = AttributeValue("business_unit"); set @msg = Lookup("messagesDEX","message","BU", @bu); ]%% %%=v(@msg)=%% 

Even this did not work.

I also tried using a very simple code, by directly storing the message field in Send DE, still no success.

 %%[ set @msg = AttributeValue("message") ]%% %%=v(@msg)=%% 
4
  • Appears to be a Known Issue: trailblazer.salesforce.com/issues_view?id=a1p4V000000pP3OQAU Commented Jul 25, 2022 at 13:39
  • You may have to retrieve it from your sending DE using the DeviceID/ContactKey as your lookup value. Commented Jul 25, 2022 at 13:39
  • Thank you for the info. I updated my question with the lookup I tried but please could you tell me how should I do a look-up? Thank you Commented Jul 25, 2022 at 14:32
  • I'm suggesting you lookup business_unit using _subscriberKey, where _subscriberKey matches the column in your sending DE that uniquely identifies the subscriber. Commented Jul 25, 2022 at 15:37

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.