createOpportunityAndLead
Create an opportunity and lead with the provided details.
Arguments
Input fields for creating an opportunity.
Possible Errors
- KT-CT-1113: Disabled GraphQL field requested.
- KT-CT-4121: Invalid phone number.
- KT-CT-7899: An internal error occurred.
- KT-CT-8901: Unable to create lead.
- KT-CT-8902: Unable to create lead.
- KT-CT-8907: Lead not found.
- KT-CT-8912: Funnel not found.
- KT-CT-8913: Organisation is not valid to be assigned.
- KT-CT-8919: Funnel initial stage not set.
- KT-CT-8930: Unable to parse address.
- KT-CT-8931: Extra detail value is invalid.
- KT-CT-8935: National ID bad input.
- KT-CT-8936: Only one address is required to create an opportunity.
- KT-CT-8937: One or more Supply Points cannot be validated.
- KT-CT-8946: A team must also be provided when assigning a user.
- KT-CT-8947: The team you specified was not found.
- KT-CT-8948: The user you specified was not found.
- KT-CT-8949: The selected team does not belong to the specified partner.
- KT-CT-8950: The selected user does not belong to the specified partner.
- KT-CT-8951: The selected user is not a member of the specified team.
- KT-CT-8956: Conflicting address inputs.
- KT-CT-8958: A lead contact must have at least one role.
- KT-CT-9017: Consent type not found.
Allowed Viewers
Required Permissions
Can create leadsQuery Complexity
1Examples
The example data in the variables and responses below are autogenerated values designed to resemble real inputs. They do not represent actual customer data, and in some cases may require additional validation.
mutation CreateOpportunityAndLead($input: CreateOpportunityAndLeadInput!) {
createOpportunityAndLead(input: $input) {
dateOfCreation
funnelCode
opportunityNumber
stage
}
}
Variables
{
"input": CreateOpportunityAndLeadInput
}
Response
{
"data": {
"createOpportunityAndLead": {
"dateOfCreation": "1992-08-18T03:22:40.638527+00:00",
"funnelCode": "they-serve-charge-trial-address",
"opportunityNumber": "certain-professor-arm-here-candidate",
"stage": "leg-style-town-along-article"
}
}
}