Grower Updates

Overview

AgriSmart can receive updates to an Applicator’s grower list via an Amazon SQS FIFO queue. The messages sent to this queue can create new growers or update existing growers based on an alphanumeric grower_id attribute used to identify growers across a customer’s systems.

SQS Message Requirements

MessageDeduplicationId

These queues will use ContentBasedDeduplication for managing duplicate messages sent within the 5-minute deduplication interval so no MessageDeduplicationId is required for messages sent to our grower-update queues.

MessageGroupID

These queues will depend on the use of an appropriate MessageGroupID to ensure that messages related to a specific grower_id are received in the correct order. You should include the growers’s grower_id in the MessageGroupID.

Grwer Update Message Attributes

Attribute Description
grower_id The user entered ID that allows users to identify growers across their systems. The grower_id is required when creating or updating growers since it is the only way for us to identify the grower.
partnership The Partnership the grower belongs to. Only the Partnership.id attribute is required in messages sent to the grower-updates queue. The partnership attribute is required when creating or updating growers because it is the only way we can identify which specific grower the grower_id relates to.
first_name The grower’s first name. Required when creating or updating if business_name is missing.
last_name The grower’s last name. Required when creating or updating if business_name is missing.
business_name The grower’s business name. Either the business_name OR BOTH of the first_name AND last_name attributes are required to update or create a grower.
address The grower’s address.
city The grower’s city.
state The grower’s state.
zip The grower’s zip code.
phone The grower’s phone.
fax The grower’s fax.
mobile The grower’s mobile number.
email The grower’s email address.
credit_hold Indicates whether the grower is currently on credit hold.

Sample

{
  "grower_id": "1234",
  "partnership": {
    "id": 1234
  },
  "first_name": "First",
  "last_name": "Last",
  "business_name": "Biz",
  "address": "123 Main St",
  "city": "Any Town",
  "state": "Nebraska",
  "zip": "12345",
  "phone": "402-555-1212",
  "fax": null,
  "mobile": "402-555-1212",
  "email": "grower@example.com",
  "credit_hold": true
}