AddSalesRep

Description

This method is used to add a new sales rep to EBizCharge.

Syntax

SalesRepResponse AddSalesRep(SecurityToken securityToken, SalesRep salesRep).

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

SalesRep

salesRep

Includes sales rep information, unique internal sales rep ID assigned by EBizCharge, and sales rep ID. (required)

Return Value

Type

Description

SalesRepResponse

Returns result of AddSalesRep request.

Examples

function addSalesRep()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-777',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$address = array(
'FirstName' => 'Hello',
'LastName' => 'There',
'CompanyName' => 'ABC',
'Address1' => 'Gulber 3',
'Address2' => 'Model Town N block',
'City' => 'Lahore',
'State' => 'Punjab',
'ZipCode' => '54000',
'Country' => 'Pakistan',
'IsDefault' => true,
'AddressId' => '101'
); $salesRep = array(
'SalesRepInternalId' => 1,
'SalesRepId' => 'So107',
'SalesRepType' => '1',
'LinkedToInternalId' => 'sr001',
'FirstName' => 'Hello',
'LastName' => 'There',
'CompanyName' =>'Abc',
'Phone' => '234-232323',
'Phone' => '2020-05-01',
'WebSite' => '2020-05-01',
'Address' => $address
);
$addSalesRep = array(
'SecurityToken' => $securityToken,
'SalesRep' => $salesRep
);
$addSalesRepResponse = $client->AddSalesRep($addSalesRep);
$addSalesRepResult = $addSalesRepResponse->AddSalesRepResult;
}
Request: 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header />
   <soapenv:Body>
      <ebiz:AddSalesRep>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-23f6-4466-a993-f0008187ab9a</ebiz:SecurityId>
            <ebiz:UserId />
            <ebiz:Password />
         </ebiz:securityToken>
         <ebiz:salesRep>
            <ebiz:SalesRepInternalId />
            <ebiz:SalesRepId>Sr-0002</ebiz:SalesRepId>
            <ebiz:SalesRepType>Sales</ebiz:SalesRepType>
            <ebiz:LinkedToInternalId />
            <ebiz:FirstName>Tim</ebiz:FirstName>
            <ebiz:LastName>Litton</ebiz:LastName>
            <ebiz:CompanyName>A.Datum</ebiz:CompanyName>
            <ebiz:Phone>949-419-4879</ebiz:Phone>
            <ebiz:CellPhone>949-418-3458</ebiz:CellPhone>
            <ebiz:Fax />
            <ebiz:Email>tim.litton@gmail.com</ebiz:Email>
            <ebiz:WebSite />
            <ebiz:Address>
               <ebiz:FirstName>Tim</ebiz:FirstName>
               <ebiz:LastName>Litton</ebiz:LastName>
               <ebiz:CompanyName>A.Datum</ebiz:CompanyName>
               <ebiz:Address1>54 Summerfield</ebiz:Address1>
               <ebiz:City>Irvine</ebiz:City>
               <ebiz:State>CA</ebiz:State>
               <ebiz:ZipCode>92644</ebiz:ZipCode>
               <ebiz:Country>US</ebiz:Country>
               <ebiz:IsDefault>true</ebiz:IsDefault>
            </ebiz:Address>
            <ebiz:AccountNumber>000027</ebiz:AccountNumber>
            <ebiz:IsInactive>false</ebiz:IsInactive>
            <ebiz:ExternalUniqueId />
            <ebiz:DateTimeCreated />
            <ebiz:DateTimeModified />
         </ebiz:salesRep>
      </ebiz:AddSalesRep>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <AddSalesRepResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <AddSalesRepResult>
            <SalesRepId>Sr-0002</SalesRepId>
            <SalesRepInternalId>********-db6b-424b-8b7c-d38904ae1075</SalesRepInternalId>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error />
            <ErrorCode>0</ErrorCode>
         </AddSalesRepResult>
      </AddSalesRepResponse>
   </s:Body>
</s:Envelope>