UPS 集成

UPS 是一种运输承运商服务,可与 Odoo 集成,以协调所有地区的发货。集成后,用户可以创建估算运费并 生成标签 的运输方式。

::: seealso third_party_shipper :::

要在 Odoo 中设置 UPS 运输连接器,请完成以下步骤:

  1. 创建 UPS 账户以获取 account number <inventory/shipping_receiving/ups-account-number>
  2. 创建 UPS 开发者账户以获取 client credentials <inventory/shipping_receiving/ups-client-id>
  3. 在 Odoo 中设置运输方式

:::: warning ::: title 警告 :::

配置使用 UPS 的运输方式时,请确保 Provider 设置为 UPS而不是 UPS Legacy

如果当前已有 ProviderUPS Legacy 的运输方式,请将其归档,并使用 UPS 创建新的运输方式。 ::::

首先,访问 UPS 网站 并点击右上角的 Log In 按钮登录或创建 UPS 账户。

登录后,点击右上角的个人资料图标, 从下拉菜单中选择 Accounts and Payment

{.align-center}

Accounts and Payment Options 页面,需要配置两个账户:Odoo 发货账户和付款卡。

要添加 Odoo 发货账户,请在 Add a Payment Method 下拉菜单中选择 Add New Account,然后点击 Add

{.align-center}

在下一屏幕标为 Open a Shipping Account,填写表单以配置账户类型(如 Business)以及是否会运输受监管物品。随后完成向导的三个步骤:Add AddressesVerify IdentityExplore Discounts(最后一步为可选)。

完成后,在向导最后一页提交申请,以完成发货账户的设置。

{.align-center}

发货账户设置完成后,UPS 的 Account Number 即可使用。进入 Profile --> Accounts and Payment,在发货账户的 Number 字段即可查看。

{.align-center}

返回 Accounts and Payments 页面,从 Add a Payment Method 下拉菜单中选择 Add Payment Card。随后填写表单添加信用卡信息。

{.align-center}

接下来,登录 UPS 开发者账户 以生成开发者密钥。点击右上角的个人资料图标,在下拉菜单中选择 Apps

{.align-center}

点击 Add Apps 按钮开始填写表单。在 I need API credentials because * 字段中,选择 I want to integrate UPS technology into my business

Choose an account to associate with these credentials. * 标签下, 从下拉菜单中选择 Add existing account,随后选择前一步创建的 UPS 账户编号 <inventory/shipping_receiving/ups-account-number>

{.align-center}

点击 Next,进入 Add App 表单,填写以下字段:

  • App Name:为应用起一个便于识别的名称。
  • Callback URL:填写 Odoo 数据库的 URL,格式为 https://databaseName.odoo.com不要 包含 www

在右侧的 Add Products 区域,搜索并点击 + 图标,将以下产品添加到应用中:

  • Authorization (O Auth):用于生成授权令牌,以请求 UPS API 信息。
  • Address Validation:在美国和波多黎各对街道级地址进行验证。
  • Locator:根据类型和可用服务搜索 UPS 运输地点。
  • Paperless Documents:上传文档图片并关联到货运单。
  • Shipping:提供 UPS 发货服务,如准备包裹、管理退货、取消已安排的发货等。
  • Rating:比较配送服务和运费。

完成后点击 Save 并接受 UPS 的条款与条件。

::: seealso UPS API Catalog :::

{.align-center}

新应用创建完成后,进入 Profile --> My Apps --> App 页面,在 Credentials 部分选择该应用即可查看 UPS 凭证。

{.align-center}

Credentials 区域,复制 Client IDClient Secret

{.align-center}

获取到凭证后,前往 Inventory app --> Configuration --> Shipping Methods,在 Shipping Methods 页面点击 New 按钮。

:::: note ::: title 注意 :::

对于 ProviderUPS Legacy 的已有 UPS 运输方式,请将其归档并使用 UPS 创建新方式。 ::::

Provider 字段中选择 UPS。此时会出现 UPS Configuration 选项卡,需要在其中填写多个字段。关于其他字段的详细配置,请参考 Configure third-party carrier <third_party_shipper> 文档。

UPS Configuration 选项卡中,填写以下必填字段:

  • UPS Account Number必填):从 UPS 门户获取 <inventory/shipping_receiving/ups-account-number>
  • UPS Client ID必填):从 UPS 开发者网站获取 <inventory/shipping_receiving/ups-client-id>
  • UPS Client Secret必填):同上获取的密钥。
  • UPS Service Type:从下拉菜单选择运输服务类型。
  • UPS Package Type必填):从下拉菜单选择该服务支持的 <../../product_management/configure/package> 包装类型。
  • Package Weight Unit:包装重量的计量单位。
  • Package Size Unit:包装尺寸的计量单位。
  • Label Format:选择标签格式,可选 PDFZPLEPLSPL

{.align-center}

Options 部分,可选功能包括:

  • Bill My Account:在 eCommerce 应用中使用用户的 UPS 账户计费。
  • Collect on Delivery:在货物送达后向客户收取运费。
  • Generate Return Label:在验证交付单后打印退货标签。
  • Duties paid by:选择由 Sender(发件人)或 Recipient(收件人)承担关税或其他费用。