0

We are running a series of SMS messages from a journey starting with an outbound message then a series of response messages using the next keyword. I have a Data Extension that triggers the journey that includes the contacts Salesforce ID and their Mobile Contact Key. For testing purposes, my data extension only has one entry so there are no duplicates.

I want to create a lookup to the data extension to create a Salesforce Case record based on a certain response to the previous text message. The case is created, but the ContactID is not populated. I've stripped out a lot of the steps to see if I can get any type of lookup to the DE to work and have had no luck.

    %%[ VAR @msg,@response,@inbound, @ContactID, @lookupValue
SET @inbound = [MSG(0).NOUN(0)]

IF Uppercase(@inbound) == "YES" OR Uppercase(@inbound) == "Y" THEN
SET@lookupValue = AttributeValue(MOBILE_NUMBER) 
SET@ContactID = Lookup( 'Mobile Test DE', 'Contact ID', 'Mobile Contact Key', @lookupValue)    

CreateSalesforceObject('Case', 4, 'Type', 'General Inquiry', 'Origin', 'SMS', 'ContactId', @ContactID, 'ContactPhone', MOBILE_NUMBER)

SET @msg = "Someone will call you soon."

ELSEIF Uppercase(@inbound) == "NO" OR Uppercase(@inbound) == "N" THEN 
SET @msg = "Thank you." 

ENDIF
]%%
%%=v(@msg)=%%

Can someone help me troubleshoot?

1 Answer 1

0

upon creation of journey, an associated data extension would be created. Please navigate to the respective data extension and look for the attribute which you want to use in AMP script. for example it would be CampaignMember:Id Attributes

So you could use

    %%[
    var @campgnId
    Set @campgnId=CampaignMember:Id
-----
rest of your AMP script code

    ]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .