Support » Plugin: WP Webhooks » Issue with ACF field

  • Resolved Robin

    (@cinghaman)


    Hi,

    I have a pro license

    Issue: ACF field text works fine but values to ACF field number doesn’t get added and for URL it converts https:// > https:\/ and also on all the data which does get imported it’s enclosed in brackets [data] like this screenshot of what I mean
    https://prnt.sc/199jnt6

    My Json I added to Integromat (do i need to define somewhere in json if the value is string or number or URL) surprisingly checkbox and dropdown and date values imported fine.

    {
        "add_row": [
            {
            "selector": "conference_name",
            "value": ""
            },
            {
            "selector": "conf_city",
            "value": ""
            },
            {
            "selector": "conf_website",
            "value": ""
            },
            {
            "selector": "conf_region",
            "value": ""
            },
            {
            "selector": "conf_price",
            "value": ""
            },
            {
            "selector": "conf_days",
            "value": ""
            },
            {
            "selector": "conf_start_date",
            "value": ""
            },
            {
            "selector": "conf_experience",
            "value": ""
            },
            {
            "selector": "conf_category",
            "value": ""
            },
            {
            "selector": "conf_type",
            "value": ""
            }
        ]
    }

    Integromat shows correct data https://prnt.sc/199lktv, it’s just when it reaches the site the data gets messed up

    Cheers

    • This topic was modified 2 months, 3 weeks ago by Robin. Reason: Added more info and screenshot
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ironikus

    (@ironikus)

    Hi @cinghaman – Thank you very much for your message.
    From what I can see, you use the add_row function of the manage_acf_data argument.
    This one is used to add a new row to a repeater field or flexible content field of ACF.
    If that’s what you want to do, you need to define the value as an array construct as it’s required by ACF as seen here: https://www.advancedcustomfields.com/resources/add_row/

    In this case, it would look like this:

    {
       "add_row":[
          {
             "selector":"demo_repeater",
             "value":{
               "file": "Some Demo Text"
             }
          }
       ]
    }

    The selector would be the repeater field name and the value contains an array construct including all of the fields for that specific row. If you just want to update/create new values, please use the update_field function instead (Simply change the add_row to update_field).
    More info on that is available here: https://www.advancedcustomfields.com/resources/update_field/

    Your specific example above would look like this:

    {
        "update_field": [
            {
            "selector": "conference_name",
            "value": ""
            },
            {
            "selector": "conf_city",
            "value": ""
            },
            {
            "selector": "conf_website",
            "value": ""
            },
            {
            "selector": "conf_region",
            "value": ""
            },
            {
            "selector": "conf_price",
            "value": ""
            },
            {
            "selector": "conf_days",
            "value": ""
            },
            {
            "selector": "conf_start_date",
            "value": ""
            },
            {
            "selector": "conf_experience",
            "value": ""
            },
            {
            "selector": "conf_category",
            "value": ""
            },
            {
            "selector": "conf_type",
            "value": ""
            }
        ]
    }
    Thread Starter Robin

    (@cinghaman)

    Hi mate thanks for the example, worked perfectly

    I really would recommend updating your official documentation as well as the only example I could find was the one I created so if for not this forum I would be running in circles.

    Appreciate the help.

    Cheers

    Plugin Author Ironikus

    (@ironikus)

    Hey @cinghaman, Thanks for your answer.
    We do have documentation available for all of our endpoints and arguments. The only difference as of now is that the documentation is available within the plugin itself. Once you head over to your webhook action, you will find a dropdown that contains a list with all available arguments – next to the argument definition, you will find a Details link that shows you everything necessary for that specific argument.
    Do let me know in case you have any further questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.