WordPress.org

Ready to get started?Download WordPress

Forums

Forms: 3rd-Party Integration
Is this plugin only for CRM integration? (6 posts)

  1. wynot
    Member
    Posted 5 months ago #

    I am wondering if I might be able to use this plugin to interact with a remote server API such as described below:

    I need to interact with a remote server through their API which is a REST, HTTP based API.

    Their API will only accept secure requests (HTTP over SSL, or HTTPS). Any attempt to make an API call over the unsecured plain HTTP protocol will be redirected to the corresponding HTTPS URL. As a result, all data exchanged with the API (sent or received) is secured, including the query string (which may contain information such as customer/order id or filtering options, etc.) and the XML data.

    All the API calls use the REST web service pattern and the communication is done via XML over HTTPS. To do this, all requests must have the following instructions in the request header:

    Accept: application/xml
    Content-Type: application/xml

    Additionally, they are recommending clients to also use the “.xml” suffix with all resources (URLs). They plan to deprecate content-type identification via header and migrate over to identification via resource itself (URLs).

    They support receiving the results(post) embedded as XML inside
    the data element. The XML result fields are to be passed in an result element as indicated below:
    <hl7message>
    <data>
    <result>
    result fields here for 1st result...
    </result>
    <result>
    result fields here for 2nd result...
    </result>
    ...
    </data>
    </hl7message>

    So, my question is: Is it possible for this plugin to help me to submit form fields from CF7 to this API ?

    I appreciate and look forward to your response.
    Thank you!

    https://wordpress.org/plugins/forms-3rdparty-integration/

  2. zaus
    Member
    Plugin Author

    Posted 4 months ago #

    Sorry for the delay -- yes you can use this plugin to post to an API, and you can specify any url as the endpoint (including posting to an xml extension).

    You'll also need the 3rdparty Xml Post plugin to wrap the response in the hl7message / data xml tags.

    You might need to write a hook for either Forms3rdPartyIntegration_service_filter_post or Forms3rdPartyIntegration_service_filter_args to wrap the args individually rather than using the posted tags.

    Make sure to turn on 'debug mode' to investigate the posted result and response.

  3. wynot
    Member
    Posted 4 months ago #

    Hi Zaus! Thanks!
    I appreciate your response ... I figured out how to write a function to map the fields... before I saw your reply... so this is great news because I still needed a way to send to the API. So using your plugins will help me do that.

    So now I need to figure out how to rework my function into one of the hooks you mentioned. Hopefully it won't be too hard for me to do... I'm relatively new at this. I'm going to give it a try and if I have any questions I hope i can ask them here?

    Thanks so much!

  4. zaus
    Member
    Plugin Author

    Posted 4 months ago #

    Sure, happy to help. As you can tell I'm not able to devote much time to the support thread, but when I have a chance I'll do my best!

  5. zaus
    Member
    Plugin Author

    Posted 2 months ago #

    Any luck?

  6. wynot
    Member
    Posted 2 months ago #

    Hi Zaus - Yes I was able to make this work ... although I did have to hook into the code to allow for "repeating" tags as the number of repeating fields from my cf7 form is not known beforehand. The user can add as many as they need so that made it a little bit interesting for me to figure out lol!

    Thanks for you replies and concern! :)

Reply

You must log in to post.

About this Plugin

About this Topic