REST Batching

Has anyone had any success batching REST calls together with the batch service methods?

 

We are currently on V11 in a RAMP environment and I'm having some issues with this. I am get the error "Object reference not set to an instance of an object." for any service URI I enter (local, relative, or even web.

 

I'm really stuck on this right now and I'm not sure if this is a V11, RAMP, or coding or other random issue.

 

Here is my current POST body to https://fairlb/testapi/constituentservice/constituents/batch from within my RAMP terminal (local to the gateway):

<BatchRequest>

<Requests>

<Request>

<Id>1</Id>

<Uri>https://fairlb/testapi/constituentservice/constituents/5</Uri>

<HttpMethod>GET</HttpMethod>

</Request>

</Requests>

</BatchRequest>

 

Has anyone had similar issues in a non-RAMP environment?

-Chris

Parents
  • Hi Chris,

    It's a little tricky with the dataservice because it does not know about the objects you are trying to batch, so you have to use the content type of a:XElement like below:


    <BatchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

    <Requests>

    <Request>

    <Content i:type="a:XElement" xmlns:a="http://schemas.datacontract.org/2004/07/System.Xml.Linq">

    <CustomThing>

    <CustomColumn>1</CustomColumn>

    </CustomThing>

    </Content>

    <HttpMethod>POST</HttpMethod>

    <Id>1</Id>

    <Uri>https://website.com/testapi/tessituraservice/custom/customthings/</Uri>

    </Request>

    <Request>

    <HttpMethod>GET</HttpMethod>

    <Id>2</Id>

    <Uri>https://website.com/testapi/tessituraservice/custom/customthings/1</Uri>

    </Request>

    </Requests>

    </BatchRequest>



    [edited by: Paul Kappel at 3:38 PM (GMT -6) on 28 Jul 2014]
  • Thanks Paul-- That will probably save me some extra headaches in the future. Seems my GET call is matching yours, though, so I'm still unsure of what might be wrong with my base calls.

     

    Do you know if the API loops back through the network to make the batch calls? I'm still not entirely sure of the stack behavior when it comes to these Batch methods

  • That worked.... I guess the deserialization process in V11 is quite temperamental and I hadn't tried that order.

    Thanks Paul!

  • Hi

    I'm trying to do a similar thing with a json payload to batch insert into a custom table

    In XML it works  but in JSON I get an xml (!) response saying 

     

    <ErrorMessages xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ErrorMessage><Code i:nil="true"/><Description>Value cannot be null.&#xD;

    Parameter name: source</Description><ErrorPath i:nil="true"/></ErrorMessage></ErrorMessages>

    The respective payloads are as follows

    (And I'm using headers for the JSON request that work with a non-Batch POST)

    JSON:

     

    {

        "BatchRequest": {

            "Requests": [

                {

                    "Request": {

                        "Content": {

                            "perfinfo": {

                                "inv_no": "666",

                                "artifax_event": "666"

                            }

                        },

                        "HttpMethod": "POST",

                        "Id": 1,

                        "Uri": "https://ti3svcs.inhouse.rfh.org.uk/TessituraService/Custom/perfinfos/"

                    }

                },

                {

                    "Request": {

                        "Content": {

                            "perfinfo": {

                                "inv_no": "999",

                                "artifax_event": "999"

                            },

                            "HttpMethod": "POST",

                            "Id": 2,

                            "Uri": "https://ti3svcs.inhouse.rfh.org.uk/TessituraService/Custom/perfinfos/"

                        }

                    }

                }

            ]

        }

    }

     

    XML:

     

     

    <BatchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

      <Requests>

        <Request>

          <Content  i:type="a:XElement" xmlns:a="http://schemas.datacontract.org/2004/07/System.Xml.Linq">

            <perfinfo>

              <inv_no>92463</inv_no>

              <artifax_event>666</artifax_event>

            </perfinfo>

          </Content>

          <HttpMethod>POST</HttpMethod>

          <Id>1</Id>

          <Uri>https://ti3svcs.inhouse.rfh.org.uk/TessituraService/Custom/perfinfos/</Uri>

        </Request>

        <Request>

          <Content  i:type="a:XElement" xmlns:a="http://schemas.datacontract.org/2004/07/System.Xml.Linq">

            <perfinfo>

              <inv_no>92463</inv_no>

              <artifax_event>999</artifax_event>

            </perfinfo>

          </Content>

          <HttpMethod>POST</HttpMethod>

          <Id>2</Id>

          <Uri>https://ti3svcs.inhouse.rfh.org.uk/TessituraService/Custom/perfinfos/</Uri>

        </Request>

      </Requests>

    </BatchRequest>

  • Just replied to the thread on the developer forum as well...I'm trying to do a JSON batch as well, and not able to figure it out.

    I've been trying to work with the example and the basic diagnostics api call:

     {
    	"Requests": [
    		{ "Request": {
    			"HttpMethod":"GET",
    			"Id":1,
    			"Uri":"http://calplb/TestAPI/TessituraService/Diagnostics/Status",
    			"Content":{}
    		}},
    		{ "Request": {
    			"HttpMethod": "GET",
    			"Id":2,
    			"Uri":"http://calplb/TestAPI/TessituraService/Diagnostics/Status",
    			"Content":{}
    		}},
    	]
    }

    And I get this error:

    "Code": "PARAMETER_SHOULD_BE_GREATER_THAN_ZERO",
        "Description": "The parameter must be greater than zero.",
        "Details": "   at Tessitura.Services.Common.Util.Throw`1.If(Func`1 action)\r\n   at Tessitura.Services.Common.Batch.BatchRequestValidator.Validate(BatchRequest batchRequest)\r\n   at Tessitura.Service.Web.Controllers.Custom.BatchService.Validate(BatchRequest batchRequest)\r\n   at Tessitura.Service.Web.Controllers.Custom.BatchService.ExecuteBatchRequest(BatchRequest batchRequest, ContentType contentType)\r\n   at Tessitura.Service.Web.Controllers.Base.BatchBaseController.Process(BatchRequest batchRequest, ContentType contentType)\r\n   at Tessitura.Service.Web.Controllers.BatchController.Post(HttpRequestMessage requestMessage)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown 
    
    etc.

    What parameter?  It sounds like a complaint about "Id", but that seems correct.

  • Nevermind, I was jumping too quickly between other examples in this thread (presumably from v11) and the example in the rest service catalog.  This works!

     {
    	"Requests": [
    		{
    			"HttpMethod":"GET",
    			"Id":1,
    			"Uri":"http://calplb/TestAPI/TessituraService/Diagnostics/Status",
    			"Content":{}
    		},
    		{
    			"HttpMethod": "GET",
    			"Id":2,
    			"Uri":"http://calplb/TestAPI/TessituraService/Diagnostics/Status",
    			"Content":{}
    		},
    	]
    }
  • Okay, now I have a genuine question.

    If I call CRM/Addresses with this in the request:

     

    {
    	"Constituent": { "Id": 20335666 },
    	"AddressType": { "Id": 14 },
    	"Street1": "111 Nob Hill Crescent",
    	"City": "San Francisco",
    	"State": { "Id": 11},
    	"PostalCode": "94109",
    	"Country": { "Id": 1 },
    	"Label": "True",
    	"PrimaryIndicator": "False",
    	"Months": "YYYYNNNNYYYY"
    }
    

     

    It works.  But if I try to call it through a batch, thusly:

     

    {
    	"Requests": [
    		{
    			"HttpMethod":"POST",
    			"Id":1,
    			"Uri":"http://calplb/TestAPI/TessituraService/CRM/Addresses/",
    			"Content":{
    				"Constituent": { "Id": 20335666 },
    				"AddressType": { "Id": 14 },
    				"Street1": "111 Nob Hill Crescent",
    				"City": "San Francisco",
    				"State": { "Id": 11},
    				"PostalCode": "94109",
    				"Country": { "Id": 1 },
    				"Label": "True",
    				"PrimaryIndicator": "False",
    				"Months": "YYYYNNNNYYYY"
    			}
    		}
    	]
    }
    

     

    I get this error:

     

    {
      "Responses": [
        {
          "RequestId": 1,
          "ResponseObject": null,
          "StatusCode": 500,
          "ErrorMessages": [
            {
              "Code": null,
              "Description": "Object of type 'Newtonsoft.Json.Linq.JObject' cannot be converted to type 'Tessitura.Service.Client.CRM.Address'.",
              "Details": null,
              "ErrorPath": null
            }
          ]
        }
      ],
      "BatchFailed": true
    }

     

    What subtlety of formatting the contents am I missing?  Alas the only examples in the documentation are XML.

  • I just tried your exact example, changing only address type, constituent ID, and Uri, and it worked for me. I'm on 12.5.1HF12.

    12.5.1's REST Client does have a rudimentary JSON example, but the only other things it demonstrates are some properties on the request: a "ReturnTypeString" which doesn't appear to have any affect, "ContinueOnError": true (maybe something to try), and "DependsOnRequests", which it gives absolutely no explanation of.



    [edited by: Nick Reilingh at 10:18 PM (GMT -6) on 13 Jul 2017]
  • I just tried your exact example, changing only address type, constituent ID, and Uri, and it work for me. I'm on 12.5.1HF12.

    Thanks for the confirmation! I think I'll try bumping this to support if I have the outline of my syntax right.

    12.5.1's REST Client does have a rudimentary JSON example, but the only other things it demonstrates are some properties on the request: a "ReturnTypeString" which doesn't appear to have any affect, "ContinueOnError": true (maybe something to try), and "DependsOnRequests", which it gives absolutely no explanation of.

    "DependsOnRequests" is my next step!

  • Hi Nick,

    Did you say you were able to get this Batch call to work?  Tessitura has just told me that there is a defect with JSON and Batch calls that is currently under development, and have suggested I switch to XML (blech).

    --Gawain

  • What version and hotfix are you on?

     

    I can make this request as JSON just fine

  • Thanks Christopher...I'm not 100% sure, is that something I can easily look up?  The version # is 12.5.1.216.

    Ah, here we go, dbo.FS_CURRENT_VERSION():

    12.5.1+HF44 216

    So, Hotfix 44?



    [edited by: Gawain Lavers at 6:50 PM (GMT -6) on 17 Jul 2017]
  • That is strange I don't think that you should have a problem then.

    Have you tried XML with success? What are your headers set to?

    I tried to break this earlier and I was getting fairly responsive errors, it seems that the conversion was happening fine with data structure you had provided.

     

  • Hi Christopher,

    I've asked Tessitura Support if this was an issue introduced by a hotfix, in case having a higher HF is what is causing me to have the problem and not you guys.

    I tried XML (Tessitura Support recommended it as a workaround), but I'm having no success there either.

    Here's what I'm plugging in (now almost identical to the code snipped in the documentation):

    <BatchRequest>
    	<Requests>
    		<Request>
    			<HttpMethod>POST</HttpMethod>
    			<Id>1</Id>
    			<Uri>http://calplb/TestAPI/TessituraService/CRM/Addresses/</Uri>
    			<Content i:type="address" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    				<Constituent><Id>20335666</Id></Constituent>
    				<Addresstype><Id>14</Id></Addresstype>
    				<Street1>111 Nob Hill Crescent</Street1>
    				<City>San Francisco</City>
    				<State><Id>11</Id></State>
    				<PostalCode>94109</PostalCode>
    				<Country><Id>1</Id></Country>
    				<Label>True</Label>
    				<PrimaryIndicator>False</PrimaryIndicator>
    				<Months>YYYYNNNNYYYY</Months>
    			</Content>
    		</Request>
    	</Requests>
    </BatchRequest>

    And here's the error I'm getting back:

    <BatchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <BatchFailed>true</BatchFailed>
      <Responses>
        <Response>
          <ErrorMessages>
            <ErrorMessage>
              <Code>FIELD_CANNOT_BE_NULL</Code>
              <Description>Field 'entity' cannot be null or empty.</Description>
              <Details i:nil="true" />
              <ErrorPath>entity</ErrorPath>
            </ErrorMessage>
          </ErrorMessages>
          <RequestId>1</RequestId>
          <ResponseObject i:nil="true" />
          <StatusCode>BadRequest</StatusCode>
        </Response>
      </Responses>
    </BatchResponse>

     

  • Interesting.

    We are on HF48 right now and are getting scheduled for 49 this week, so if that's the case it must have gotten un-borked.

    Maybe update and report back if you still have any issues?

  • Upgraded to HF48, but no change.  Not surprised, frankly.  Something else is clearly wrong.

    In the meantime, trying to work around not being able try things out in Batch, I'm realizing that I might have a bigger problem.  My assumption was that I was going to build some procedures to call through Custom/Execute, and I was going to used returned ids to fill in dependent procedures.  However, Custom/Execute isn't going to return columns in a way that I think can be referenced by the DependsOnRequest...and if did, I wouldn't be able to apply it to the dependent call to Custom/Execute since the parameters are all bunged together in a single object ("Parameters").

    I'm trying to figure out TR_DATASERVICE, but documentation is even more scanty for that, particularly for formatting POST and PUT commands.

  • Say Christopher/Nick,

    When you were running this, were you doing it through the provided Rest Client (that's what I'm doing), or via cURL or the .Net libraries?

     

    --Gawain

Reply Children
  • I was just using the REST client provided in the services web interface.

  • Hi Gawain - Postman is a useful REST client. It's one I use on a regular basis: https://www.getpostman.com/.



    [edited by: David Frederick at 4:46 PM (GMT -6) on 24 Jul 2017]
  • I also used Postman to test this.

    The only thing I can think of if the client is the issue would be if you're not sending the response body explicitly and there is a serialization issue with the JSON object that is being sent for the batch call [sending a serialized .NET object somehow?].

    Have you tried to connect to your gateway outside of .NET at all?

  • Hi Christopher,

    I'm trying Postman to at least rule out whether or not the built-in client is my problem, but I'm not sure I'm doing it right: I changed to bulk edit for parameters and then copied and pasted in the request data, but I'm not sure that's right.  Is there somewhere else to enter request data, or does it need to be formatted in a different way?

     

    --Gawain

  • (duplicate)



    [edited by: Gawain Lavers at 2:27 PM (GMT -6) on 26 Jul 2017]
  • Sorry, nevermind, found it.  Now I get a different error at least!

     

    (Update: wrong content-type)

     

    Okay, so now it just fails silently.  That's something, I guess?

     

     



    [edited by: Gawain Lavers at 2:39 PM (GMT -6) on 26 Jul 2017]
  • It wasn't, and now I get the same error I get through the built-in REST client.  Oh well.  Oddly, I didn't need it to run some other (not Batch) methods correctly.

  • Gawain, hoping this helps a bit:

    in your batch request above, try moving Content to the first element.  Using XML, the elements need to be alphabetically ordered in your request.  It's not seeing Content first and deserializing it as NULL.

    <BatchRequest>
    	<Requests>
    		<Request>
    			<HttpMethod>POST</HttpMethod>
    			<Id>1</Id>
    			<Uri>http://calplb/TestAPI/TessituraService/CRM/Addresses/</Uri>
    			<Content i:type="address" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    				<Constituent><Id>20335666</Id></Constituent>
    				<Addresstype><Id>14</Id></Addresstype>
    				<Street1>111 Nob Hill Crescent</Street1>
    				<City>San Francisco</City>
    				<State><Id>11</Id></State>
    				<PostalCode>94109</PostalCode>
    				<Country><Id>1</Id></Country>
    				<Label>True</Label>
    				<PrimaryIndicator>False</PrimaryIndicator>
    				<Months>YYYYNNNNYYYY</Months>
    			</Content>
    		</Request>
    	</Requests>
    </BatchRequest>

    I have one final note regarding custom and batching.  At this time, the Custom resources are not supported in Batch requests.  The Batch service relies heavily on known service entities (like 'Constituent', 'PriceType', e.g.) to build its requests and responses.  Custom resources are by their nature ad hoc and dynamic and the capabiliity of building requests based on these does not exist in the service.

    Hope to see you at TLCC!

    -Ryan Creps

    Tessitura Network

  • Hi Ryan,

    Thanks!  I realized I have read that before, but totally forgot when setting this up.  That does have me moving forward a bit.  But do you mean that even Custom resources defined in TR_DATASERVICE_TABLES cannot be used with Batch?  Will that change in v14?  If that's true, I'm really sunk.

    This has moved me forward with my Batch->Addresses test, but now I'm getting an error "Field 'Address Months' cannot be null or empty."  I'm specifying it, as you can see in the example, and that label is what is used in the REST documentation.  Is there some other?

    Actually, running a direct call to CRM/Addresses with XML nets more errors:

    <ErrorMessages xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <ErrorMessage>
            <Code>FIELD_CANNOT_BE_NULL</Code>
            <Description>Field 'Address Months' cannot be null or empty.</Description>
            <Details i:nil="true" />
            <ErrorPath>Address Months</ErrorPath>
        </ErrorMessage>
        <ErrorMessage>
            <Code>FIELD_CANNOT_BE_NULL</Code>
            <Description>Field 'Address City' cannot be null or empty.</Description>
            <Details i:nil="true" />
            <ErrorPath>Address City</ErrorPath>
        </ErrorMessage>
        <ErrorMessage>
            <Code>FIELD_CANNOT_BE_NULL</Code>
            <Description>Field 'Address State' cannot be null or empty.</Description>
            <Details i:nil="true" />
            <ErrorPath>Address State</ErrorPath>
        </ErrorMessage>
        <ErrorMessage>
            <Code>FIELD_CANNOT_BE_NULL</Code>
            <Description>Field 'Address PostalCode' cannot be null or empty.</Description>
            <Details i:nil="true" />
            <ErrorPath>Address PostalCode</ErrorPath>
        </ErrorMessage>
    </ErrorMessages>

    Still, this does still raise the question of why other people can do it (Batch->CRM/Addresses->JSON) and I can't.  Nick, Chris, one other variable (I guess), is that I'm on RAMP, and that means we are using SQL Server 2008.  I'm being told this issue is somehow fixed in v14 (which we can't have because we're stuck on SS 2008 with RAMP.  Is there a possibility that you guys are already on SS 2012?

    Lastly, alas, I'm not going to be able to make the TLCC this year.  I'll miss you guys!

     

     

  • Huh, if I just run CRM/Addresses, and I sort the elements alphabetically:

    <Address  xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    	<Addresstype><Id>14</Id></Addresstype>
    	<City>San Francisco</City>
    	<Constituent><Id>20335666</Id></Constituent>
    	<Country><Id>1</Id></Country>
    	<Label>True</Label>
    	<Months>YYYYNNNNYYYY</Months>
    	<PostalCode>94109</PostalCode>
    	<PrimaryIndicator>False</PrimaryIndicator>
    	<State><Id>11</Id></State>
    	<Street1>111 Nob Hill Crescent</Street1>
    </Address>
    

    then I get a different error:

    <ErrorMessages xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <ErrorMessage>
            <Code>FIELD_CANNOT_BE_NULL</Code>
            <Description>Field 'entity' cannot be null or empty.</Description>
            <Details>   at Tessitura.Services.Common.Guard.ArgumentNotNull(Expression`1 expression, String errorPath)
       at Tessitura.Services.Common.Guard.EntityIdShouldNotBeGreaterThanZero(IEntity entity)
       at Tessitura.Service.Impl.SubEntityService.CreateSubEntity[T](T subEntity)
       at Tessitura.Service.Impl.AddressService.Create(AddressEntity subEntity)
       at Tessitura.Service.Web.Controllers.CRM.AddressesController.&lt;&gt;c__DisplayClass7.&lt;Post&gt;b__6()
       at Tessitura.Service.Web.Controllers.Base.BaseController.RunInTransaction[T](Func`1 func)
       at Tessitura.Service.Web.Controllers.CRM.AddressesController.Post(Address address)
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.&lt;&gt;c__DisplayClass10.&lt;GetExecutor&gt;b__9(Object instance, Object[] methodParameters)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ApiControllerActionInvoker.&lt;InvokeActionAsyncCore&gt;d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.&lt;CallOnActionExecutedAsync&gt;d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.&lt;CallOnActionExecutedAsync&gt;d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.ActionFilterAttribute.&lt;ExecuteActionFilterAsyncCore&gt;d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ActionFilterResult.&lt;ExecuteAsync&gt;d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Filters.AuthorizationFilterAttribute.&lt;ExecuteAuthorizationFilterAsyncCore&gt;d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Controllers.ExceptionFilterResult.&lt;ExecuteAsync&gt;d__0.MoveNext()</Details>
            <ErrorPath>entity</ErrorPath>
        </ErrorMessage>
    </ErrorMessages>
  • You are missing a few properties.  Try something along the lines of:

     

    <Address xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <AddressType>
        <Id>1</Id>
      </AddressType>
      <AffiliatedConstituent/>
      <AltSalutationType>
        <Id>0</Id>
      </AltSalutationType>
      <City>San Francisco</City>
      <Constituent>
        <Id>1007</Id>
      </Constituent>
      <Country>
        <Id>1</Id>
      </Country>
      <GeoArea>1</GeoArea>
      <Id>-999</Id>
      <Inactive>false</Inactive>
      <Label>true</Label>
      <Months>YYYYYYYYYYYY</Months>
      <PostalCode>94109</PostalCode>
      <PrimaryIndicator>true</PrimaryIndicator>
      <State>
        <Id>11</Id>
      </State>
      <Street1>sample string 9</Street1>
    </Address>
  • Bear in mind that Batch is just a convenient way of bundling calls into a single request.  This shouldn't preclude you from making requests sequentially and doing the dependencies between them yourself from each response.

    There is no plan at this point to include Custom into the Batch resource.

    Sorry to see that you'll be missing TLCC this year!

    -Ryan

  • You are missing a few properties.  Try something along the lines of:

     

    Do I really need those other fields?  I don't with JSON.  And should I even be sending "Id" on a create?  In any event, I tried this and got the same failure:

     

    <Address  xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    	<Addresstype><Id>14</Id></Addresstype>
    	<AffiliatedConstituent/>
    	<AltSalutationType><Id>0</Id></AltSalutationType>
    	<City>San Francisco</City>
    	<Constituent><Id>20335666</Id></Constituent>
    	<Country><Id>1</Id></Country>
    	<GeoArea>1</GeoArea>
    	<Id>-999</Id>
    	<Inactive>False</Inactive>
    	<Label>True</Label>
    	<Months>YYYYNNNNYYYY</Months>
    	<PostalCode>94109</PostalCode>
    	<PrimaryIndicator>False</PrimaryIndicator>
    	<State><Id>11</Id></State>
    	<Street1>111 Nob Hill Crescent</Street1>
    </Address>