Skip to main content

Here is what I’m trying to do.  I have created a zap between JotForm and ServiceTitan.  When the customer submits a JotForm and selects the option to do the same as last year, I want to look up last years invoice and have it create a new job.  

I am running into a problem with the step that I update the created job with last years services.  There is an extra step before I can update the invoice where I must define if the charge being added to the invoice is

Service

Material

Equipment

 

Due to this requirement, I need to filter my array by the item type being updated on the newly created job then I was going to create 3 paths based on the item type to update the invoice with the filtered arrays.


I also keep getting an error on the last step that I’m not sure how to resolve. 

 

 

Array Setup - I need to filter this array by Type (Service, Materials, Equipment) but I still need to retain the other 4 properties.

 

 

Here is how the loop is setup.  I need this to be a 3 way path with 3 filters aforementioned filters on the array. 

 

I have to select the Item type before I can populate those actions from the loop.  
I keep getting this error. I assume its because formatter converts number to string and I tried using formatter to convert it back but it didn’t work.  I think its for the Quantity / SKU array properties.
Failed to create an invoice items in ServiceTitan
Bad Request: {"errors":{"id":q"Error converting value \"58451537584515389991187876016651193728290712554689265664\" to type 'System.Nullable`1tSystem.Int64]'. Path 'id', line 1, position 665."],"skuId":o"Error converting value \"58451537584515389991187876016651193728290712554689265664\" to type 'System.Nullable`1tSystem.Int64]'. Path 'skuId', line 1, position 67."],"quantity":i"Could not convert string to decimal: 10000000000000000328415624892049260789870125663596116955123134262587470068987879955440013156277274126839495047843224355786484906342114918400. Path 'quantity', line 1, position 601.","Required property 'quantity' not found in JSON. Path '', line 1, position 666."],"itemModel":i"The itemModel field is required."]},"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"81b4b4aeb8985b3b-IAD"}
show less

Any help??

Hi @RichC 

Good question.

The Looping help article states not to use the PREVIEW variables: https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions

 

 

 

 


Thanks @Troy Tessalone.  That got rid of the error at the end.  Any help on creating the array filters? 


@RichC 

Try adding Paths within the Looping app.

Each Path has a Filter.