Best practice to build text string

Hi,

My basic scenario is the following: I’m receiving via webhook an order from my website (json format). But most of the information is encoded and I want to write the full order in clear language.
For example location #1 is Coyoacán, location #2 is Santa Fe, etc
I have like 15 things to “translate” to format a string, sometimes with several parameters:
For example something like IF (location=1 AND type= DELIVERY) then Time=15 mns
and I need to format with new lines.
I’m wondering what will be the easiest way to do it:

  • compose several strings with several routers and concatenate them at the end
    -Using variables and functions
    -Using text aggregators and functions (not easy to read)
    -Make the data transformation in javascript
    -Something I didn’t think of.

Thanks for your help

Hmmm, im not a programmer, so here is what i would probably do:

  • Create an Excel with the relevant encoding/decoding data
  • on another excel tab set all the Names you will receive in the Json in a row: Product, Price, Location…
  • Setup a vlookup etc formula to search the value of “1” in the location list and return Santa Fe
  • using Make to “Update a worksheet row” to input all the info from the Jason file
  • then use Make to get back all the results the Excel will return
  • then you can easily compose a string

Let me know if this helps :no_mouth:

2 Likes

Thanks, but after the order is send to a chat, I wanted to keep everything in Make so it should be all automatized.

@Marck thats fine, the excel is just a “help” file to decode in an easy way, then you continue in Make.

You can also consider adding a Data Store in Make, but the query is a bit more complicated than on Excel.

Maybe share what you finally did with the community :sunglasses:

2 Likes