USP_DATAFORMTEMPLATE_ADD_MODELINGANDPROPENSITYUPDATEBATCHCOMMIT

The save procedure used by the add dataform template "Modeling and Propensity Update Batch Row Commit Add Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier INOUT The output parameter indicating the ID of the record added.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@VALIDATEONLY bit IN Validate only
@LOOKUP_ID nvarchar(100) IN Constituent/Lookup ID
@KEYNAME nvarchar(100) IN Last/org/group/household name
@FIRSTNAME nvarchar(50) IN First name
@ANNUALGIFTLIKELIHOOD smallint IN Annual giving likelihood
@ANNUITYLIKELIHOOD smallint IN Annuity likelihood
@BEQUESTLIKELIHOOD smallint IN Bequest likelihood
@CRTLIKELIHOOD smallint IN CRT likelihood
@MAJORGIVINGLIKELIHOOD smallint IN Major giving likelihood
@MEMBERSHIPLIKELIHOOD smallint IN Membership likelihood
@ONLINEGIVINGLIKELIHOOD smallint IN Online giving likelihood
@PATIENTRESPONSELIKELIHOOD smallint IN Patient response likelihood
@PLANNEDGIFTLIKELIHOOD smallint IN Planned giving likelihood
@SUGGESTEDMEMBERSHIPLEVELID uniqueidentifier IN Suggested membership level ID
@SUGGESTEDMEMBERSHIPLEVELSCOREID uniqueidentifier IN Suggested membership level score
@TARGETGIFTRANGEID uniqueidentifier IN Target gift range ID
@TARGETGIFTRANGESCOREID uniqueidentifier IN Target gift range score
@ANALYTICSPROJECTID uniqueidentifier IN

Definition

Copy

CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_MODELINGANDPROPENSITYUPDATEBATCHCOMMIT
(
    @ID uniqueidentifier = null output,
    @CHANGEAGENTID uniqueidentifier = null,
    @VALIDATEONLY bit = 0,
    @LOOKUP_ID nvarchar(100) = null,
    @KEYNAME nvarchar(100) = null,
    @FIRSTNAME nvarchar(50) = null,
    @ANNUALGIFTLIKELIHOOD smallint = -1,
    @ANNUITYLIKELIHOOD smallint = -1,
    @BEQUESTLIKELIHOOD smallint = -1,
    @CRTLIKELIHOOD smallint = -1,
    @MAJORGIVINGLIKELIHOOD smallint = -1,
    @MEMBERSHIPLIKELIHOOD smallint = -1,
    @ONLINEGIVINGLIKELIHOOD smallint = -1,
    @PATIENTRESPONSELIKELIHOOD smallint = -1,
    @PLANNEDGIFTLIKELIHOOD smallint = -1,
    @SUGGESTEDMEMBERSHIPLEVELID uniqueidentifier = null,
    @SUGGESTEDMEMBERSHIPLEVELSCOREID uniqueidentifier = null,
    @TARGETGIFTRANGEID uniqueidentifier = null,
    @TARGETGIFTRANGESCOREID uniqueidentifier = null,
    @ANALYTICSPROJECTID uniqueidentifier = null
)
as

set nocount on;

if @ID is null
    set @ID = newid()

if @CHANGEAGENTID is null  
    exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

declare @CURRENTDATE datetime
set @CURRENTDATE = getdate()

begin try
    raiserror('BBERR_CONSTITUENTNOTFOUND', 13, 1);
end try

begin catch
    exec dbo.USP_RAISE_ERROR
    return 1
end catch

return 0