Contact Us

September 27, 2024

May 13, 2026 1:29 pm

Resolving Invalid Property Type Errors in Agentforce Production

Share with

Understanding the Error

The INVALID_PROPERTY_TYPE error typically indicates a mismatch between the expected and actual variable types. However, in this case, the community member had already checked the variable types and they appeared to match.

The root cause of the issue is likely due to the formatting of the JSON package between the prompt template and the flow. The Agent may be injecting extra whitespace or characters into the JSON output, causing the flow to fail.

Troubleshooting Steps

To troubleshoot this issue, the community member tried switching all variables to text, but this did not resolve the issue. They also verified that the parsing logic in the flow was correct and that the JSON values were being properly extracted from the prompt template.

Another community member suggested checking for fields that are over 255 characters, but this was not the cause of the issue. They also suggested that the JSON package formatting may be the cause of the error, and that the Agent may be injecting extra whitespace or characters into the JSON output.

Resolving the Issue

To resolve the issue, the community member can try creating a new temporary version of the prompt template that only pulls out one value at a time and then swap that value out until they find the offender. They can also try forcing the prompt template and Agent to output JSON only, without code fences or prose, and watch out for blanks that don’t get converted to a default.

example.json

{"key": "value"}

Heads up: When working with JSON in Agentforce, it’s essential to ensure that the output is properly formatted and free of extra whitespace or characters.

Checklist

  • Verify that the variable types match the expected types in the flow
  • Check the JSON output from the prompt template for extra whitespace or characters
  • Try switching all variables to text
  • Verify that the parsing logic in the flow is correct
  • Check for fields that are over 255 characters
  • Try forcing the prompt template and Agent to output JSON only
  • Watch out for blanks that don’t get converted to a default

Frequently Asked Questions

What is the cause of the INVALID_PROPERTY_TYPE error?

The cause of the error is typically a mismatch between the expected and actual variable types, but can also be due to the formatting of the JSON package between the prompt template and the flow.

How can I troubleshoot the issue?

Try verifying that the variable types match the expected types in the flow, checking the JSON output from the prompt template, and trying switching all variables to text.

What is the best way to resolve the issue?

Try creating a new temporary version of the prompt template that only pulls out one value at a time and then swap that value out until you find the offender.

Can I use a custom GPT to help with troubleshooting?

Yes, a custom GPT can be used to help with troubleshooting, but it’s essential to verify the results and ensure that the solution is correct.

What should I watch out for when working with JSON in Agentforce?

Watch out for extra whitespace or characters in the JSON output, and ensure that the output is properly formatted.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert