Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Multiexcerpt include macro
macro_uuid77a79df7-a5d1-4f8f-828d-6c8d8a40e9b2
nameSoftware Plan - Pro
templateDataeJyLjgUAARUAuQ==
pageCommCare Help Site Design Guidance
addpanelfalse

...

When a payload is created a repeat record is registered. A repeat record represents a place in the repeat record queue, and points to the payload. On registration, its status is set to "pending" , and HQ tries to send the payload immediately. If sending succeeds, its status is changed to "succeeded" and the process is complete.

If sending fails, its status is changed to "failed" , and it will be retried in about an hour. It is retried up to five times. There are multiple retries, and each time the interval is multiplied by 3--so 3 hours, 9 hours, etc. This increases the chance between tries is increased. This improves the chances of a successful send, because it creates a maximum delay of a few days which allows a remote destination to be unavailable for a whole weekend but still receive the payload on Monday.If after five attempts sending still gives the endpoint more time to recover.

After a number of attempts (depending on the error) if the send has not succeeded, the repeat record's state is changed to "cancelled.".

What to have your server expect

...

Code Block
languagexml
<case case_id="b0916685-7247-4c44-b712-633d3d64e0c0"
    date_modified="2015-04-17T16:04:54.950000Z"
    user_id="d0e472a6b36dfd3ee5059222e12b8c1b"
    xmlns="http://commcarehq.org/case/transaction/v2">
  <create>
    <case_type>mscase</case_type>
    <case_name>Trees</case_name>
    <owner_id>d0e472a6b36dfd3ee5059222e12b8c1b</owner_id>
  </create>
</case>

RAW BODY (JSON)
Code Block
languagejs
{ "case_id" : "b0916685-7247-4c44-b712-633d3d64e0c0",    
    "closed" : false,
    "date_closed" : null,
    "date_modified" : "2015-04-17T16:04:54.950000Z",
    "domain" : "demo",
    "indices" : {  },
    "properties" : {
        "case_name" : "Trees",
        "case_type" : "mscase",
        "date_opened" : "2012-03-13T18:21:52Z",
        "owner_id" : "d0e472a6b36dfd3ee5059222e12b8c1b",
      },
    "server_date_modified" : "2012-04-05T23:56:41Z",
    "server_date_opened" : "2012-04-05T23:56:41Z",
    "user_id" : "d0e472a6b36dfd3ee5059222e12b8c1b",
    "version" : "2.0",
    "xform_ids" : [ "3HQEXR2S0GIRFY2GF40HAR7ZE" ]
  }

...