• Resolved Nicole Heymer

    (@curioelectro)


    How can I send the user’s quiz result to ActiveCampaign as a tag? I am only seeing the option to add tags for the fields in the form.

    I want to tag them in ActiveCampaign with their result.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @curioelectro

    I hope you are doing well.

    Unfortunately it is not possible out of the box, I pinged our developers to verify if we have any hook that can be used for this, we will keep you posted.

    Best Regards
    Patrick Freitas

    Thread Starter Nicole Heymer

    (@curioelectro)

    Thank you, Patrick—please keep me posted as we would love to use Forminator’s quiz functionality but this is an important missing piece.

    Thread Starter Nicole Heymer

    (@curioelectro)

    Patrick: Alternatively, do you know if this is possible to accomplish via Zapier? Specifically, the free version? I believe Webhooks are only available on the paid Zapier plan.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @curioelectro

    Thank you for response!

    As far as I’m aware, yes – Zapier offers webhooks support in paid version only now. However, Forminator does not have any additional/other integration with Zapier, it’s only through webhooks, I’m afraid.

    On the other hand, due to that it’s not limited to Zapier only and can also use other services such as e.g. Integrately, Workato, Make and similar. I’m not familiar with all of them but maybe it’s worth checking if any of them (or similar) provides free webhook features?

    Getting back to the initial question – our developers asked if you are using Personality Quiz or Knowledge Quiz, which type is it about?

    Best regards,
    Adam

    Thread Starter Nicole Heymer

    (@curioelectro)

    This is for a Personality quiz—we would like to tag users in ActiveCampaign with their result/personality.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @curioelectro

    Thank you for confirmation!

    Our developers are looking into it. As mentioned previously, it’s not currently possible out of the box and I’m not able to promise a workaround but they are checking it now and if it’s doable with some additional piece of code – we will update you here.

    Kind regards
    Adam

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @curioelectro,

    Could you please check and see whether the following snippet helps?

    <?php

    add_filter( 'forminator_addon_activecampaign_contact_sync_args', 'wpmudev_tags_assign_activec_quiz', 10, 6 );
    function wpmudev_tags_assign_activec_quiz( $args, $quiz_id, $connection_id, $submitted_data, $connection_settings, $quiz_settings_instance ) {
    if ( 45660 !== intval( $quiz_id ) ) { // Please change the quiz ID.
    return $args;
    }

    $model = Forminator_Base_Form_Model::get_model( $quiz_id );
    $results = array();
    if ( isset( Forminator_Quiz_Front_Action::$prepared_data['answers'] ) ) {
    foreach ( Forminator_Quiz_Front_Action::$prepared_data['answers'] as $id => $answer ) {
    $results[] = $model->getResultFromAnswer( $id, $answer );
    }
    }

    $answer_results = array_count_values( $results );
    $final_res = $model->get_nowrong_result( $answer_results );
    if ( ! empty( $final_res['title'] ) ) {
    $args['tags'] = $final_res['title'];
    }

    return $args;
    }

    In the above snippet, you’ll need to update 45660 with your Quiz ID and make sure to leave the tags field empty in Active campaign integration, so that the code will add the tags. Please check and let us know whether it works.

    You can implement the above code using mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Kind Regards,

    Nithin

    Thread Starter Nicole Heymer

    (@curioelectro)

    Thanks, Nithin! If we proceed using Forminator, we will try this.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @curioelectro,

    Sure, please give it a try. I hope this helps.

    As we’ve provided a workaround for your requirement and you don’t need any additional assistance, I will mark this topic as resolved. However, please feel free to reach out if you need any further clarification, we are happy to help.

    Kind Regards,
    Nebu John

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Quiz Result’ is closed to new replies.