+ Start a Discussion
Tomasz JurekTomasz Jurek 

Trailhead - Trigger SMS Using the Twilio Connector

Hi. Questions:
  1. What is best way to report Trailhead issues?
  2. Within Trailhead  (https://trailhead.salesforce.com/content/learn/projects/automate-ordertocash-process-using-mulesoft-flow-designer/trigger-sms-using-the-twilio-connector)
This piece of code
Body: "Order for " ++ vars.OppDetails.Name ++ " has been placed.
" ++ "OrderID: " ++ payload.OrderID as String ++ ", Tracking: "
++ payload.TrackingNo ++ ", ETA:" ++ payload.ETA as Date

Is wrong and doesn't compile in Transform Card in Data Wave

Tomasz JurekTomasz Jurek
Ok I know what I did wrong so in this 2nd part of trailhead (https://trailhead.salesforce.com/content/learn/projects/automate-ordertocash-process-using-mulesoft-flow-designer/setup-pushtopics-for-realtime-updates) my SOQL query didn't contain Name from Opportunity so above code didn't compile.
However I did refresh Salesforce Connector card with Closed Opps and change data type in transform card. However Name doesn't come up as attribute in vars.\
User-added image
Tomasz JurekTomasz Jurek
Appreciate if someone can help?
Tomasz JurekTomasz Jurek
Now the name is available but code with replacement from point 7 doesn't compile.... yes I know this is trivial JSON error...but  too heavy on my brain today.
Tomasz JurekTomasz Jurek
%dw 2.0
output application/json  
  To: 48605880002,
  From: 18628002072,
  Body: "Order for "++ vars.OppDetails.Name ++"has been placed",
  Details: "OrderID: " ++ payload.OrderID as String,
  Tracking: "Tracking: " ++ payload.TrackingNo as String, 
  ETA: payload.ETA as Date

It's been painfull to me but I got it working.