Cropwise PartnerID
Reference Guide Overview
A PartnerId is the unique identifier generated by our platform for records imported from Cropwise. It provides a consistent way to identify and reference imported records across the platform.
This guide explains:
- What a PartnerId is
- How PartnerIds are structured
- Which Cropwise fields are used for each entity
- How to interpret single- and multi-identifier PartnerIds
1. What is a PartnerId?
The PartnerId is generated by our system. It is not an ID assigned by Cropwise.
PartnerIds combine the Cropwise source, the Sandy organisation identifier, and one or more identifiers from the corresponding Cropwise record.
The general format is:
CROPWISE_{SandyOrgId}_{Cropwise_Entity_Id}
Where:
| Component | Description |
|---|---|
CROPWISE |
Identifies Cropwise as the source system. |
SandyOrgId |
The unique organisation identifier in our system. This is a GUID. |
Cropwise_Entity_Id |
The identifier of the corresponding record in Cropwise. |
When more than one Cropwise identifier is required to uniquely identify a record, the identifiers are appended in sequence and separated by underscores (_).
2. PartnerId structure
Entities using a single Cropwise identifier
For an entity that can be uniquely identified with one Cropwise identifier, use:
CROPWISE_{SandyOrgId}_{Cropwise_Entity_Id}
Example
CROPWISE_550e8400-e29b-41d4-a716-446655440000_67890
| Component | Example | Description |
|---|---|---|
| Source | CROPWISE |
Identifies Cropwise as the source system. |
| Sandy organisation | 550e8400-e29b-41d4-a716-446655440000 |
The organisation GUID in Sandy. |
| Cropwise entity ID | 67890 |
The identifier of the relevant Cropwise record. |
Entities using multiple Cropwise identifiers
Some entities require more than one Cropwise identifier to uniquely identify the record. In these cases, append each identifier to the PartnerId and separate the values with underscores (_):
CROPWISE_{SandyOrgId}_{Cropwise_ID_1}_{Cropwise_ID_2}
For example:
CROPWISE_550e8400-e29b-41d4-a716-446655440000_67890_54321
The meaning of each suffix depends on the entity type and the Cropwise fields mapped to that entity.
3. PartnerId mapping by entity
Use the following mappings when constructing or interpreting PartnerIds.
| Entity | PartnerId format | Cropwise field(s) used |
|---|---|---|
| Farm setup | CROPWISE_{SandyOrgId}_{field_groups.id} |
field_groups.id |
| Field setup | CROPWISE_{SandyOrgId}_{fields.id} |
fields.id |
| Cropping | CROPWISE_{SandyOrgId}_{historyItem.id} |
historyItem.id |
| Operations | CROPWISE_{SandyOrgId}_{application_mix_items.id} |
application_mix_items.id |
| Manufactured fertiliser | CROPWISE_{SandyOrgId}_{fertiliser.id} |
fertiliser.id |
| Organic fertiliser details | CROPWISE_{SandyOrgId}_{fertiliser.id} |
fertiliser.id |
| Crop protection details | CROPWISE_{SandyOrgId}_{chemical.id} |
chemical.id |
| Fuel–machinery | CROPWISE_{SandyOrgId}_{agro_operations.id}_{machine_tasks.id} |
agro_operations.id + machine_tasks.id |
| Energy data / transport | CROPWISE_{SandyOrgId}_{fields.id}_{machine_tasks.id} |
fields.id + machine_tasks.id |
Naming note: The source material refers to this mapping as Energy data in the entity table and Transport – Energy data in the example. This guide uses Energy data / transport to preserve both references.
Important mapping note
The same PartnerId shape can be used by different entities. For example, both fuel–machinery and energy data / transport use two Cropwise identifiers, but the fields have different meanings:
- Fuel–machinery uses
agro_operations.idandmachine_tasks.id. - Energy data uses
fields.idandmachine_tasks.id.
Always interpret the suffixes using the mapping for the relevant entity.
4. Examples
Field setup
If:
SandyOrgId = 550e8400-e29b-41d4-a716-446655440000fields.id = 67890
The PartnerId is:
CROPWISE_550e8400-e29b-41d4-a716-446655440000_67890
Fuel–machinery
If:
SandyOrgId = 550e8400-e29b-41d4-a716-446655440000agro_operations.id = 67890machine_tasks.id = 54321
The PartnerId is:
CROPWISE_550e8400-e29b-41d4-a716-446655440000_67890_54321
In this example:
550e8400-e29b-41d4-a716-446655440000is the Sandy organisation GUID.67890isagro_operations.id.54321ismachine_tasks.id.
Energy data
If:
SandyOrgId = 550e8400-e29b-41d4-a716-446655440000fields.id = 67890machine_tasks.id = 54321
The PartnerId is:
CROPWISE_550e8400-e29b-41d4-a716-446655440000_67890_54321
In this example:
550e8400-e29b-41d4-a716-446655440000is the Sandy organisation GUID.67890isfields.id.54321ismachine_tasks.id.
5. Key points
- PartnerIds are generated by our system; they are not IDs assigned by Cropwise.
CROPWISEidentifies the source system.SandyOrgIdis a GUID that identifies the organisation in our system.- The remaining components come from the relevant Cropwise identifier or identifiers.
- When multiple Cropwise identifiers are required, separate them with underscores (
_). - The Cropwise field or fields used to construct a PartnerId depend on the entity type.
- PartnerIds provide a consistent and unique reference for records imported from Cropwise.