You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于Xero.API.SDK.Minimal中Invoice类SendToContact属性的功能咨询

Understanding the SendToContact Nullable Boolean Property in Xero's Invoice Model (v2.2.1.13)

Hey there! Let me break down what the SendToContact property does in the Xero.Api.Core.Model.Invoice class (from the Xero.API.SDK.Minimal v2.2.1.13 NuGet package) since the docs can be a bit thin on this detail.

Definition

  • It’s a nullable boolean (bool?) property, meaning it can be set to true, false, or left as null (unset). This flexibility lets you either explicitly control the invoice sending behavior or defer to Xero’s default settings.

Core Purpose

This property directly controls whether Xero automatically sends the invoice to the associated contact via email after you create or update the invoice through the API:

  • Set to true: Xero will immediately send the invoice to the contact’s email address stored in your Xero organization once the API call completes successfully.
  • Set to false: Xero won’t send the invoice automatically. You’ll need to handle sending it yourself—either manually through the Xero web UI or via your own custom email logic in your application.
  • Left as null: Xero will use the default invoice notification behavior configured in your Xero organization’s settings. This is useful if you want to stick to the default rules you’ve already set up in Xero.

Practical Tips

  • This property only affects invoices created/updated via the API—it doesn’t change behavior for invoices made directly in the Xero web interface.
  • If you set SendToContact to true, double-check that the contact has a valid email address on file. Xero will fail to send the invoice (and may log an error) if the email is missing or invalid.
  • You don’t have to set this property at all unless you want to override your org’s default settings. Omitting it (or leaving it null) keeps things aligned with how you’ve configured Xero to handle invoice notifications.

内容的提问来源于stack exchange,提问作者Burian

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:13:28