II want to pass values from Amelia to Active Campaign, however the custom fields are all grouped up in a single string: {“1”:{“label”:“Codice Fiscale”,“type”:“text”,“value”:“STRLND93C47Z154G”},“3”:{“label”:“Sesso”,“type”:“select”,“value”:“Donna”},“6”:{“label”:“Indirizzo”,“type”:“address”,“value”:“Via Andrea Del Sarto 32”},“15”:{“label”:“Acconsento all’informativa sulla Privacy”,“type”:“checkbox”,“value”:[“S\u00ec”]},“17”:{“label”:“Voglio ricevere offerte e promozioni”,“type”:“select”,“value”:“Via Email, SMS e Whatsapp”}}
What is the problem & what have you tried?
I wanted to build a formula like this, but it seems it doesn’t allow it get(
parseJSON( 1.appointment.bookings[0].customer.customFields )
; “1.value”
)
I basically need to extract all the fields from the string to make them single variables
that’s already a collection of items and you should be able to access them. No need for a get() function here, since this is not an array. If this is what the output looks like, just feed it to a parse JSON module and you will get the variables.
You cannot individually run a single module if you don’t have example input data values for each required field, which you must input into the dialog box when you manually run a single module. This is because when you only run a specific module, the mapped variables in the module’s fields are null (do not contain any value), as the previous modules do not run and produce any variable values. Does this make sense?
Instead, try running the full scenario by clicking the “Run Once” button:
Next,
Looks like you have JSON nested within a JSON response. This means you have to pass the “customFields” variable into a Parse JSON module.
If you need further assistance with this, please provide the input/output bundles of the trigger modules by running the scenario, or get the bundles from a previous run from the Scenario “History” tab.
Providing the bundles from a scenario run will allow others to replicate what is going on, especially if there are complex data structures (nested arrays and collections) and external services. This helps mapping the correct raw variable names from collections (instead of the label/display name).
Need help❓View instructions ◀
Click on the white speech bubbles on the top-right of each module and select “Download output (or input) bundles”.
A. Upload a Text File
Save each bundle contents in a plain text editor as a moduleNumber-output.txt file. Open the file to check if it has not added additional formatting or encoded the plain text.
You can upload files and images to this forum by clicking on the upload button: