I'm getting a 400 Bad Request error in my recipe for Salesforce. It doesn't provide much information beyond that. How can I troubleshoot this?
Best Answer
P
Patricia Guevarra
said
over 6 years ago
Hi Saul,
There are various possibilities for this error, but there are some basic things you can check
1. Do you have any validation rules?
2. If the step has fields that are date/time type, number/integer type, IDs, check that the information mapped in is of the appropriate type. You can refer to the following documentation to learn more about data types: http://docs.workato.com/recipes/data-pills-and-mapping.html#data-types. The usual error tends to be with number/integer fields, or date/date-time fields. You can use formulas like .to_i or .to_date to ensure they are passed in correctly. You can learn more about that here: http://docs.workato.com/formulas.html
3. Are there character limits on any of the fields?
4. Are you able to create the record in Salesforce manually?
5. Are you mapping a pill or text into a picklist field? Verify if you are entering a value that is present in the picklist.
6. Are you using Salesforce records that are inactive? For example, if you are creating an Opportunity Product, check if the Product and Pricebook Entry you provided have IsActive = true in the output.
7. If you are trying to add an Opportunity Product, is the Pricebook entry used under the same Pricebook as the Opportunity?
One way to drill down on which field is causing the issue, create another recipe with the trigger as a scheduler and the action to create the record in Salesforce. Then, fill in only the required fields and see if that works fine. If so, continually add in more of the optional fields until you get the error again. This will help to verify which field is causing the error.
Answer
Patricia Guevarra
said
over 6 years ago
Hi Saul,
There are various possibilities for this error, but there are some basic things you can check
1. Do you have any validation rules?
2. If the step has fields that are date/time type, number/integer type, IDs, check that the information mapped in is of the appropriate type. You can refer to the following documentation to learn more about data types: http://docs.workato.com/recipes/data-pills-and-mapping.html#data-types. The usual error tends to be with number/integer fields, or date/date-time fields. You can use formulas like .to_i or .to_date to ensure they are passed in correctly. You can learn more about that here: http://docs.workato.com/formulas.html
3. Are there character limits on any of the fields?
4. Are you able to create the record in Salesforce manually?
5. Are you mapping a pill or text into a picklist field? Verify if you are entering a value that is present in the picklist.
6. Are you using Salesforce records that are inactive? For example, if you are creating an Opportunity Product, check if the Product and Pricebook Entry you provided have IsActive = true in the output.
7. If you are trying to add an Opportunity Product, is the Pricebook entry used under the same Pricebook as the Opportunity?
One way to drill down on which field is causing the issue, create another recipe with the trigger as a scheduler and the action to create the record in Salesforce. Then, fill in only the required fields and see if that works fine. If so, continually add in more of the optional fields until you get the error again. This will help to verify which field is causing the error.
Saul Macht
Salesforce: 400 Bad Request Error
I'm getting a 400 Bad Request error in my recipe for Salesforce. It doesn't provide much information beyond that. How can I troubleshoot this?
Hi Saul,
There are various possibilities for this error, but there are some basic things you can check
1. Do you have any validation rules?
2. If the step has fields that are date/time type, number/integer type, IDs, check that the information mapped in is of the appropriate type. You can refer to the following documentation to learn more about data types: http://docs.workato.com/recipes/data-pills-and-mapping.html#data-types. The usual error tends to be with number/integer fields, or date/date-time fields. You can use formulas like .to_i or .to_date to ensure they are passed in correctly. You can learn more about that here: http://docs.workato.com/formulas.html
3. Are there character limits on any of the fields?
4. Are you able to create the record in Salesforce manually?
5. Are you mapping a pill or text into a picklist field? Verify if you are entering a value that is present in the picklist.
6. Are you using Salesforce records that are inactive? For example, if you are creating an Opportunity Product, check if the Product and Pricebook Entry you provided have IsActive = true in the output.
7. If you are trying to add an Opportunity Product, is the Pricebook entry used under the same Pricebook as the Opportunity?
One way to drill down on which field is causing the issue, create another recipe with the trigger as a scheduler and the action to create the record in Salesforce. Then, fill in only the required fields and see if that works fine. If so, continually add in more of the optional fields until you get the error again. This will help to verify which field is causing the error.
Patricia Guevarra
Hi Saul,
There are various possibilities for this error, but there are some basic things you can check
1. Do you have any validation rules?
2. If the step has fields that are date/time type, number/integer type, IDs, check that the information mapped in is of the appropriate type. You can refer to the following documentation to learn more about data types: http://docs.workato.com/recipes/data-pills-and-mapping.html#data-types. The usual error tends to be with number/integer fields, or date/date-time fields. You can use formulas like .to_i or .to_date to ensure they are passed in correctly. You can learn more about that here: http://docs.workato.com/formulas.html
3. Are there character limits on any of the fields?
4. Are you able to create the record in Salesforce manually?
5. Are you mapping a pill or text into a picklist field? Verify if you are entering a value that is present in the picklist.
6. Are you using Salesforce records that are inactive? For example, if you are creating an Opportunity Product, check if the Product and Pricebook Entry you provided have IsActive = true in the output.
7. If you are trying to add an Opportunity Product, is the Pricebook entry used under the same Pricebook as the Opportunity?
One way to drill down on which field is causing the issue, create another recipe with the trigger as a scheduler and the action to create the record in Salesforce. Then, fill in only the required fields and see if that works fine. If so, continually add in more of the optional fields until you get the error again. This will help to verify which field is causing the error.