Some help regarding an API for sending CC data, the data export tool, etc

Hello folks –

I am going to have some developers give a try to using the CommCare APIs
(or the data export tool) to submit data from our CommCare app into a
partner’s database.

I wanted to make sure I was oriented as to the best approaches before I had
them start reading the documentation.

Here is a basic description of what we would like:

  • Each time a mobile user completes our CommCare mobile form called A1,
    then, in addition to submitting into our own CommCare database, the
    CommCare API would also send a certain number of that form’s fields, in a
    certain structure, into a remote database application that is run by a
    partner organization of ours. (That organization told me that they also
    have APIs.)

… I looked at the CommCare “Export API,” but the documentation said that
function was deprecated and that one should instead use the “Data Export
Tool.”

… But, looking at the Data Export Tool, I didn’t know if that tool could
be configured to run each time a form is submitted. If it is truly not able
to be triggered by every form submission, then can you tell me how
frequently it could run to achieve close to the same result?

Can you tell me what the best options are for my goal above? That will let
me know what documentation I should then look at and give to the team.
(If you can recommend any specific documentation URLs that would be handy
too!)

Thanks for your kind help as usual…

Eric

Hi Eric

The Data Export Tool is for exporting data to Excel or to a SQL database.
The best option to accomplish what you are describing is to use form
forwarding (
https://help.commcarehq.org/pages/viewpage.action?pageId=12224128).

This will allow you to send submitted forms from CommCare to another server
(via HTTP Post). The data that gets sent is either the entire form or case
in JSON or XML. CommCare does not allow you to change the structure of the
data being forwarded. Usually the onus is on the receiver to process the
data as needed.

In your case it sounds like you don’t have any control of the receiving end
so you probably need a “middle man” to receive the data from CommCare,
transform it into what the receiver wants and then send it on to the
receiver. There are 2 tools that come to mind with regard to this:

You can use either of those as the “middle man” with CommCare. We don’t
have any documentation on using OpenFn (though it’s quite straight foward)
but we do have some docs on using Zapier:
https://help.commcarehq.org/display/commcarepublic/Zapier+Integration

I hope that gives you enough information to get going.

··· On 1 November 2016 at 08:02, Eric Stephan wrote:

Hello folks –

I am going to have some developers give a try to using the CommCare APIs
(or the data export tool) to submit data from our CommCare app into a
partner’s database.

I wanted to make sure I was oriented as to the best approaches before I
had them start reading the documentation.

Here is a basic description of what we would like:

  • Each time a mobile user completes our CommCare mobile form called
    A1, then, in addition to submitting into our own CommCare database, the
    CommCare API would also send a certain number of that form’s fields, in a
    certain structure, into a remote database application that is run by a
    partner organization of ours. (That organization told me that they also
    have APIs.)

… I looked at the CommCare “Export API,” but the documentation said that
function was deprecated and that one should instead use the “Data Export
Tool.”

… But, looking at the Data Export Tool, I didn’t know if that tool could
be configured to run each time a form is submitted. If it is truly not able
to be triggered by every form submission, then can you tell me how
frequently it could run to achieve close to the same result?

Can you tell me what the best options are for my goal above? That will
let me know what documentation I should then look at and give to the
team. (If you can recommend any specific documentation URLs that would be
handy too!)

Thanks for your kind help as usual…

Eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simon Kelly
Senior Engineer | Dimagi South Africa