• VoIP Solutions
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

We have email templates set up for each of our support reps that send the contact a survey about their experience when a case is closed. To analyze the results we have one email/survey for each individual user.

 

How can I create code that sends the correct email template based on the Case Owner?

 

I know how to write code to send an e-mail automatically at the click of a button but I do not know how to write an if/then type of statement that would send the correct template based on user.

 

I know I can use workflow rule to do this but would prefer not to as we have a lot of support reps and I don't want to have dozens of workflow rules that slow down our Salesforce.

Is it possible to add an external key to the case comments object?  I am trying to integrate with an external system and without an external key, its much more difficult.

I am using the Data Loader (v 16.0) to run a batch process.  I am able to run an update from the command line without any difficulty.

 

Here is my bean:

    <bean id="LocationUpdate"

          class="com.salesforce.lexiloader.process.ProcessRunner"

          singleton="false">

        <description>Accountupdate job takes a csv file of the locations and uploads the latest information from Lichen.</description>

        <property name="name" value="LocationUpdate"/>

        <property name="configOverrideMap">

            <map>

                <entry key="sfdc.debugMessages" value="false"/>

                <entry key="sfdc.debugMessagesFile" value="c:\dataloader\samples\status\accountMasterSoapTrace.log"/>

                <entry key="sfdc.endpoint" value="https://www.salesforce.com"/>

                <entry key="sfdc.username" value="xxxxxxxxx"/>

                <entry key="sfdc.password" value="xxxxxxxxx"/>

                <entry key="process.encryptionKeyFile" value="C:\Program Files\salesforce.com\Apex Data Loader 16.0\bin\encryption.key"/>

                <entry key="sfdc.timeoutSecs" value="600"/>

                <entry key="sfdc.loadBatchSize" value="200"/>

                <entry key="sfdc.entity" value="Location__c"/>

                <entry key="process.operation" value="upsert"/>

<entry key="sfdc.externalIdField" value="XKEY_LOCATIONID__C"/>

                <entry key="process.mappingFile" value="C:\Program Files\salesforce.com\Apex Data Loader 16.0\conf\account_mapping.sdl"/>

                <entry key="dataAccess.name" value="C:\SFDC-Lichen-Update\data\location_update.csv"/>

                <entry key="dataAccess.type" value="csvRead"/>

                <entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/>

            </map>

        </property>

    </bean>

 

My XKey_LocationID__c is in the CSV and is properly labeled in the file.  I can do the same operation successfully through the UI.

 

Every record gets the follow error through the batch job - XKey_LocationID__c not specified


"[external ID name] not specified" error when attempting to call upsert()

 

Any help would be appreciated !!! 

Can the upsert with relationships be used with Data Loader's command line?  If so, are there any examples of an SOQL statement that will do this?  I am attempting to pull Customer data from Oracle R12 and migrate this to SF but need to also include location and owner (account manager) data.  One is a reference from Account and the other is a reference to Account (child).  I can pull the data from Oracle using DataLoader's command line and upsert SF but I don't know how to get the owner id (unknown in Oracle) or the location id (also unknown in Oracle).  This is a one way interface.

We have email templates set up for each of our support reps that send the contact a survey about their experience when a case is closed. To analyze the results we have one email/survey for each individual user.

 

How can I create code that sends the correct email template based on the Case Owner?

 

I know how to write code to send an e-mail automatically at the click of a button but I do not know how to write an if/then type of statement that would send the correct template based on user.

 

I know I can use workflow rule to do this but would prefer not to as we have a lot of support reps and I don't want to have dozens of workflow rules that slow down our Salesforce.